Commit 79d7a2f6 authored by Bahadir Can Yildiz's avatar Bahadir Can Yildiz

CHANGE rclose #5296. Added generic act. buttons on List Node....

CHANGE rclose #5296. Added generic act. buttons on List Node. schema.footerButtons will contain buton objects
parent dea4a2a9
......@@ -51,8 +51,8 @@ angular.module('ulakbus.uitemplates', ['ngRoute', 'ulakbus.crud'])
type:'confirm',
confirm_message:"Lorem Ipsum Dolor Sit Amet",
buttons: [
{ text: "button 1", cmd:"zeaaa", style: "btn-warning"},
{ text: "button 2", cmd:"cmd1", style: "btn-success"}
{ text: "button 1", cmd:"cmd1", style: "btn-warning"},
{ text: "button 2", cmd:"cmd2", style: "btn-success"}
],
readonly:"true",
form_validate: false}
......
......@@ -3,5 +3,5 @@
<form name="modalForm" sf-schema="schema" sf-form="form" sf-model="model" modal-form-locator></form>
</div>
<div class="modal-footer">
<button ng-repeat="b in buttons" type="{{b.type}}" class="btn {{b.style || 'btn-default'}}" ng-click="onNodeBtnClk(b)">{{b.text}}</button>
<button ng-repeat="b in schema.footerButtons" type="{{b.type}}" class="btn {{b.style || 'btn-default'}}" ng-click="onNodeBtnClk(b)">{{b.text}}</button>
</div>
\ No newline at end of file
......@@ -58,6 +58,7 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
*/
generator.generate = function (scope, data) {
$log.debug("data before generation:", data);
// if no form in response (in case of list and single item request) return scope
if (!data.forms) {
return scope;
......@@ -1405,6 +1406,12 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
}
};
// $scope.onNodeSubmit = function () {
// $scope.$broadcast('schemaFormValidate');
// if ($scope.modalForm.$valid) {
// $uibModalInstance.close($scope);
// }
// };
$scope.cancel = function () {
$uibModalInstance.dismiss('cancel');
};
......@@ -1460,6 +1467,11 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
scope.node.schema.properties[key].list_cmd = 'select_list';
});
// scope.node.schema.footerButtons = [
// {type: "submit", text:"Onayla", style:"btn-success" },
// {type: "button", text:"Vazgec", style:"btn-danger" },
// ]
var newscope = {
wf: scope.node.wf,
url: scope.node.url,
......
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