Commit 07650d8e9cf7cf62f0021ae4083fd339ff7073bb
1 parent
dc702c6d
Exists in
master
and in
109 other branches
create empty catalog
Showing
1 changed file
with
16 additions
and
7 deletions
Show diff stats
js/app/views/CatalogUI.js
... | ... | @@ -21,7 +21,10 @@ Ext.define('amdaUI.CatalogUI', { |
21 | 21 | this.init(config); |
22 | 22 | this.callParent(arguments); |
23 | 23 | this.toReconfigure = true; |
24 | - if (this.object) this.loadObject(); | |
24 | + | |
25 | + if (this.object) { | |
26 | + this.loadObject(); | |
27 | + } | |
25 | 28 | }, |
26 | 29 | |
27 | 30 | setObject : function (object, toReconfigure) { |
... | ... | @@ -216,8 +219,9 @@ Ext.define('amdaUI.CatalogUI', { |
216 | 219 | } |
217 | 220 | else { |
218 | 221 | var typeTT = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id).linkedNode.data.nodeType; |
219 | - if (this.object.get('id') == '') { | |
220 | - //TODO ? | |
222 | + | |
223 | + if (this.object.get('id') == '') { | |
224 | + AmdaAction.initTTCache(this.isCatalog, 1, this.onAfterInit,this); | |
221 | 225 | } |
222 | 226 | else { |
223 | 227 | //From existing TT file |
... | ... | @@ -284,8 +288,7 @@ Ext.define('amdaUI.CatalogUI', { |
284 | 288 | if (btn == 'cancel') return; |
285 | 289 | |
286 | 290 | this.fieldName.clearInvalid(); |
287 | - this.saveProcess(true); | |
288 | - | |
291 | + this.saveProcess(true); | |
289 | 292 | }, |
290 | 293 | |
291 | 294 | /** |
... | ... | @@ -487,17 +490,23 @@ Ext.define('amdaUI.CatalogUI', { |
487 | 490 | var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); |
488 | 491 | |
489 | 492 | if (!module) return; |
493 | + | |
494 | + module.createLinkedNode(); | |
495 | + module.createObject(); | |
496 | + | |
490 | 497 | var obj = module.linkedNode.get('object'); |
491 | 498 | |
492 | - if (obj && obj.get('id') == '' && !obj.get('fromPlugin')) { | |
493 | 499 | var me = this; |
494 | 500 | |
495 | 501 | Ext.Msg.prompt('Define Parameters', 'Please enter parameters number:', function(btn, text){ |
496 | 502 | if (btn == 'ok'){ |
497 | 503 | AmdaAction.initTTCache(me.isCatalog, text, me.onAfterInit, me); |
498 | 504 | } |
505 | + else { | |
506 | + AmdaAction.initTTCache(me.isCatalog, 0, me.onAfterInit, me); | |
507 | + } | |
499 | 508 | }, this); |
500 | - } | |
509 | + | |
501 | 510 | } |
502 | 511 | }] |
503 | 512 | }, |
... | ... |