StatisticsModule.js
1.37 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
/**
* Project AMDA-NG
* Name StatisticsModule.js
* @class amdaDesktop.StatisticsModule
* @extends amdaDesktop.InteractiveModule
* @brief Statistics Module controller definition
* @author elena
*/
Ext.define('amdaDesktop.StatisticsModule', {
extend: 'amdaDesktop.InteractiveModule',
requires: [
'amdaUI.StatisticsUI'
],
contentId : 'statisticsUI',
/**
* @cfg {String} data models
* @required
*/
nodeDataModel : 'amdaModel.StatisticsNode',
objectDataModel : 'amdaModel.Stats',
/**
* @cfg {String} window definitions
* @required
*/
width : 550,
height: 550,
uiType : 'panelStatistics',
helpTitle : 'Help on Statistics Module',
helpFile : 'statisticsHelp',
/**
* @override
*/
createWindow : function() {
if (!this.linkedNode){
this.setLinkedNode(amdaModel.StatisticsNode);
}
this.callParent(arguments);
},
saveState: function() {
var uiContent = this.getUiContent();
var form = uiContent.formPanel.items.items[1].getForm();
var values = form.getValues();
Ext.state.Manager.set('timeinterval', {'startDate' : values.startDate,'stopDate' : values.stopDate });
},
getState : function() {
return Ext.state.Manager.get('timeinterval');
}
});