Commit 5e960ce3 authored by Evren Kutar's avatar Evren Kutar

FIX msgbox in every view rfix #5073

parent 7166c2aa
<div class="container-fluid">
<div ng-class="{'col-md-8': meta.allow_filters}">
<msgbox ng-show="msgbox"></msgbox>
<h3>{{ schema.title }}</h3>
<crud-show-directive ng-if="object"></crud-show-directive>
<crud-form-directive ng-if="forms"></crud-form-directive>
......
......@@ -793,16 +793,7 @@ angular.module('ulakbus.formService', ['ui.bootstrap'])
.post(generator.makeUrl(scope), scope.form_params)
.then(function (res) {
generator.button_switch(true);
if (res.data.client_cmd) {
return generator.pathDecider(res.data.client_cmd, scope, res.data);
}
if (res.data.msgbox) {
scope.msgbox = res.data.msgbox;
var newElement = $compile("<msgbox></msgbox>")(scope);
// this is the default action, which is removing page items and reload page with msgbox
angular.element(document.querySelector('.main.ng-scope')).children().remove();
angular.element(document.querySelector('.main.ng-scope')).append(newElement);
}
return generator.pathDecider(res.data.client_cmd, scope, res.data);
});
};
///**
......
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