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
27797fd5
Commit
27797fd5
authored
Apr 29, 2016
by
bahadircyildiz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CHANGE rref #5257. Confirm submit part implemented, put on formservicepg for testing
parent
c247db93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
5 deletions
+30
-5
uitemplates.js
app/components/uitemplates/uitemplates.js
+9
-5
form_service.js
app/zetalib/form_service.js
+21
-0
No files found.
app/components/uitemplates/uitemplates.js
View file @
27797fd5
...
...
@@ -18,7 +18,7 @@ angular.module('ulakbus.uitemplates', ['ngRoute', 'schemaForm', 'ulakbus.formSer
"name" for defining the name shown in dropdown box. Paste the JSON of form as a member of $scope.forms.
*/
.
controller
(
'FormServicePg'
,
function
(
$scope
,
Generator
)
{
.
controller
(
'FormServicePg'
,
function
(
$scope
,
Generator
,
$timeout
)
{
$scope
.
forms
=
[
{
name
:
'Deneme Form 1'
,
...
...
@@ -35,17 +35,18 @@ angular.module('ulakbus.uitemplates', ['ngRoute', 'schemaForm', 'ulakbus.formSer
}
},
{
name
:
'
Deneme Form 2
'
,
form
:
[
'email'
,
'id'
,
'name'
],
name
:
'
Confirm Form Trial
'
,
form
:
[
'email'
,
'id'
,
'name'
,
'confirm'
],
schema
:
{
properties
:
{
email
:
{
title
:
'email'
,
type
:
'string'
},
id
:
{
title
:
'id'
,
type
:
'number'
},
name
:
{
title
:
'name'
,
type
:
'string'
}
name
:
{
title
:
'name'
,
type
:
'string'
},
confirm
:
{
title
:
'Confirm Form'
,
style
:
"btn-success"
,
type
:
'confirm'
,
confirm_message
:
"zaaa xDê"
,
cmd
:
"list_user"
}
},
required
:
[],
type
:
'object'
,
title
:
'servicetest'
},
model
:
{
email
:
'test@test.com'
,
id
:
2
,
name
:
'cageman'
email
:
'test@test.com'
,
id
:
3
,
name
:
'cageman'
}
}
];
...
...
@@ -55,6 +56,9 @@ angular.module('ulakbus.uitemplates', ['ngRoute', 'schemaForm', 'ulakbus.formSer
$scope
.
selectform
=
function
(
index
)
{
var
form
=
$scope
.
forms
[
index
];
$scope
=
Generator
.
generate
(
$scope
,
{
forms
:
form
});
$timeout
(
function
(){
$scope
.
$apply
();
})
};
$scope
.
selectform
(
$scope
.
selection
);
});
\ No newline at end of file
app/zetalib/form_service.js
View file @
27797fd5
...
...
@@ -610,9 +610,30 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
name
:
k
,
key
:
k
,
cmd
:
v
.
cmd
,
style
:
v
.
style
,
confirm
:
function
()
{
console
.
log
(
v
.
cmd
);
// send cmd with submit
generator
.
submit
(
scope
,
false
)
// .success(function(data){
// // response data contains object_id and unicode
// // scope.model can be reached via prototype chain
// scope.model[formName] = data.forms.model.object_key;
// // scope.form prototype chain returns this form item
// scope.form.titleMap.push({
// value: data.forms.model.object_key,
// name: data.forms.model.unicode
// });
// scope.form.selected_item = {
// value: data.forms.model.object_key,
// name: data.forms.model.unicode
// };
// scope.$watch(document.querySelector('input[name=' + scope.form.model_name + ']'),
// function () {
// angular.element(document.querySelector('input[name=' + scope.form.model_name + ']')).val(scope.form.selected_item.name);
// }
// );
// });
}
};
...
...
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