Blame view

js/app/controllers/DownloadModule.js 1.61 KB
16035364   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/** 
 * 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, 
c05ca21a   Elena.Budnik   increase downloaf...
33
    height: 600,
16035364   Benjamin Renard   First commit
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
    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'); 
    }
});