/** * Project  : AMDA-NG * Name : DownloadModule.js * @class amdaDesktop.DownloadModule * @extends amdaDesktop.InteractiveModule * @brief Download Module controller definition * @author Myriam * @version $Id: DownloadModule.js 2152 2014-02-28 16:32:22Z elena $ */ Ext.define('amdaDesktop.DownloadModule', { extend: 'amdaDesktop.InteractiveModule', requires: [ 'amdaUI.DownloadUI' ], contentId : 'downloadUI', /** * @cfg {String} data models * @required */ nodeDataModel : 'amdaModel.DownloadNode', /** * @cfg {String} window definitions * @required */ width: 600, height: 620, uiType : 'panelDownload', helpTitle : 'Help on Download Module', helpFile : 'downloadHelp', saveState: function() { var uiContent = this.getUiContent(); var form = uiContent.down('form').getForm(); var values = form.getValues(); // Ext.state.Manager.set(this.id + '_form', values); Ext.state.Manager.set('timeinterval', {'startDate' : values.startDate,'stopDate' : values.stopDate }); }, getState : function() { // return Ext.state.Manager.get(this.id + '_form'); return Ext.state.Manager.get('timeinterval'); }, addParameter: function(paramNode) { var me = this; var desktop = this.app.getDesktop(); var win = desktop.getWindow(this.id); if (win) { me.getUiContent().addParameter(paramNode, false); win.show(); } else { this.createWindow(function () { me.getUiContent().addParameter(paramNode, true); }); } }, editFromJsonData: function(jsonData) { this.createLinkedNode(); this.createObject(jsonData); this.createWindow(); } });