Commit 833e6c6211d694a5d4c2f12f7d29cec1d5018528
1 parent
19eca0a6
Exists in
master
and in
100 other branches
corrections to catalog generation
Showing
2 changed files
with
7 additions
and
7 deletions
Show diff stats
js/app/models/InteractiveNode.js
... | ... | @@ -198,7 +198,7 @@ Ext.define('amdaModel.InteractiveNode', { |
198 | 198 | var scope = opt.scope ? opt.scope : this; |
199 | 199 | if (opt.callback) |
200 | 200 | opt.callback.call(scope,'update'); |
201 | - if(opt.notDisplayMsg){ | |
201 | + if(opt.notDisplayMsg || opt.callback ){ | |
202 | 202 | //do nothing |
203 | 203 | }else{ |
204 | 204 | Ext.Msg.alert('Complete', 'Object '+this.get('object').get('name')+' has been modified'); |
... | ... |
js/app/views/TimeTableUI.js
... | ... | @@ -223,11 +223,11 @@ Ext.define('amdaUI.TimeTableUI', { |
223 | 223 | timeTableModule.linkedNode.create({callback : function ($action) { |
224 | 224 | if (timeTableModule.linkedNode.get('object').get('fromPlugin')) |
225 | 225 | timeTableModule.linkedNode.get('object').set('fromPlugin',false); |
226 | - timeTableModule.linkedNode.update();}, | |
226 | + timeTableModule.linkedNode.update({ callback : function() {if (onAfterSave) onAfterSave();}, scope : this});}, | |
227 | 227 | scope : this}); |
228 | 228 | } else { |
229 | 229 | //update |
230 | - timeTableModule.linkedNode.update(); | |
230 | + timeTableModule.linkedNode.update({ callback : function() {if (onAfterSave) onAfterSave();}, scope : this}); | |
231 | 231 | } |
232 | 232 | } |
233 | 233 | }, |
... | ... | @@ -271,10 +271,10 @@ Ext.define('amdaUI.TimeTableUI', { |
271 | 271 | // mark this.closed as true before the call to close() as that will fire the beforeclose event again |
272 | 272 | if(this.object.get('id') ==""){ |
273 | 273 | // case of creation of catalog |
274 | - this.saveTT(); | |
274 | + this.saveTT(this.createCAT(this.object.get('id'))); | |
275 | 275 | }else{ |
276 | 276 | // case existing catalog |
277 | - this.saveProcess(false); | |
277 | + this.saveProcess(false,this.createCAT(this.object.get('id'))); | |
278 | 278 | } |
279 | 279 | return; |
280 | 280 | } |
... | ... | @@ -313,7 +313,7 @@ Ext.define('amdaUI.TimeTableUI', { |
313 | 313 | } |
314 | 314 | }, this); |
315 | 315 | }, |
316 | - saveTT : function() | |
316 | + saveTT : function(OnAfterSave) | |
317 | 317 | { |
318 | 318 | if (this.updateObject()){ |
319 | 319 | var basicForm = this.formPanel.getForm(); |
... | ... | @@ -366,7 +366,7 @@ Ext.define('amdaUI.TimeTableUI', { |
366 | 366 | |
367 | 367 | me.fieldName.validFlag = true; |
368 | 368 | me.fieldName.validate(); |
369 | - me.saveProcess(false); | |
369 | + me.saveProcess(false, onAfterSave); | |
370 | 370 | }); |
371 | 371 | }); |
372 | 372 | } else { |
... | ... |