DownloadModule.js 1.61 KB
/** 
 * 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
     */
    objectDataModel : 'amdaModel.Download',
    nodeDataModel : 'amdaModel.DownloadNode',
    
    /**
     * @cfg {String} window definitions
     * @required
     */
    width: 600, 
    height: 600,
    uiType : 'panelDownload',
    helpTitle : 'Help on Download Module',
    helpFile : 'downloadHelp',
        
    /**
    * @override
    */
    createWindow : function() {
        if (!this.linkedNode){
            this.setLinkedNode(amdaModel.DownloadNode);
        }
        this.callParent(arguments);
    },
        
    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'); 
    }
});