DownloadModule.js
1.92 KB
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
33
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
61
62
63
64
65
66
67
68
69
70
/**
* 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();
}
});