diff --git a/js/app/models/InteractiveNode.js b/js/app/models/InteractiveNode.js index 79f9db4..2f23deb 100644 --- a/js/app/models/InteractiveNode.js +++ b/js/app/models/InteractiveNode.js @@ -198,7 +198,7 @@ Ext.define('amdaModel.InteractiveNode', { var scope = opt.scope ? opt.scope : this; if (opt.callback) opt.callback.call(scope,'update'); - if(opt.notDisplayMsg){ + if(opt.notDisplayMsg || opt.callback ){ //do nothing }else{ Ext.Msg.alert('Complete', 'Object '+this.get('object').get('name')+' has been modified'); diff --git a/js/app/views/TimeTableUI.js b/js/app/views/TimeTableUI.js index ce7f53f..c0f4f13 100755 --- a/js/app/views/TimeTableUI.js +++ b/js/app/views/TimeTableUI.js @@ -223,11 +223,11 @@ Ext.define('amdaUI.TimeTableUI', { timeTableModule.linkedNode.create({callback : function ($action) { if (timeTableModule.linkedNode.get('object').get('fromPlugin')) timeTableModule.linkedNode.get('object').set('fromPlugin',false); - timeTableModule.linkedNode.update();}, + timeTableModule.linkedNode.update({ callback : function() {if (onAfterSave) onAfterSave();}, scope : this});}, scope : this}); } else { //update - timeTableModule.linkedNode.update(); + timeTableModule.linkedNode.update({ callback : function() {if (onAfterSave) onAfterSave();}, scope : this}); } } }, @@ -271,10 +271,10 @@ Ext.define('amdaUI.TimeTableUI', { // mark this.closed as true before the call to close() as that will fire the beforeclose event again if(this.object.get('id') ==""){ // case of creation of catalog - this.saveTT(); + this.saveTT(this.createCAT(this.object.get('id'))); }else{ // case existing catalog - this.saveProcess(false); + this.saveProcess(false,this.createCAT(this.object.get('id'))); } return; } @@ -313,7 +313,7 @@ Ext.define('amdaUI.TimeTableUI', { } }, this); }, - saveTT : function() + saveTT : function(OnAfterSave) { if (this.updateObject()){ var basicForm = this.formPanel.getForm(); @@ -366,7 +366,7 @@ Ext.define('amdaUI.TimeTableUI', { me.fieldName.validFlag = true; me.fieldName.validate(); - me.saveProcess(false); + me.saveProcess(false, onAfterSave); }); }); } else { -- libgit2 0.21.2