Blame view

js/app/controllers/DownloadModule.js 1.92 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
/** 
 * 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
     */
16035364   Benjamin Renard   First commit
25
26
27
28
29
30
31
    nodeDataModel : 'amdaModel.DownloadNode',
    
    /**
     * @cfg {String} window definitions
     * @required
     */
    width: 600, 
f6539f85   Benjamin Renard   Download - Fix sa...
32
    height: 620,
16035364   Benjamin Renard   First commit
33
34
35
36
    uiType : 'panelDownload',
    helpTitle : 'Help on Download Module',
    helpFile : 'downloadHelp',
        
16035364   Benjamin Renard   First commit
37
38
39
40
41
42
43
44
45
46
47
    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'); 
915d6711   Benjamin Renard   DownloadNode now ...
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
    },

    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);
            });
        } 
0e540b69   Benjamin Renard   Finalize save of ...
63
64
65
66
67
68
    },

    editFromJsonData: function(jsonData) {
        this.createLinkedNode();
        this.createObject(jsonData);
        this.createWindow();
16035364   Benjamin Renard   First commit
69
    }
915d6711   Benjamin Renard   DownloadNode now ...
70
});