From 07650d8e9cf7cf62f0021ae4083fd339ff7073bb Mon Sep 17 00:00:00 2001 From: Elena.Budnik <ebudnik@irap.omp.eu> Date: Wed, 31 Oct 2018 18:45:55 +0100 Subject: [PATCH] create empty catalog --- js/app/views/CatalogUI.js | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/js/app/views/CatalogUI.js b/js/app/views/CatalogUI.js index 7b294ca..7d25618 100644 --- a/js/app/views/CatalogUI.js +++ b/js/app/views/CatalogUI.js @@ -21,7 +21,10 @@ Ext.define('amdaUI.CatalogUI', { this.init(config); this.callParent(arguments); this.toReconfigure = true; - if (this.object) this.loadObject(); + + if (this.object) { + this.loadObject(); + } }, setObject : function (object, toReconfigure) { @@ -216,8 +219,9 @@ Ext.define('amdaUI.CatalogUI', { } else { var typeTT = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id).linkedNode.data.nodeType; - if (this.object.get('id') == '') { - //TODO ? + + if (this.object.get('id') == '') { + AmdaAction.initTTCache(this.isCatalog, 1, this.onAfterInit,this); } else { //From existing TT file @@ -284,8 +288,7 @@ Ext.define('amdaUI.CatalogUI', { if (btn == 'cancel') return; this.fieldName.clearInvalid(); - this.saveProcess(true); - + this.saveProcess(true); }, /** @@ -487,17 +490,23 @@ Ext.define('amdaUI.CatalogUI', { var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.catalog.id); if (!module) return; + + module.createLinkedNode(); + module.createObject(); + var obj = module.linkedNode.get('object'); - if (obj && obj.get('id') == '' && !obj.get('fromPlugin')) { var me = this; Ext.Msg.prompt('Define Parameters', 'Please enter parameters number:', function(btn, text){ if (btn == 'ok'){ AmdaAction.initTTCache(me.isCatalog, text, me.onAfterInit, me); } + else { + AmdaAction.initTTCache(me.isCatalog, 0, me.onAfterInit, me); + } }, this); - } + } }] }, -- libgit2 0.21.2