Commit ebee8ca7 authored by bahadircyildiz's avatar bahadircyildiz

CHANGE rref #5257, refs GH-98. Confirm Button popover issue temporarily solved.

parent 8a1ee568
...@@ -292,7 +292,7 @@ svg.new-parent { ...@@ -292,7 +292,7 @@ svg.new-parent {
.djs-palette:not(.open) .djs-palette-entries { .djs-palette:not(.open) .djs-palette-entries {
display: none; display: none;
} }
confirm
.djs-palette .djs-palette-toggle:hover { .djs-palette .djs-palette-toggle:hover {
background: #666; background: #666;
} }
...@@ -304,7 +304,7 @@ svg.new-parent { ...@@ -304,7 +304,7 @@ svg.new-parent {
.highlighted-entry { .highlighted-entry {
color: rgb(255, 116, 0) !important; color: rgb(255, 116, 0) !important;
} }
confirm
/** /**
* context-pad * context-pad
*/ */
......
...@@ -44,7 +44,7 @@ var app=angular.module('ulakbus.uitemplates', ['ngRoute', 'ulakbus.formService'] ...@@ -44,7 +44,7 @@ var app=angular.module('ulakbus.uitemplates', ['ngRoute', 'ulakbus.formService']
email: {title: 'email', type: 'string'}, email: {title: 'email', type: 'string'},
id: {title: 'id', type: 'number'}, 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"} confirm: {title: 'Confirm Form', style:"btn-success", type:'confirm', confirm_message: "zaaa xDê", cmd:"list_user", readonly:"true"}
}, required: [], type: 'object', title: 'servicetest' }, required: [], type: 'object', title: 'servicetest'
}, },
model: { model: {
......
...@@ -4,16 +4,15 @@ ...@@ -4,16 +4,15 @@
ng-disabled="form.readonly" ng-disabled="form.readonly"
uib-popover-template="'confirmPopoverTemplate.html'" uib-popover-template="'confirmPopoverTemplate.html'"
popover-title="{{form.title}}" popover-title="{{form.title}}"
popover-placement="bottom" popover-trigger="focus"
popover-trigger="outsideClick"> popover-placement="bottom">
<span ng-if="form.icon" class="{{form.icon}}"></span> <span ng-if="form.icon" class="{{form.icon}}"></span>
{{form.title}} {{form.title}}
</button> </button>
<script type="text/ng-template" id="confirmPopoverTemplate.html"> <script type="text/ng-template" id="confirmPopoverTemplate.html">
<div>{{form.title}}</div>
<div class="form-group"> <div class="form-group">
<p>{{form.confirm_message}}</p> <p>{{form.confirm_message}}</p>
<button class="btn btn-default" ng-click="form.confirm()"></button> <button class="btn btn-default" ng-click="form.confirm()">Confirm</button>
</div> </div>
</script> </script>
</div> </div>
\ No newline at end of file
...@@ -286,6 +286,8 @@ angular.module('ulakbus.formService', ['ui.bootstrap']) ...@@ -286,6 +286,8 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
* *
* @returns scope {Object} * @returns scope {Object}
*/ */
generator.prepareFormItems = function (scope) { generator.prepareFormItems = function (scope) {
angular.forEach(scope.form, function (value, key) { angular.forEach(scope.form, function (value, key) {
...@@ -618,10 +620,13 @@ angular.module('ulakbus.formService', ['ui.bootstrap']) ...@@ -618,10 +620,13 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
key: k, key: k,
cmd: v.cmd, cmd: v.cmd,
style: v.style, style: v.style,
togglePopover: function(event){
},
confirm: function () { confirm: function () {
console.log(v.cmd); console.log(v.cmd);
// send cmd with submit // send cmd with submit
generator.submit(scope, false) generator.submit(scope, false);
// .success(function(data){ // .success(function(data){
// // response data contains object_id and unicode // // response data contains object_id and unicode
// // scope.model can be reached via prototype chain // // scope.model can be reached via prototype chain
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment