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 {
.djs-palette:not(.open) .djs-palette-entries {
display: none;
}
confirm
.djs-palette .djs-palette-toggle:hover {
background: #666;
}
......@@ -304,7 +304,7 @@ svg.new-parent {
.highlighted-entry {
color: rgb(255, 116, 0) !important;
}
confirm
/**
* context-pad
*/
......
......@@ -44,7 +44,7 @@ var app=angular.module('ulakbus.uitemplates', ['ngRoute', 'ulakbus.formService']
email: {title: 'email', type: 'string'},
id: {title: 'id', type: 'number'},
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'
},
model: {
......
......@@ -4,16 +4,15 @@
ng-disabled="form.readonly"
uib-popover-template="'confirmPopoverTemplate.html'"
popover-title="{{form.title}}"
popover-placement="bottom"
popover-trigger="outsideClick">
popover-trigger="focus"
popover-placement="bottom">
<span ng-if="form.icon" class="{{form.icon}}"></span>
{{form.title}}
</button>
<script type="text/ng-template" id="confirmPopoverTemplate.html">
<div>{{form.title}}</div>
<div class="form-group">
<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>
</script>
</div>
\ No newline at end of file
......@@ -286,6 +286,8 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
*
* @returns scope {Object}
*/
generator.prepareFormItems = function (scope) {
angular.forEach(scope.form, function (value, key) {
......@@ -618,10 +620,13 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
key: k,
cmd: v.cmd,
style: v.style,
togglePopover: function(event){
},
confirm: function () {
console.log(v.cmd);
// send cmd with submit
generator.submit(scope, false)
generator.submit(scope, false);
// .success(function(data){
// // response data contains object_id and unicode
// // 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