Commit 495fc7a3a478b819a74f9a3077ff27584a353b35

Authored by Benjamin Renard
1 parent 6f513d3f

Adapt plot UI in relation with new plot object

js/app/models/PlotObjects/MultiplotRequestObject.js
... ... @@ -31,14 +31,27 @@ Ext.define('amdaPlotObj.MultiplotRequestObject', {
31 31 var me = this;
32 32 me.callParent(arguments);
33 33 },
  34 +
  35 + isDirty: function() {
  36 + var dirty = false;
  37 + this.plots().each(function(plotNode) {
  38 + var plotObject = plotNode.get('object');
  39 + if (plotObject && (plotObject.get('id') != '') && plotObject.dirty) {
  40 + dirty = true;
  41 + }
  42 + });
  43 + return dirty;
  44 + },
34 45  
35 46 createNewPlot: function() {
36 47 var plotNode = Ext.create('amdaModel.PlotNode', {
37 48 leaf : true,
38 49 contextNode : this
39 50 });
  51 + var plotObject = Ext.create(plotNode.get('objectDataModel'));
  52 + plotNode.set('object',plotObject);
40 53 this.plots().add(plotNode);
41   - return this.plots()[this.plots().count()-1];
  54 + return this.plots().getAt(this.plots().count()-1);
42 55 },
43 56  
44 57 removePlotById: function(id) {
... ...
js/app/views/PlotComponents/PlotElementPanel.js
... ... @@ -10,6 +10,7 @@
10 10  
11 11 Ext.define('amdaPlotComp.PlotElementPanel', {
12 12 extend: 'Ext.form.Panel',
  13 +
13 14  
14 15 elementFormsManager : new Ext.AbstractManager(),
15 16  
... ...
js/app/views/PlotComponents/PlotTabContent.js
... ... @@ -9,86 +9,109 @@
9 9 */
10 10  
11 11 Ext.define('amdaPlotComp.PlotTabContent', {
12   - extend: 'Ext.form.Panel',
13   -
14   - requires: [
15   - 'amdaUI.TimeSelectorUI',
16   - 'amdaPlotComp.PlotTree'
  12 + extend: 'Ext.form.Panel',
  13 +
  14 + requires: [
  15 + 'amdaUI.TimeSelectorUI',
  16 + 'amdaPlotComp.PlotTree',
  17 + 'amdaPlotComp.PlotOutputForm',
  18 + 'amdaPlotComp.PlotElementPanel'
17 19 ],
18 20  
19   - treePlot: null,
20   -
21   - //Link to the Plot Element Panel
22   - plotElementPanel: null,
23   -
24   - //linkk to the Plot Tab Panel
25   - plotTabPanel : null,
26   -
27   - //Link to the time selctor
28   - timeSelector : null,
29   -
30   - //Tab Object
31   - object: null,
  21 + //Link to the Plot Node
  22 + plotNode: null,
  23 +
  24 + timeSelector: null,
  25 + plotTree: null,
  26 + plotElement: null,
  27 + plotOutput: null,
32 28  
33 29 constructor: function(config) {
34 30 this.init(config);
35 31 this.callParent(arguments);
36   - },
37   -
38   - setTabObject : function(object) {
39   - this.object = object;
40   - this.treePlot.buildTree(this.object);
41   - this.timeSelector.intervalSel.setInterval(this.object.get('startDate'), this.object.get('stopDate'));
42   - this.addTTs(this.object.get('timeTables'));
43   - },
44   -
45   - addTTs : function(TTarray) {
46   - // set TTTab
47   - this.timeSelector.setTTTab(TTarray);
48   - },
  32 + },
49 33  
50   - updateLinkedToMultiPlotMode : function (isLinkedToMultiPlotMode) {
51   - this.timeSelector.setVisible(!isLinkedToMultiPlotMode);
52   - this.plotTabPanel.updateLinkedToMultiPlotMode(isLinkedToMultiPlotMode);
53   - },
  34 + updateTimeObject : function() {
  35 + var timeSource = this.timeSelector.getActiveTimeSource();
  36 + var tabForm = this.getForm();
  37 + tabForm.updateRecord(this.plotNode.get('object'));
  38 + this.plotNode.get('object').set('timesrc', timeSource);
  39 + if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0])
  40 + this.plotNode.get('object').set('timeTables',this.timeSelector.TTGrid.getStore().data.items);
  41 + },
54 42  
55   - updateTimeObject : function() {
56   - var timeSource = this.timeSelector.getActiveTimeSource();
57   - var tabForm = this.getForm();
58   - tabForm.updateRecord(this.object);
59   - this.object.set('timesrc', timeSource);
60   - if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0])
61   - this.object.set('timeTables',this.timeSelector.TTGrid.getStore().data.items);
62   - },
63   -
64   - init : function(config) {
65   - var me = this;
66   -
67   - this.plotElementPanel = config.plotElementPanel;
68   - this.plotTabPanel = config.plotTabPanel;
69   -
70   - this.timeSelector = new amdaUI.TimeSelectorUI( { id: 'plotTimeSelectorTab' + config.tabId, border : false, flex: 3, collapsible: true, collapseDirection : 'bottom', hidden: true} );
71   - this.treePlot = new amdaPlotComp.PlotTree({flex: 5.6, plotElementPanel: this.plotElementPanel, plotTabContent: this});
72   -
73   - var myConf = {
74   - bodyStyle: { background : '#dfe8f6' },
75   - border : false,
76   - defaults: {
77   - border: false
78   - },
79   - layout: {
80   - type: 'vbox',
81   - pack: 'start',
82   - align: 'stretch'
83   - },
84   - items: [
85   - this.treePlot,
86   - this.timeSelector
87   - ]
88   - };
  43 + init : function(config) {
  44 + var me = this;
  45 + me.plotNode = config.plotNode;
  46 +
  47 + this.timeSelector = new amdaUI.TimeSelectorUI( { id: 'plotTimeSelectorTab' + me.plotNode.id, border : false, flex: 6, collapsible: true, collapseDirection : 'bottom'} );
  48 + this.plotElement = new amdaPlotComp.PlotElementPanel({flex: 11});
  49 + this.treePlot = new amdaPlotComp.PlotTree({flex: 11, plotElementPanel: this.plotElement});
  50 + this.plotOutput = new amdaPlotComp.PlotOutputForm({flex: 6, collapseDirection : 'bottom', collapsible : true });
  51 +
  52 + var treePanel = new Ext.form.Panel({
  53 + flex: 1,
  54 + layout: {
  55 + type: 'vbox',
  56 + pack: 'start',
  57 + align: 'stretch'
  58 + },
  59 + bodyStyle: { background : '#dfe8f6' },
  60 + defaults: {
  61 + border: false
  62 + },
  63 + items: [
  64 + this.treePlot,
  65 + this.timeSelector
  66 + ]
  67 + });
  68 +
  69 + var optionsPanel = new Ext.form.Panel({
  70 + flex: 1,
  71 + layout: {
  72 + type: 'vbox',
  73 + pack: 'start',
  74 + align: 'stretch'
  75 + },
  76 + bodyStyle: { background : '#dfe8f6' },
  77 + defaults: {
  78 + border: false
  79 + },
  80 + items: [
  81 + this.plotElement,
  82 + this.plotOutput
  83 + ]
  84 + });
  85 +
89 86  
90   - Ext.apply (this , Ext.apply (arguments, myConf));
  87 + var myConf = {
  88 + bodyStyle: { background : '#dfe8f6' },
  89 + border : false,
  90 + defaults: {
  91 + border: false
  92 + },
  93 + layout: {
  94 + type: 'hbox',
  95 + pack: 'start',
  96 + align: 'stretch'
  97 + },
  98 + items: [
  99 + treePanel,
  100 + optionsPanel
  101 + ],
  102 + listeners: {
  103 + afterrender: function(comp, eOpts) {
  104 + this.plotOutput.setObject(this.plotNode.get('object'));
  105 + this.timeSelector.intervalSel.setInterval(this.plotNode.get('object').get('startDate'), this.plotNode.get('object').get('stopDate'));
  106 + this.timeSelector.setTTTab(this.plotNode.get('object').get('timeTables'));
  107 + this.treePlot.buildTree(this.plotNode.get('object'));
  108 + },
  109 + scope: this
  110 + }
  111 + };
  112 +
  113 + Ext.apply (this , Ext.apply (arguments, myConf));
91 114  
92 115  
93   - }
94   -});
95 116 \ No newline at end of file
  117 + }
  118 +});
... ...
js/app/views/PlotComponents/PlotTabPanel.js
... ... @@ -9,195 +9,124 @@
9 9 */
10 10  
11 11 Ext.define('amdaPlotComp.PlotTabPanel', {
12   - extend: 'Ext.tab.Panel',
  12 + extend: 'Ext.tab.Panel',
13 13  
14   - requires: [
15   - 'amdaPlotComp.PlotTabContent'
16   - ],
  14 + requires: [
  15 + 'amdaPlotComp.PlotTabContent'
  16 + ],
17 17  
18   - //Link to the Plot UI
19   - plotUI : null,
  18 + //Link to the Plot UI
  19 + plotUI : null,
20 20  
21   - //Request object
22   - multiplot_object: null,
  21 + //Multiplot object
  22 + multiplot_object: null,
23 23  
24   - constructor: function(config) {
25   - this.init(config);
26   - this.callParent(arguments);
27   - },
  24 + constructor: function(config) {
  25 + this.init(config);
  26 + this.callParent(arguments);
  27 + },
28 28  
29   - setMultiplotObject: function(multiplot_object)
30   - {
31   - var me = this;
32   - this.removeAll();
33   - this.multiplot_object = multiplot_object;
  29 + setMultiplotObject: function(multiplot_object) {
  30 + var me = this;
  31 + this.removeAll();
  32 + this.multiplot_object = multiplot_object;
34 33  
35   - this.multiplot_object.plots().each(function (rec, index) {
36   - this.addPlotNode(rec, index == 0);
37   - }, this);
38   - },
  34 + this.multiplot_object.plots().each(function (rec, index) {
  35 + this.addPlotNode(rec, index == 0);
  36 + }, this);
  37 + },
39 38  
40   - addPlotNode: function(plotNode, selectTab)
41   - {
42   - var tabNumber = this.getTabBar().items.getCount();
43   - var tabContent = new amdaPlotComp.PlotTabContent();
44   - tabContent.setPlotNode(plotNode);
45   - var me = this;
46   - var tabComp = this.add({
47   - title: (plotNode.get('text') != '') ? plotNode.get('text') : 'Plot '+tabNumber,
48   - closable: true,
49   - layout: 'fit',
50   - bodyStyle: 'background: none',
51   - defaults: {
52   - border: false
53   - },
54   - items: [
55   - tabContent
56   - ],
57   - listeners : {
58   - scope : this,
59   - beforeclose: function( tab, eOpts ) {
60   - if (this.items.getCount() == 1)
61   - {
62   - myDesktopApp.warningMsg('You need to keep at least one plot definition');
63   - return false;
64   - }
65   - return true;
66   - },
67   - close: function( tab, eOpts ) {
68   - if (tab.items.getAt(0).object)
69   - this.object.removeTabById(tab.items.getAt(0).object.get('id'));
70   - },
71   - destroy: function(tab, eOpts) {
72   -
73   - this.updatePlotTabs();
74   - },
75   - afterrender: function(tab, e0pts) {
76   - if (!tab.tab.el) {
77   - return;
78   - }
79   - tab.tab.el.on('contextmenu', function(e, t, eOpts) {
80   - var menu = new Ext.menu.Menu({
81   - items: [
82   - {
83   - text: 'Rename',
84   - handler: function() {
85   - Ext.Msg.prompt('Rename', 'Please enter new plot tab name:', function(btn, text){
86   - if (btn == 'ok'){
87   - tabObject.set('tab-name',text);
88   - me.updatePlotTabs();
89   - }
90   - }, me);
91   - }
92   - }
93   - ]
94   - });
95   - var position = e.getXY();
96   - e.stopEvent();
97   - menu.showAt(position);
98   - },this);
99   - }
100   - }
101   - });
  39 + addPlotNode: function(plotNode, selectTab)
  40 + {
  41 + var tabNumber = this.getTabBar().items.getCount();
  42 + var tabContent = new amdaPlotComp.PlotTabContent({plotNode: plotNode});
  43 + var me = this;
  44 + var tabComp = this.add({
  45 + title: (plotNode.get('text') != '') ? plotNode.get('text') : 'Plot '+tabNumber,
  46 + closable: true,
  47 + layout: 'fit',
  48 + bodyStyle: 'background: none',
  49 + defaults: {
  50 + border: false
  51 + },
  52 + items: [
  53 + tabContent
  54 + ],
  55 + listeners : {
  56 + scope : this,
  57 + beforeclose: function( tab, eOpts ) {
  58 + if (this.items.getCount() == 1)
  59 + {
  60 + myDesktopApp.warningMsg('You need to keep at least one plot definition');
  61 + return false;
  62 + }
  63 + return true;
  64 + },
  65 + close: function( tab, eOpts ) {
  66 + if (tab.items.getAt(0).object)
  67 + this.object.removeTabById(tab.items.getAt(0).object.get('id'));
  68 + },
  69 + destroy: function(tab, eOpts) {
  70 + this.updatePlotTabs();
  71 + }
  72 + }
  73 + });
102 74  
103   - if (selectTab)
104   - this.setActiveTab(tabComp);
  75 + if (selectTab)
  76 + this.setActiveTab(tabComp);
105 77  
106   - return tabContent;
107   - },
  78 + return tabContent;
  79 + },
108 80  
109   - updatePlotTabs: function()
110   - {
111   - var me = this;
112   - var haveSelectedTab = false;
113   - this.object.tabs().each(function (rec, index) {
114   - if (rec.get('id') == me.object.get('active-tab-id')) {
115   - haveSelectedTab = true;
116   - }
117   - });
118   -
119   - var i = 0;
120   - for (i = 0; i < this.items.getCount(); ++i)
121   - {
122   - var tabItem = this.items.getAt(i);
123   - var tabContent = tabItem.items.getAt(0);
124   - var tabObj = this.object.tabs().getById(tabContent.tabId);
125   - if (!tabObj) {
126   - continue;
127   - }
128   - if (!haveSelectedTab) {
129   - //Set first tab as the selected one
130   - this.setActiveTab(tabItem);
131   - this.object.set('active-tab-id', tabObj.get('id'));
132   - haveSelectedTab = true;
133   - }
134   - var tabNumber = i+1;
135   - tabItem.setTitle((tabObj.get('tab-name') != '') ? tabObj.get('tab-name') : 'Plot '+tabNumber);
136   - tabContent.setTabObject(tabObj);
137   - }
138   - },
139   -
140   - updateLinkedToMultiPlotMode : function(isLinkedToMultiPlotMode) {
141   - this.plotUI.updateLinkedToMultiPlotMode(isLinkedToMultiPlotMode);
142   - },
  81 + updatePlotTabs: function()
  82 + {
  83 + // ToDo - BRE
  84 + },
143 85  
144   - updateTimeObject : function() {
145   - for (i = 0; i < this.items.getCount(); ++i)
146   - {
147   - this.items.getAt(i).items.getAt(0).updateTimeObject();
148   - }
149   - },
  86 + updateTimeObject : function() {
  87 + for (i = 0; i < this.items.getCount(); ++i)
  88 + {
  89 + this.items.getAt(i).items.getAt(0).updateTimeObject();
  90 + }
  91 + },
150 92  
151   - getTreeFromPlotTab: function(plotTab)
152   - {
153   - return plotTab.child().treePlot;
154   - },
  93 + getTreeFromPlotTab: function(plotTab)
  94 + {
  95 + return plotTab.child().treePlot;
  96 + },
155 97  
156   - getSelectedTabId: function()
157   - {
158   - if (this.getActiveTab())
159   - return this.getActiveTab().child().tabId;
160   - return 0;
161   - },
  98 + getSelectedTabId: function()
  99 + {
  100 + if (this.getActiveTab())
  101 + return this.getActiveTab().child().tabId;
  102 + return 0;
  103 + },
162 104  
163   - init : function(config) {
164   - var me = this;
165   -
166   - this.plotElementPanel = config.plotElementPanel;
167   - this.plotUI = config.plotUI;
168   -
169   - var myConf = {
170   - plain: true,
171   - bodyStyle: { background : '#dfe8f6' },
172   - border : false,
173   - defaults: {
174   - border: false
175   - },
176   - tabBar:{
177   - items:[
178   - {
179   - text:'+',
180   - closable: false,
181   - handler:function(btn,e){
182   - var tabContent = me.addPlotNode(me.multiplot_object.createNewPlot(), true);
183   - }
184   - }]
185   - },
186   -
187   - listeners: {
188   - tabchange: function(tabPanel, newCard, oldCard, eOpts ) {
189   - var newCardTree = this.getTreeFromPlotTab(newCard);
190   - var selectedNode = newCardTree.getSelectedNode();
191   - if (selectedNode == null)
192   - me.plotElementPanel.resetElement();
193   - else
194   - me.plotElementPanel.setElement(selectedNode.type,selectedNode.object, newCardTree);
195   - newCardTree.updateLinkedToMultiPlotMode();
196   - },
197   - scope: me
198   - }
199   - };
200   -
201   - Ext.apply (this , Ext.apply (arguments, myConf));
202   - }
  105 + init : function(config) {
  106 + var me = this;
  107 +
  108 + this.plotUI = config.plotUI;
  109 +
  110 + var myConf = {
  111 + plain: true,
  112 + bodyStyle: { background : '#dfe8f6' },
  113 + border : false,
  114 + defaults: {
  115 + border: false
  116 + },
  117 + tabBar:{
  118 + items:[
  119 + {
  120 + text:'+',
  121 + closable: false,
  122 + handler:function(btn,e){
  123 + var tabContent = me.addPlotNode(me.multiplot_object.createNewPlot(), true);
  124 + }
  125 + }
  126 + ]
  127 + }
  128 + };
  129 +
  130 + Ext.apply (this , Ext.apply (arguments, myConf));
  131 + }
203 132 });
... ...
js/app/views/PlotComponents/PlotTree.js
... ... @@ -853,10 +853,6 @@ Ext.define(&#39;amdaPlotComp.PlotTree&#39;, {
853 853 }
854 854 },
855 855  
856   - updateLinkedToMultiPlotMode : function() {
857   - this.plotTabContent.updateLinkedToMultiPlotMode(this.tabObject.get('multi-plot-linked'));
858   - },
859   -
860 856 init : function(config) {
861 857 var me = this;
862 858  
... ... @@ -894,12 +890,12 @@ Ext.define(&#39;amdaPlotComp.PlotTree&#39;, {
894 890 this.linkToMultiPlotCombo = Ext.create('Ext.form.field.Checkbox', {
895 891 xtype: 'checkbox',
896 892 boxLabel: 'Link to MultiPlot',
  893 + disabled: true,
897 894 listeners: {
898 895 change: function(combo, newValue, oldValue, eOpts) {
899 896 if (this.tabObject)
900 897 {
901 898 this.tabObject.set('multi-plot-linked', newValue);
902   - this.updateLinkedToMultiPlotMode();
903 899 }
904 900 },
905 901 scope: this
... ...
js/app/views/PlotUI.js
... ... @@ -10,61 +10,47 @@
10 10  
11 11  
12 12 Ext.define('amdaUI.PlotUI', {
13   - extend: 'Ext.container.Container',
14   - alias: 'widget.newPanelPlot',
  13 + extend: 'Ext.container.Container',
  14 + alias: 'widget.newPanelPlot',
15 15  
16   - requires: [
17   - 'amdaModel.DownloadNode',
18   - 'amdaModel.Download',
19   - 'amdaUI.TimeSelectorUI',
20   - 'amdaPlotComp.PlotTabPanel',
21   - 'amdaPlotComp.PlotOutputForm',
22   - 'amdaPlotComp.PlotElementPanel'
  16 + requires: [
  17 + 'amdaModel.DownloadNode',
  18 + 'amdaModel.Download',
  19 + 'amdaPlotComp.PlotTabPanel'
23 20 ],
24 21  
25   - formPanel: null,
26   -
27   - multiPlotIntervalPanel : null,
28   -
29   - plotOutput: null,
30   -
31   - plotTabs : null,
32   -
33   - plotElement : null,
34   -
35   - constructor: function(config) {
36   - this.init(config);
37   - this.callParent(arguments);
38   - if (this.object)
39   - this.setObject(this.object);
40   - },
41   -
42   - setObject : function(object) {
43   - this.object = object;
44   - if (this.object.plots().count() == 0) {
45   - this.object.createNewPlot();
46   - }
47   - //this.plotOutput.setObject(this.object);
48   - this.plotTabs.setMultiplotObject(this.object);
49   - //this.timeSelector.intervalSel.setInterval(this.object.get('startDate'), this.object.get('stopDate'));
50   - //this.addTTs(this.object.get('timeTables'));
51   - },
  22 + formPanel: null,
  23 + plotTabs : null,
  24 +
  25 + constructor: function(config) {
  26 + this.init(config);
  27 + this.callParent(arguments);
  28 + if (this.object)
  29 + this.setObject(this.object);
  30 + },
  31 +
  32 + setObject : function(object) {
  33 + this.object = object;
  34 + if (this.object.plots().count() == 0) {
  35 + this.object.createNewPlot();
  36 + }
  37 + this.plotTabs.setMultiplotObject(this.object);
  38 + },
52 39  
53   - /**
54   - * overwrite metod called by Save button
55   - */
56   - overwriteProcess : function(btn)
57   - {
58   - if (btn == 'cancel') return;
59   -
60   - this.saveProcess(true);
61   - },
  40 + /**
  41 + * overwrite metod called by Save button
  42 + */
  43 + overwriteProcess : function(btn)
  44 + {
  45 + if (btn == 'cancel') return;
  46 + this.saveProcess(true);
  47 + },
62 48  
63 49  
64   - /**
65   - * save method called by Save button to launch the save process
66   - */
67   - saveProcess : function(toRename) {
  50 + /**
  51 + * save method called by Save button to launch the save process
  52 + */
  53 + saveProcess : function(toRename) {
68 54 var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
69 55 if (!plotModule)
70 56 return;
... ... @@ -156,11 +142,6 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
156 142 crtTimeSelector.addTT(newTTName,newTTid);
157 143 },
158 144  
159   - addTTs : function(TTarray) {
160   - // set TTTab
161   - this.timeSelector.setTTTab(TTarray);
162   - },
163   -
164 145 /**
165 146 * Set Start-Stop from parameter info (Local & MyData)
166 147 */
... ... @@ -189,25 +170,11 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
189 170 }
190 171 },
191 172  
192   - updatePlotTabName: function(tabId, name) {
193   - var me = this;
194   - this.object.tabs().each(function (tabObject) {
195   - if (tabId == tabObject.getId()) {
196   - tabObject.set('tab-name', name);
197   - me.plotTabs.updatePlotTabs();
198   - }
199   - });
200   - },
201   -
202 173 insertPlotTab : function(tabData) {
203 174 var newTab = this.object.createNewTab(tabData);
204 175 this.plotTabs.addPlotTab(newTab,true);
205 176 },
206 177  
207   - updateLinkedToMultiPlotMode : function(isLinkedToMultiPlotMode) {
208   - this.timeSelector.setVisible(isLinkedToMultiPlotMode);
209   - },
210   -
211 178 keepOnlySelectedTabInObject: function(showWarning, onSuccess) {
212 179 if (this.object.tabs().count() == 1) {
213 180 if (onSuccess) {
... ... @@ -328,19 +295,11 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
328 295 },
329 296  
330 297 init : function(config) {
331   - //this.timeSelector = new amdaUI.TimeSelectorUI( { id: 'multiPlotTimeSelector' + config.id, title : 'MultiPlot Time Selection', border : false, collapsible : true, collapseDirection : 'bottom', visible : false, flex: 2 } );
332   -
333   - //this.plotOutput = new amdaPlotComp.PlotOutputForm({flex: 2, collapseDirection : 'bottom', collapsible : true });
334   -
335   - //this.plotElement = new amdaPlotComp.PlotElementPanel({flex: 4});
336   -
337   - this.plotTabs = new amdaPlotComp.PlotTabPanel({flex: 4, plotUI : this});
  298 + this.plotTabs = new amdaPlotComp.PlotTabPanel({plotUI : this});
338 299  
339 300 this.formPanel = new Ext.form.Panel({
340 301 region: 'center',
341   - layout: {
342   -
343   - },
  302 + layout: 'fit',
344 303 bodyStyle: { background : '#dfe8f6' },
345 304 defaults: {
346 305 border: false
... ... @@ -392,110 +351,6 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
392 351 ]
393 352 });
394 353  
395   -
396   - /*this.optionsPanel = new Ext.form.Panel({
397   - layout: {
398   - type: 'vbox',
399   - pack: 'start',
400   - align: 'stretch'
401   - },
402   - bodyStyle: { background : '#dfe8f6' },
403   - defaults: {
404   - border: false
405   - },
406   - items: [
407   - this.plotElement,
408   - this.plotOutput
409   - ]
410   - });
411   -
412   - this.formPanel = new Ext.form.Panel({
413   - region: 'center',
414   - layout: {
415   - type: 'hbox',
416   - pack: 'start',
417   - align: 'stretch'
418   - },
419   - bodyStyle: { background : '#dfe8f6' },
420   - defaults: {
421   - border: false
422   - },
423   - items: [
424   - {
425   - xtype : 'panel',
426   - layout: {
427   - type: 'vbox',
428   - pack: 'start',
429   - align: 'stretch'
430   - },
431   - bodyStyle: { background : '#dfe8f6' },
432   - defaults: {
433   - border: false
434   - },
435   - flex: 1,
436   - items: [
437   - this.plotTabs,
438   - this.timeSelector // this.multiPlotIntervalPanel
439   - ]
440   - },
441   - {
442   - xtype : 'panel',
443   - layout: 'fit',
444   - bodyStyle: { background : '#dfe8f6' },
445   - defaults: {
446   - border: false
447   - },
448   - flex: 1,
449   - items: [
450   - this.optionsPanel
451   - ]
452   - }
453   - ],
454   - fbar: [
455   - {
456   - xtype: 'button',
457   - text: 'Plot',
458   - scope: this,
459   - handler: function(button) {
460   - this.doPlot();
461   - }
462   - },' ', {
463   - xtype: 'button',
464   - text: 'Get Data',
465   - scope: this,
466   - handler: function(button) {
467   - this.getDataProcess();
468   - }
469   - },' ', {
470   - xtype: 'button',
471   - text: 'Reset',
472   - scope: this,
473   - handler: function(button) {
474   - this.resetProcess();
475   - }
476   - },
477   - '->', '-', {
478   - xtype: 'splitbutton',
479   - text: 'Save All Tabs',
480   - menu: {
481   - items: [
482   - {
483   - text: 'Save Current Tab',
484   - scope: this,
485   - handler: function() {
486   - this.savePlotRequest(false);
487   - }
488   - },
489   - ]
490   - },
491   - scope: this,
492   - handler: function(button) {
493   - this.savePlotRequest(true);
494   - }
495   - }
496   - ]
497   - });*/
498   -
499 354 var myConf = {
500 355 layout: 'border',
501 356 items: [
... ...