CatalogModule.js 1.12 KB
/**
 * Project   AMDA-NG
 * Name      CatalogModule.js
 * @class    amdaDesktop.CatalogModule
 * @extends  amdaDesktop.InteractiveModule
 * @brief    Catalog Module controller definition 
 * @author   elena
 */

Ext.define('amdaDesktop.CatalogModule', {
	extend: 'amdaDesktop.InteractiveModule',
	
	 requires: [
         'amdaUI.CatalogUI'
     ],
     
      contentId : 'catalogUI',
      isOperationOnShow : true,
      
    /**
     * @cfg {String} data models
     * @required
     */
	nodeDataModel : 'amdaModel.CatalogNode',
	
    /**
     * @cfg {String} window definitions
     * @required
     */
	width : 800,
	height: 700,
	uiType : 'panelCatalog',
	helpTitle : 'Help on Catalog Module',
	helpFile : 'catalogHelp',
	
	operationOnShow: function() {				
		var obj = this.linkedNode.get('object');
		if (obj && obj.get('id') == '' && !obj.get('fromPlugin')) {
			Ext.Msg.prompt('Define Parameters', 'Please enter parameters number:', function(btn, text){
			if (btn == 'ok'){
				AmdaAction.initTTCache(this.getUiContent().isCatalog, text, this.getUiContent().onAfterInit, this.getUiContent()); 
			}
		}, this);
		}
								  
	}		
});