Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
ulakbus-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ulakbus
ulakbus-ui
Commits
f98e8577
Commit
f98e8577
authored
Dec 01, 2015
by
Evren Kutar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
date field custom validation + listnode fix
parent
f13aa51b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
217 additions
and
125 deletions
+217
-125
linkedModelModalContent.html
app/shared/templates/linkedModelModalContent.html
+28
-0
nodeTable.html
app/shared/templates/nodeTable.html
+42
-43
form_service.js
app/zetalib/form_service.js
+75
-37
templates.js
dist/templates.js
+72
-45
No files found.
app/shared/templates/linkedModelModalContent.html
View file @
f98e8577
...
@@ -3,6 +3,34 @@
...
@@ -3,6 +3,34 @@
<div
class=
"buttons-on-top-modal"
></div>
<div
class=
"buttons-on-top-modal"
></div>
<hr>
<hr>
<form
name=
"linkedModelForm"
sf-schema=
"schema"
sf-form=
"form"
sf-model=
"model"
modal-form-locator
></form>
<form
name=
"linkedModelForm"
sf-schema=
"schema"
sf-form=
"form"
sf-model=
"model"
modal-form-locator
></form>
<div
ng-repeat=
"node in Node"
>
<h3>
{{ node.title }}
<span
ng-if=
"node.lengthModels < 1"
>
<a
href=
"javascript:void(0);"
modal-for-nodes=
"{{node.schema.model_name}},Node"
>
<i
class=
"fa fa-plus-circle fa-fw"
></i>
</a>
</span>
</h3>
<div
class=
"node-table"
>
<ng-include
src=
"'shared/templates/nodeTable.html'"
></ng-include>
</div>
<hr>
</div>
<div
ng-repeat=
"node in ListNode"
>
<h3>
{{ node.title }}
<span>
<a
href=
"javascript:void(0);"
modal-for-nodes=
"{{node.schema.model_name}},ListNode,add"
>
<i
class=
"fa fa-plus-circle fa-fw"
></i>
</a>
</span>
</h3>
<div
class=
"list-node-table"
>
<ng-include
src=
"'shared/templates/nodeTable.html'"
></ng-include>
</div>
<hr>
</div>
<hr>
<hr>
<div
class=
"buttons-on-bottom-modal"
></div>
<div
class=
"buttons-on-bottom-modal"
></div>
</div>
</div>
...
...
app/shared/templates/nodeTable.html
View file @
f98e8577
<div
class=
"tablescroll"
>
<div
class=
"tablescroll"
>
{{node.model}}
<table
class=
"table table-bordered"
style=
"background-color:#fff;"
>
<!--<table class="table table-bordered" style="background-color:#fff;">-->
<thead>
<!--<thead>-->
<tr
ng-if=
"node.schema.formType=='Node'"
>
<!--<tr ng-if="node.schema.formType=='Node'">-->
<!--<!–<th colspan="2">–>-->
<!--<!–<label>–>-->
<!--<!–<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">–>-->
<!--<!–Hepsini Seç–>-->
<!--<!–</label>–>-->
<!--<!–</th>–>-->
<!--<th ng-repeat="(key,value) in node.model">{{ key }}</th>-->
<!--<th>İşlem</th>-->
<!--</tr>-->
<!--<tr ng-if="node.schema.formType=='ListNode'">-->
<!--<th colspan="2">-->
<!--<th colspan="2">-->
<!--<label>-->
<!--<label>-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--Hepsini Seç-->
<!--Hepsini Seç-->
<!--</label>-->
<!--</label>-->
<!--</th>-->
<!--</th>-->
<!--<th ng-repeat="(key,value) in node.model[0]">{{ key }}</th>-->
<th
ng-repeat=
"(key,value) in node.model track by $index"
>
{{ key }}
</th>
<!--<th>İşlem</th>-->
<th>
İşlem
</th>
<!--</tr>-->
</tr>
<!--</thead>-->
<tr
ng-if=
"node.schema.formType=='ListNode'"
>
<!--<tbody ng-class="{hidden: node.lengthModels < 1}">-->
<th
colspan=
"2"
>
<label>
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
Hepsini Seç
</label>
</th>
<th
ng-repeat=
"(key,value) in node.model track by $index"
>
{{ key }}
</th>
<th>
İşlem
</th>
</tr>
</thead>
<tbody
ng-class=
"{hidden: node.lengthModels < 1}"
>
<!--<tr ng-if="node.schema.formType=='Node'">-->
<tr
ng-if=
"node.schema.formType=='Node'"
>
<!--<!–<td width="60">–>-->
<!--<!–<label>–>-->
<!--<!–<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">–>-->
<!--<!–</label>–>-->
<!--<!–</td>–>-->
<!--<!–<th scope="row" style="text-align:center">1</th>–>-->
<!--<td ng-repeat="value in node.model">{{ value }}</td>-->
<!--<td>-->
<!--<button modal-for-nodes="{{node.schema.model_name}},{{node.schema.formType}},edit">Düzenle</button><br>-->
<!--<button>Sil</button>-->
<!--</td>-->
<!--</tr>-->
<!--<tr ng-repeat="listnodemodel in node.model" ng-if="node.schema.formType=='ListNode'">-->
<!--<td width="60">-->
<!--<td width="60">-->
<!--<label>-->
<!--<label>-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--<input type="checkbox" style="zoom:1.5; margin:5px 0 0 8px;">-->
<!--</label>-->
<!--</label>-->
<!--</td>-->
<!--</td>-->
<!--<th scope="row" style="text-align:center">{{$index+1}}</th>-->
<!--<th scope="row" style="text-align:center">1</th>-->
<!--<td ng-repeat="(k, v) in listnodemodel">{{ v }}</td>-->
<td
ng-repeat=
"value in node.model track by $index"
>
{{ value }}
</td>
<!--<td>-->
<td>
<!--<button modal-for-nodes="{{node.schema.model_name}},{{node.schema.formType}},edit,{{$index}}">Düzenle</button><br>-->
<button
modal-for-nodes=
"{{node.schema.model_name}},{{node.schema.formType}},edit"
>
Düzenle
</button><br>
<!--<button>Sil</button>-->
<button>
Sil
</button>
<!--</td>-->
</td>
<!--</tr>-->
</tr>
<tr
ng-repeat=
"listnodemodel in node.items track by $index"
ng-if=
"node.schema.formType=='ListNode'"
>
<td
width=
"60"
>
<label>
<input
type=
"checkbox"
style=
"zoom:1.5; margin:5px 0 0 8px;"
>
</label>
</td>
<th
scope=
"row"
style=
"text-align:center"
>
{{$index+1}}
</th>
<td
ng-repeat=
"(k, v) in listnodemodel track by $index"
>
{{ v }}
</td>
<td>
<button
modal-for-nodes=
"{{node.schema.model_name}},{{node.schema.formType}},edit,{{$index}}"
>
Düzenle
</button><br>
<button>
Sil
</button>
</td>
</tr>
<
!--</tbody>--
>
<
/tbody
>
<
!--</table>--
>
<
/table
>
</div>
</div>
\ No newline at end of file
app/zetalib/form_service.js
View file @
f98e8577
...
@@ -135,7 +135,11 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -135,7 +135,11 @@ angular.module('formService', ['ui.bootstrap'])
if
(
v
.
type
===
'submit'
||
v
.
type
===
'button'
)
{
if
(
v
.
type
===
'submit'
||
v
.
type
===
'button'
)
{
var
buttonPositions
=
scope
.
modalElements
?
scope
.
modalElements
.
buttonPositions
:
{
bottom
:
'move-to-bottom'
,
top
:
'move-to-top'
,
none
:
''
};
var
buttonPositions
=
scope
.
modalElements
?
scope
.
modalElements
.
buttonPositions
:
{
bottom
:
'move-to-bottom'
,
top
:
'move-to-top'
,
none
:
''
};
var
workOnForm
=
scope
.
modalElements
?
scope
.
modalElements
.
workOnForm
:
'formgenerated'
;
var
workOnForm
=
scope
.
modalElements
?
scope
.
modalElements
.
workOnForm
:
'formgenerated'
;
var
workOnDiv
=
scope
.
modalElements
?
scope
.
modalElements
.
workOnDiv
:
''
;
var
workOnDiv
=
scope
.
modalElements
?
scope
.
modalElements
.
workOnDiv
:
''
;
var
buttonClass
=
(
buttonPositions
[
v
.
position
]
||
buttonPositions
.
bottom
);
var
buttonClass
=
(
buttonPositions
[
v
.
position
]
||
buttonPositions
.
bottom
);
...
@@ -173,7 +177,7 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -173,7 +177,7 @@ angular.module('formService', ['ui.bootstrap'])
};
};
// replace buttons according to their position values
// replace buttons according to their position values
$timeout
(
function
()
{
$timeout
(
function
()
{
var
selectorBottom
=
'.buttons-on-bottom'
+
workOnDiv
;
var
selectorBottom
=
'.buttons-on-bottom'
+
workOnDiv
;
//var selectorTop = '.buttons-on-top'+workOnDiv;
//var selectorTop = '.buttons-on-top'+workOnDiv;
var
buttonsToBottom
=
angular
.
element
(
document
.
querySelector
(
'.'
+
buttonClass
));
var
buttonsToBottom
=
angular
.
element
(
document
.
querySelector
(
'.'
+
buttonClass
));
...
@@ -191,6 +195,25 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -191,6 +195,25 @@ angular.module('formService', ['ui.bootstrap'])
// check if type is date and if type date found change it to string
// check if type is date and if type date found change it to string
if
(
v
.
type
===
'date'
)
{
if
(
v
.
type
===
'date'
)
{
scope
.
form
[
scope
.
form
.
indexOf
(
k
)]
=
{
key
:
k
,
name
:
k
,
validationMessage
:
{
'dateNotValid'
:
"Girdiğiniz tarih geçerli değildir. <i>orn: '01.01.2015'<i/>"
},
$asyncValidators
:
{
'dateNotValid'
:
function
(
value
)
{
var
deferred
=
$q
.
defer
();
$timeout
(
function
(){
if
(
isNaN
(
Date
.
parse
(
value
))
||
value
.
split
(
'.'
).
length
!==
3
)
{
deferred
.
reject
();
}
else
{
deferred
.
resolve
();
}
},
500
);
return
deferred
.
promise
;
}
}
};
v
.
type
=
'string'
;
v
.
type
=
'string'
;
scope
.
model
[
k
]
=
generator
.
dateformatter
(
scope
.
model
[
k
]);
scope
.
model
[
k
]
=
generator
.
dateformatter
(
scope
.
model
[
k
]);
...
@@ -232,7 +255,7 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -232,7 +255,7 @@ angular.module('formService', ['ui.bootstrap'])
var
modelScope
=
{
"url"
:
v
.
wf
,
"form_params"
:
{
model
:
v
.
model_name
,
cmd
:
v
.
list_cmd
}};
var
modelScope
=
{
"url"
:
v
.
wf
,
"form_params"
:
{
model
:
v
.
model_name
,
cmd
:
v
.
list_cmd
}};
//scope.$on('refreshTitleMap', function (event, data) {
//scope.$on('refreshTitleMap', function (event, data) {
// todo: write a function to refresh titleMap after new item add to linkedModel
// todo: write a function to refresh titleMap after new item add to linkedModel
//});
//});
scope
.
generateTitleMap
=
function
(
modelScope
)
{
scope
.
generateTitleMap
=
function
(
modelScope
)
{
...
@@ -289,7 +312,10 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -289,7 +312,10 @@ angular.module('formService', ['ui.bootstrap'])
if
((
v
.
type
===
'ListNode'
||
v
.
type
===
'Node'
)
&&
v
.
widget
===
'filter_interface'
)
{
if
((
v
.
type
===
'ListNode'
||
v
.
type
===
'Node'
)
&&
v
.
widget
===
'filter_interface'
)
{
var
formitem
=
scope
.
form
[
scope
.
form
.
indexOf
(
k
)];
var
formitem
=
scope
.
form
[
scope
.
form
.
indexOf
(
k
)];
var
modelScope
=
{
"url"
:
v
.
wf
||
scope
.
wf
,
"form_params"
:
{
model
:
v
.
model_name
||
v
.
schema
[
0
].
model_name
,
cmd
:
v
.
list_cmd
||
'select_list'
}};
var
modelScope
=
{
"url"
:
v
.
wf
||
scope
.
wf
,
"form_params"
:
{
model
:
v
.
model_name
||
v
.
schema
[
0
].
model_name
,
cmd
:
v
.
list_cmd
||
'select_list'
}
};
scope
.
generateTitleMap
=
function
(
modelScope
)
{
scope
.
generateTitleMap
=
function
(
modelScope
)
{
generator
.
get_list
(
modelScope
).
then
(
function
(
res
)
{
generator
.
get_list
(
modelScope
).
then
(
function
(
res
)
{
...
@@ -360,7 +386,7 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -360,7 +386,7 @@ angular.module('formService', ['ui.bootstrap'])
var
dataValues
=
[];
var
dataValues
=
[];
angular
.
forEach
(
data
,
function
(
value
,
key
)
{
angular
.
forEach
(
data
,
function
(
value
,
key
)
{
var
dataKey
=
{};
var
dataKey
=
{};
dataKey
[
v
.
schema
[
0
].
name
]
=
value
.
value
;
dataKey
[
v
.
schema
[
0
].
name
]
=
value
.
value
;
dataValues
.
push
(
dataKey
);
dataValues
.
push
(
dataKey
);
});
});
return
dataValues
;
return
dataValues
;
...
@@ -390,26 +416,26 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -390,26 +416,26 @@ angular.module('formService', ['ui.bootstrap'])
url
:
scope
.
url
url
:
scope
.
url
});
});
//if (scope.model[k] === null) {
// scope[v.type][k].model = v.type === 'Node' ? {} : [];
//} else {
// scope[v.type][k].model = scope.model[k];
//}
scope
[
v
.
type
][
k
].
model
=
angular
.
copy
(
scope
.
model
[
k
])
||
{};
scope
[
v
.
type
][
k
].
model
=
angular
.
copy
(
scope
.
model
[
k
])
||
{};
if
(
v
.
type
===
'ListNode'
)
{
scope
[
v
.
type
][
k
].
items
=
[];}
if
(
v
.
type
===
'ListNode'
)
{
scope
[
v
.
type
][
k
].
items
=
[];
}
angular
.
forEach
(
v
.
schema
,
function
(
item
)
{
angular
.
forEach
(
v
.
schema
,
function
(
item
)
{
scope
[
v
.
type
][
k
].
schema
.
properties
[
item
.
name
]
=
item
;
scope
[
v
.
type
][
k
].
schema
.
properties
[
item
.
name
]
=
angular
.
copy
(
item
)
;
// prepare required fields
// prepare required fields
if
(
item
.
required
===
true
&&
item
.
name
!==
'idx'
)
{
if
(
item
.
required
===
true
&&
item
.
name
!==
'idx'
)
{
scope
[
v
.
type
][
k
].
schema
.
required
.
push
(
item
.
name
);
scope
[
v
.
type
][
k
].
schema
.
required
.
push
(
angular
.
copy
(
item
.
name
)
);
}
}
// idx field must be hidden
// idx field must be hidden
if
(
item
.
name
===
'idx'
)
{
if
(
item
.
name
===
'idx'
)
{
scope
[
v
.
type
][
k
].
form
.
push
({
type
:
'string'
,
key
:
item
.
name
,
htmlClass
:
'hidden'
});
scope
[
v
.
type
][
k
].
form
.
push
({
type
:
'string'
,
key
:
angular
.
copy
(
item
.
name
),
htmlClass
:
'hidden'
});
}
else
{
}
else
{
scope
[
v
.
type
][
k
].
form
.
push
(
item
.
name
);
scope
[
v
.
type
][
k
].
form
.
push
(
item
.
name
);
}
}
...
@@ -512,6 +538,10 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -512,6 +538,10 @@ angular.module('formService', ['ui.bootstrap'])
var
re
=
/^
([
1-9
]{1}[
0-9
]{9}[
0,2,4,6,8
]{1})
$/i
;
var
re
=
/^
([
1-9
]{1}[
0-9
]{9}[
0,2,4,6,8
]{1})
$/i
;
return
re
.
test
(
tcno
);
return
re
.
test
(
tcno
);
};
};
generator
.
isValidDate
=
function
(
dateValue
)
{
var
datevalid
=
Date
.
parse
(
dateValue
)
===
Nan
?
false
:
true
;
return
datevalid
;
};
generator
.
asyncValidators
=
{
generator
.
asyncValidators
=
{
emailNotValid
:
function
(
value
)
{
emailNotValid
:
function
(
value
)
{
var
deferred
=
$q
.
defer
();
var
deferred
=
$q
.
defer
();
...
@@ -641,7 +671,7 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -641,7 +671,7 @@ angular.module('formService', ['ui.bootstrap'])
// todo: diff for all submits to recognize form change. if no change returns to view with no submit
// todo: diff for all submits to recognize form change. if no change returns to view with no submit
angular
.
forEach
(
$scope
.
ListNode
,
function
(
value
,
key
)
{
angular
.
forEach
(
$scope
.
ListNode
,
function
(
value
,
key
)
{
$scope
.
model
[
key
]
=
value
.
model
;
$scope
.
model
[
key
]
=
value
.
items
;
});
});
angular
.
forEach
(
$scope
.
Node
,
function
(
value
,
key
)
{
angular
.
forEach
(
$scope
.
Node
,
function
(
value
,
key
)
{
$scope
.
model
[
key
]
=
value
.
model
;
$scope
.
model
[
key
]
=
value
.
model
;
...
@@ -695,7 +725,7 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -695,7 +725,7 @@ angular.module('formService', ['ui.bootstrap'])
$scope
.
$on
(
'modalFormLocator'
,
function
(
event
)
{
$scope
.
$on
(
'modalFormLocator'
,
function
(
event
)
{
$scope
.
linkedModelForm
=
event
.
targetScope
.
linkedModelForm
;
$scope
.
linkedModelForm
=
event
.
targetScope
.
linkedModelForm
;
});
});
$scope
.
$on
(
'submitModalForm'
,
function
()
{
$scope
.
$on
(
'submitModalForm'
,
function
()
{
$scope
.
onSubmit
(
$scope
.
linkedModelForm
);
$scope
.
onSubmit
(
$scope
.
linkedModelForm
);
});
});
...
@@ -715,7 +745,10 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -715,7 +745,10 @@ angular.module('formService', ['ui.bootstrap'])
};
};
$scope
.
onNodeSubmit
=
function
()
{
$scope
.
onNodeSubmit
=
function
()
{
$uibModalInstance
.
close
(
$scope
);
$scope
.
$broadcast
(
'schemaFormValidate'
);
if
(
$scope
.
modalForm
.
$valid
)
{
$uibModalInstance
.
close
(
$scope
);
}
};
};
$scope
.
cancel
=
function
()
{
$scope
.
cancel
=
function
()
{
...
@@ -736,7 +769,8 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -736,7 +769,8 @@ angular.module('formService', ['ui.bootstrap'])
link
:
function
(
scope
,
element
,
attributes
)
{
link
:
function
(
scope
,
element
,
attributes
)
{
element
.
on
(
'click'
,
function
()
{
element
.
on
(
'click'
,
function
()
{
var
modalInstance
=
$uibModal
.
open
({
var
modalInstance
=
$uibModal
.
open
({
animation
:
false
,
animation
:
true
,
backdrop
:
'static'
,
templateUrl
:
'shared/templates/listnodeModalContent.html'
,
templateUrl
:
'shared/templates/listnodeModalContent.html'
,
controller
:
'ModalCtrl'
,
controller
:
'ModalCtrl'
,
size
:
'lg'
,
size
:
'lg'
,
...
@@ -770,28 +804,28 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -770,28 +804,28 @@ angular.module('formService', ['ui.bootstrap'])
form_params
:
{
model
:
scope
.
node
.
schema
.
model_name
}
form_params
:
{
model
:
scope
.
node
.
schema
.
model_name
}
};
};
Generator
.
generate
(
newscope
,
{
forms
:
scope
.
node
});
Generator
.
generate
(
newscope
,
{
forms
:
scope
.
node
});
scope
.
model
=
{};
return
newscope
;
return
scope
.
node
;
}
}
}
}
});
});
modalInstance
.
result
.
then
(
function
(
childmodel
,
key
)
{
modalInstance
.
result
.
then
(
function
(
childmodel
,
key
)
{
//if (childmodel.schema.formType === 'Node') {
var
listNodeItem
=
scope
.
$parent
[
childmodel
.
schema
.
formType
][
childmodel
.
schema
.
model_name
];
// scope.$parent.model[childmodel.schema.model_name] = childmodel.model;
if
(
childmodel
.
schema
.
formType
===
'Node'
)
{
//}
listNodeItem
.
model
=
angular
.
copy
(
childmodel
.
model
);
//
listNodeItem
.
lengthModels
+=
1
;
//if (childmodel.schema.formType === 'ListNode') {
}
// if (childmodel.edit) {
// scope.$parent[childmodel.schema.formType][childmodel.schema.model_name].model[childmodel.edit] = childmodel.model;
if
(
childmodel
.
schema
.
formType
===
'ListNode'
)
{
// } else {
if
(
childmodel
.
edit
)
{
// scope.$parent[childmodel.schema.formType][childmodel.schema.model_name].model.push(childmodel.model);
listNodeItem
.
model
[
childmodel
.
edit
]
=
childmodel
.
model
;
// }
}
else
{
//}
listNodeItem
.
items
.
push
(
angular
.
copy
(
childmodel
.
model
));
}
scope
.
$parent
[
childmodel
.
schema
.
formType
][
childmodel
.
schema
.
model_name
].
lengthModels
+=
1
;
listNodeItem
.
lengthModels
+=
1
;
}
});
});
});
});
}
}
...
@@ -813,7 +847,7 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -813,7 +847,7 @@ angular.module('formService', ['ui.bootstrap'])
element
.
on
(
'click'
,
function
()
{
element
.
on
(
'click'
,
function
()
{
var
modalInstance
=
$uibModal
.
open
({
var
modalInstance
=
$uibModal
.
open
({
animation
:
true
,
animation
:
true
,
backdrop
:
'static'
,
backdrop
:
'static'
,
templateUrl
:
'shared/templates/linkedModelModalContent.html'
,
templateUrl
:
'shared/templates/linkedModelModalContent.html'
,
controller
:
'ModalCtrl'
,
controller
:
'ModalCtrl'
,
size
:
'lg'
,
size
:
'lg'
,
...
@@ -823,7 +857,11 @@ angular.module('formService', ['ui.bootstrap'])
...
@@ -823,7 +857,11 @@ angular.module('formService', ['ui.bootstrap'])
url
:
scope
.
form
.
wf
,
url
:
scope
.
form
.
wf
,
form_params
:
{
model
:
scope
.
form
.
model_name
,
cmd
:
scope
.
form
.
add_cmd
},
form_params
:
{
model
:
scope
.
form
.
model_name
,
cmd
:
scope
.
form
.
add_cmd
},
modalElements
:
{
modalElements
:
{
buttonPositions
:
{
bottom
:
'move-to-bottom-modal'
,
top
:
'move-to-top-modal'
,
none
:
''
},
buttonPositions
:
{
bottom
:
'move-to-bottom-modal'
,
top
:
'move-to-top-modal'
,
none
:
''
},
workOnForm
:
'linkedModelForm'
,
workOnForm
:
'linkedModelForm'
,
workOnDiv
:
'-modal'
workOnDiv
:
'-modal'
},
},
...
...
dist/templates.js
View file @
f98e8577
...
@@ -1520,6 +1520,34 @@ angular.module("shared/templates/linkedModelModalContent.html", []).run(["$templ
...
@@ -1520,6 +1520,34 @@ angular.module("shared/templates/linkedModelModalContent.html", []).run(["$templ
" <div class=
\"
buttons-on-top-modal
\"
></div>
\n
"
+
" <div class=
\"
buttons-on-top-modal
\"
></div>
\n
"
+
" <hr>
\n
"
+
" <hr>
\n
"
+
" <form name=
\"
linkedModelForm
\"
sf-schema=
\"
schema
\"
sf-form=
\"
form
\"
sf-model=
\"
model
\"
modal-form-locator></form>
\n
"
+
" <form name=
\"
linkedModelForm
\"
sf-schema=
\"
schema
\"
sf-form=
\"
form
\"
sf-model=
\"
model
\"
modal-form-locator></form>
\n
"
+
" <div ng-repeat=
\"
node in Node
\"
>
\n
"
+
" <h3>{{ node.title }}
\n
"
+
" <span ng-if=
\"
node.lengthModels < 1
\"
>
\n
"
+
" <a href=
\"
javascript:void(0);
\"
modal-for-nodes=
\"
{{node.schema.model_name}},Node
\"
>
\n
"
+
" <i class=
\"
fa fa-plus-circle fa-fw
\"
></i>
\n
"
+
" </a>
\n
"
+
" </span>
\n
"
+
" </h3>
\n
"
+
"
\n
"
+
" <div class=
\"
node-table
\"
>
\n
"
+
" <ng-include src=
\"
'shared/templates/nodeTable.html'
\"
></ng-include>
\n
"
+
" </div>
\n
"
+
" <hr>
\n
"
+
" </div>
\n
"
+
" <div ng-repeat=
\"
node in ListNode
\"
>
\n
"
+
" <h3>{{ node.title }}
\n
"
+
" <span>
\n
"
+
" <a href=
\"
javascript:void(0);
\"
modal-for-nodes=
\"
{{node.schema.model_name}},ListNode,add
\"
>
\n
"
+
" <i class=
\"
fa fa-plus-circle fa-fw
\"
></i>
\n
"
+
" </a>
\n
"
+
" </span>
\n
"
+
" </h3>
\n
"
+
"
\n
"
+
" <div class=
\"
list-node-table
\"
>
\n
"
+
" <ng-include src=
\"
'shared/templates/nodeTable.html'
\"
></ng-include>
\n
"
+
" </div>
\n
"
+
" <hr>
\n
"
+
" </div>
\n
"
+
" <hr>
\n
"
+
" <hr>
\n
"
+
" <div class=
\"
buttons-on-bottom-modal
\"
></div>
\n
"
+
" <div class=
\"
buttons-on-bottom-modal
\"
></div>
\n
"
+
"</div>
\n
"
+
"</div>
\n
"
+
...
@@ -1616,62 +1644,61 @@ angular.module("shared/templates/multiselect.html", []).run(["$templateCache", f
...
@@ -1616,62 +1644,61 @@ angular.module("shared/templates/multiselect.html", []).run(["$templateCache", f
angular
.
module
(
"shared/templates/nodeTable.html"
,
[]).
run
([
"$templateCache"
,
function
(
$templateCache
)
{
angular
.
module
(
"shared/templates/nodeTable.html"
,
[]).
run
([
"$templateCache"
,
function
(
$templateCache
)
{
$templateCache
.
put
(
"shared/templates/nodeTable.html"
,
$templateCache
.
put
(
"shared/templates/nodeTable.html"
,
"<div class=
\"
tablescroll
\"
>
\n
"
+
"<div class=
\"
tablescroll
\"
>
\n
"
+
" {{node.model}}
\n
"
+
"<table class=
\"
table table-bordered
\"
style=
\"
background-color:#fff;
\"
>
\n
"
+
"<!--<table class=
\"
table table-bordered
\"
style=
\"
background-color:#fff;
\"
>-->
\n
"
+
" <thead>
\n
"
+
" <!--<thead>-->
\n
"
+
" <tr ng-if=
\"
node.schema.formType=='Node'
\"
>
\n
"
+
" <!--<tr ng-if=
\"
node.schema.formType=='Node'
\"
>-->
\n
"
+
" <!--<!–<th colspan=
\"
2
\"
>–>-->
\n
"
+
" <!--<!–<label>–>-->
\n
"
+
" <!--<!–<input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>–>-->
\n
"
+
" <!--<!–Hepsini Seç–>-->
\n
"
+
" <!--<!–</label>–>-->
\n
"
+
" <!--<!–</th>–>-->
\n
"
+
" <!--<th ng-repeat=
\"
(key,value) in node.model
\"
>{{ key }}</th>-->
\n
"
+
" <!--<th>İşlem</th>-->
\n
"
+
" <!--</tr>-->
\n
"
+
" <!--<tr ng-if=
\"
node.schema.formType=='ListNode'
\"
>-->
\n
"
+
" <!--<th colspan=
\"
2
\"
>-->
\n
"
+
" <!--<th colspan=
\"
2
\"
>-->
\n
"
+
" <!--<label>-->
\n
"
+
" <!--<label>-->
\n
"
+
" <!--<input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>-->
\n
"
+
" <!--<input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>-->
\n
"
+
" <!--Hepsini Seç-->
\n
"
+
" <!--Hepsini Seç-->
\n
"
+
" <!--</label>-->
\n
"
+
" <!--</label>-->
\n
"
+
" <!--</th>-->
\n
"
+
" <!--</th>-->
\n
"
+
" <!--<th ng-repeat=
\"
(key,value) in node.model[0]
\"
>{{ key }}</th>-->
\n
"
+
" <th ng-repeat=
\"
(key,value) in node.model track by $index
\"
>{{ key }}</th>
\n
"
+
" <!--<th>İşlem</th>-->
\n
"
+
" <th>İşlem</th>
\n
"
+
" <!--</tr>-->
\n
"
+
" </tr>
\n
"
+
" <!--</thead>-->
\n
"
+
" <tr ng-if=
\"
node.schema.formType=='ListNode'
\"
>
\n
"
+
" <!--<tbody ng-class=
\"
{hidden: node.lengthModels < 1}
\"
>-->
\n
"
+
" <th colspan=
\"
2
\"
>
\n
"
+
"
\n
"
+
" <label>
\n
"
+
" <!--<tr ng-if=
\"
node.schema.formType=='Node'
\"
>-->
\n
"
+
" <input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>
\n
"
+
" <!--<!–<td width=
\"
60
\"
>–>-->
\n
"
+
" Hepsini Seç
\n
"
+
" <!--<!–<label>–>-->
\n
"
+
" </label>
\n
"
+
" <!--<!–<input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>–>-->
\n
"
+
" </th>
\n
"
+
" <!--<!–</label>–>-->
\n
"
+
" <th ng-repeat=
\"
(key,value) in node.model track by $index
\"
>{{ key }}</th>
\n
"
+
" <!--<!–</td>–>-->
\n
"
+
" <th>İşlem</th>
\n
"
+
" <!--<!–<th scope=
\"
row
\"
style=
\"
text-align:center
\"
>1</th>–>-->
\n
"
+
" </tr>
\n
"
+
" <!--<td ng-repeat=
\"
value in node.model
\"
>{{ value }}</td>-->
\n
"
+
" </thead>
\n
"
+
" <!--<td>-->
\n
"
+
" <tbody ng-class=
\"
{hidden: node.lengthModels < 1}
\"
>
\n
"
+
" <!--<button modal-for-nodes=
\"
{{node.schema.model_name}},{{node.schema.formType}},edit
\"
>Düzenle</button><br>-->
\n
"
+
"
\n
"
+
" <!--<button>Sil</button>-->
\n
"
+
" <tr ng-if=
\"
node.schema.formType=='Node'
\"
>
\n
"
+
" <!--</td>-->
\n
"
+
" <!--</tr>-->
\n
"
+
"
\n
"
+
" <!--<tr ng-repeat=
\"
listnodemodel in node.model
\"
ng-if=
\"
node.schema.formType=='ListNode'
\"
>-->
\n
"
+
" <!--<td width=
\"
60
\"
>-->
\n
"
+
" <!--<td width=
\"
60
\"
>-->
\n
"
+
" <!--<label>-->
\n
"
+
" <!--<label>-->
\n
"
+
" <!--<input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>-->
\n
"
+
" <!--<input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>-->
\n
"
+
" <!--</label>-->
\n
"
+
" <!--</label>-->
\n
"
+
" <!--</td>-->
\n
"
+
" <!--</td>-->
\n
"
+
" <!--<th scope=
\"
row
\"
style=
\"
text-align:center
\"
>{{$index+1}}</th>-->
\n
"
+
" <!--<th scope=
\"
row
\"
style=
\"
text-align:center
\"
>1</th>-->
\n
"
+
" <!--<td ng-repeat=
\"
(k, v) in listnodemodel
\"
>{{ v }}</td>-->
\n
"
+
" <td ng-repeat=
\"
value in node.model track by $index
\"
>{{ value }}</td>
\n
"
+
" <!--<td>-->
\n
"
+
" <td>
\n
"
+
" <!--<button modal-for-nodes=
\"
{{node.schema.model_name}},{{node.schema.formType}},edit,{{$index}}
\"
>Düzenle</button><br>-->
\n
"
+
" <button modal-for-nodes=
\"
{{node.schema.model_name}},{{node.schema.formType}},edit
\"
>Düzenle</button><br>
\n
"
+
" <!--<button>Sil</button>-->
\n
"
+
" <button>Sil</button>
\n
"
+
" <!--</td>-->
\n
"
+
" </td>
\n
"
+
" <!--</tr>-->
\n
"
+
" </tr>
\n
"
+
"
\n
"
+
"
\n
"
+
" <!--</tbody>-->
\n
"
+
" <tr ng-repeat=
\"
listnodemodel in node.items track by $index
\"
ng-if=
\"
node.schema.formType=='ListNode'
\"
>
\n
"
+
"<!--</table>-->
\n
"
+
" <td width=
\"
60
\"
>
\n
"
+
" <label>
\n
"
+
" <input type=
\"
checkbox
\"
style=
\"
zoom:1.5; margin:5px 0 0 8px;
\"
>
\n
"
+
" </label>
\n
"
+
" </td>
\n
"
+
" <th scope=
\"
row
\"
style=
\"
text-align:center
\"
>{{$index+1}}</th>
\n
"
+
" <td ng-repeat=
\"
(k, v) in listnodemodel track by $index
\"
>{{ v }}</td>
\n
"
+
" <td>
\n
"
+
" <button modal-for-nodes=
\"
{{node.schema.model_name}},{{node.schema.formType}},edit,{{$index}}
\"
>Düzenle</button><br>
\n
"
+
" <button>Sil</button>
\n
"
+
" </td>
\n
"
+
" </tr>
\n
"
+
"
\n
"
+
" </tbody>
\n
"
+
"</table>
\n
"
+
"</div>"
);
"</div>"
);
}]);
}]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment