Commit 525485e0bff513588870bc752bc11e51a59538ed

Authored by Elena Budnik
2 parents 218521cf b70f8264

Merge branch 'upgrade-save-plot-requests' into 'master'

Upgrade save plot requests

See merge request !33
help/MinMaxThreshold 0 โ†’ 100644
... ... @@ -0,0 +1,5 @@
  1 +<h3>Min/Max Thresholds</h3>
  2 +Values out of Min/Max thresholds are not shown on the plot but this does not impact the X/Y axis range.
  3 +To have access to axis control you should uncheck <i>Simplified View</i> checkbox.
  4 +<br/>
  5 +
... ...
help/VerticalLayout 0 โ†’ 100644
... ... @@ -0,0 +1,18 @@
  1 +<h3>Implemented Layouts</h3>
  2 +
  3 + <i>Vertical</i> ( default ): vertical stack of panels;<br/>
  4 + all time panels are of the same width;<br/>
  5 + one XY panel in the line;<br/>
  6 + generic panel height (for Time and XY panel)<br/>
  7 + and width (for XY panel) can be defined at this level<br/><br/>
  8 +
  9 + <i>Auto</i> : automatic layout - if possible combines<br/>
  10 + several XY panels at the same level;
  11 + only panel height can be defined (XY panel is 'square')<br/><br/>
  12 +
  13 + <i>Manual</i> : everything is to be defined by user
  14 +
  15 + <hr>
  16 +Two generic panel types : 'Time/Epoch' and 'XY (Scatter/Instant)';
  17 +<br/>
  18 +
0 19 \ No newline at end of file
... ...
help/plotSaveRequest 0 โ†’ 100644
... ... @@ -0,0 +1,9 @@
  1 +<h3>Save Plot Request[s]</h3>
  2 +You can save you plot request to use it in the next AMDA sessions.
  3 +Two options are possible:
  4 +<ul>
  5 +<li>Save current active plot tab request only (<i>All Plot Tabs</i> checkbox <b>unchecked</b>)
  6 +<li>Save all the layout - all the plot tabs requests (<i>All Plot Tabs</i> checkbox <b>checked</b>)
  7 +</ul>
  8 +<br/>
  9 +
... ...
js/app/AmdaApp.js
... ... @@ -268,6 +268,33 @@ Ext.define(&#39;amdaApp.AmdaApp&#39;, {
268 268 });
269 269 },
270 270  
  271 + // add info icon; onCick AmdaHelp is shown
  272 + addAmdaInfo : function(help, style) {
  273 + if (style) {
  274 + help += '" style="' + style;
  275 + }
  276 + var html = '<img amda_clicktip="' + help + '" src="js/resources/images/16x16/info_mini.png"'
  277 + return {
  278 + xtype: 'label',
  279 + html: html,
  280 + listeners: {
  281 + click: {
  282 + element: 'el',
  283 + fn: function(e,t) {
  284 + var me = t,
  285 + text = me.getAttribute('amda_clicktip');
  286 + if (text) {
  287 + e.preventDefault();
  288 + AmdaAction.getInfo({name : text}, function(res,e) {
  289 + if (res.success) myDesktopApp.infoMsg(res.result);
  290 + });
  291 + }
  292 + }
  293 + }
  294 + }
  295 + };
  296 + },
  297 +
271 298 getModules : function(){
272 299 var allModules = [];
273 300  
... ...
js/app/models/InteractiveNode.js
... ... @@ -279,25 +279,23 @@ Ext.define(&#39;amdaModel.InteractiveNode&#39;, {
279 279 //TODO do we need this commission ???
280 280 // fix the modifications for object
281 281 this.get('object').commit();
  282 +
282 283 // if ownerTree panel is not active
283   - if (this.myGetOwnerTree().ownerCt.getActiveTab()!==this.myGetOwnerTree())
284   - {
  284 + if (this.myGetOwnerTree().ownerCt.getActiveTab()!==this.myGetOwnerTree()) {
285 285 // set ownerTree panel as the active tab - to enable selection of this node his ownerTree must have a view
286 286 this.myGetOwnerTree().ownerCt.setActiveTab(this.myGetOwnerTree());
287 287 }
288 288  
289 289 Ext.Msg.alert('Complete', 'New object '+this.get('object').get('name')+' has been created');
290 290 // expand the contextNode
291   - this.get('contextNode').expand(false, function()
292   - {
  291 + this.get('contextNode').expand(false, function() {
293 292 if (!this.get('contextNode').findChild('text',this.get('text'))) {
294 293 // create node in tree as child of contextNode
295 294 this.get('contextNode').appendChild(this);
296 295 }
297 296 // select the new node
298 297 this.myGetOwnerTree().getSelectionModel().select(this);
299   - if (opt)
300   - {
  298 + if (opt) {
301 299 var scope = opt.scope ? opt.scope : this;
302 300 if (opt.callback)
303 301 opt.callback.call(scope,'create');
... ...
js/app/models/PlotNode.js
... ... @@ -15,20 +15,15 @@
15 15  
16 16 Ext.define('amdaModel.PlotNode', {
17 17 extend: 'amdaModel.ExecutableNode',
18   -
19   - requires: [
20   - ],
21   -
  18 +
22 19 statics: {
23 20 nodeType: 'request'
24 21 },
25 22  
26 23 constructor : function(config){
27   -
28 24 this.callParent(arguments);
29 25 this.set('moduleId',myDesktopApp.dynamicModules.plot.id);
30 26 this.set('objectDataModel','amdaPlotObj.PlotRequestObject');
31   - this.set('ownerTreeId',amdaUI.ExplorerUI.OPE_TAB.TREE_ID);
32 27 this.set('nodeType',this.self.nodeType);
33 28 },
34 29  
... ...
js/app/models/PlotObjects/PlotRequestObject.js
... ... @@ -29,7 +29,9 @@ Ext.define(&#39;amdaPlotObj.PlotRequestObject&#39;, {
29 29 {name: 'file-prefix', type: 'string'},
30 30 {name: 'one-file-per-interval', type: 'boolean'},
31 31 {name: 'last-plotted-tab', type: 'int', defaultValue: 0},
32   - {name: 'last-tab-id', type: 'int', defaultValue: 0}
  32 + {name: 'last-tab-id', type: 'int', defaultValue: 0},
  33 + {name: 'active-tab-id', type: 'int', defaultValue: 1},
  34 + {name: 'all-in-one', type: 'boolean', defaultValue: false}
33 35 ],
34 36  
35 37 hasMany: {
... ... @@ -122,8 +124,10 @@ Ext.define(&#39;amdaPlotObj.PlotRequestObject&#39;, {
122 124 requestValues['one-file-per-interval'] = this.get('one-file-per-interval');
123 125 requestValues['last-plotted-tab'] = this.get('last-plotted-tab');
124 126 requestValues['name'] = this.get('name');
125   -
126   - requestValues['timesrc'] = this.get('timesrc');
  127 + requestValues['all-in-one'] = this.get('all-in-one');
  128 +
  129 + requestValues['timesrc'] = this.get('timesrc');
  130 +
127 131 // if there's at least one timeTable name into 'timeTables' collection
128 132 if (this.get('timesrc') == amdaModel.AmdaTimeObject.inputTimeSrc[0] && this.get('timeTables') && this.get('timeTables').length){
129 133 // get complete timeTables collection
... ... @@ -141,22 +145,34 @@ Ext.define(&#39;amdaPlotObj.PlotRequestObject&#39;, {
141 145 }
142 146 });
143 147 } else {
144   - requestValues['startDate'] = this.get('startDate');
145   - requestValues['stopDate'] = this.get('stopDate');
146   - requestValues['durationDay'] = this.get('durationDay');
147   - requestValues['durationHour'] = this.get('durationHour');
148   - requestValues['durationMin'] = this.get('durationMin');
149   - requestValues['durationSec'] = this.get('durationSec');
150   - }
151   -
152   - requestValues['tabs'] = [];
153   -
154   - this.tabs().each(function (tab, index) {
155   - requestValues['tabs'][index] = tab.getJsonValues();
156   - });
157   -
158   - requestValues['last-tab-id'] = this.get('last-tab-id');
  148 + requestValues['startDate'] = this.get('startDate');
  149 + requestValues['stopDate'] = this.get('stopDate');
  150 + requestValues['durationDay'] = this.get('durationDay');
  151 + requestValues['durationHour'] = this.get('durationHour');
  152 + requestValues['durationMin'] = this.get('durationMin');
  153 + requestValues['durationSec'] = this.get('durationSec');
  154 + }
159 155  
160   - return requestValues;
  156 + requestValues['tabs'] = [];
  157 +
  158 + if (this.get('all-in-one')) {
  159 + this.tabs().each(function (tab, index) {
  160 + requestValues['tabs'][index] = tab.getJsonValues();
  161 + });
  162 +
  163 + requestValues['active-tab-id'] = this.get('active-tab-id');
  164 + requestValues['last-tab-id'] = this.get('last-tab-id');
  165 + }
  166 + else {
  167 + var tab = this.tabs().getAt(this.get('active-tab-id')-1);
  168 + requestValues['tabs'][0] = tab.getJsonValues();
  169 +
  170 + requestValues['tabs'][0]['id'] = "1";
  171 + requestValues['active-tab-id'] = "1";
  172 + requestValues['last-tab-id'] = "1";
  173 + requestValues['last-plotted-tab'] = "0";
  174 + }
  175 +
  176 + return requestValues;
161 177 }
162 178 });
163 179 \ No newline at end of file
... ...
js/app/views/CatalogUI.js
... ... @@ -113,7 +113,7 @@ Ext.define(&#39;amdaUI.CatalogUI&#39;, {
113 113  
114 114 columns[0] = Ext.create('Ext.grid.column.RowNumberer', { width: 50,
115 115 renderer: function(value, metaData, record){
116   - var msg = record.index;
  116 + var msg = record.index + 1;
117 117 if (record.get('isNew') || record.get('isModified')) {
118 118 msg += ' *';
119 119 metaData.style = 'font-weight: bold'
... ...
js/app/views/PlotComponents/PlotBaseSerieForm.js
... ... @@ -90,12 +90,13 @@ Ext.define(&#39;amdaPlotComp.PlotBaseSerieForm&#39;, {
90 90 me.object.set('serie-yaxis', value);
91 91 me.crtTree.refresh();
92 92 }),
  93 + myDesktopApp.addAmdaInfo('MinMaxThreshold','vertical-align:bottom'),
93 94 this.addStandardFieldSet('Min/Max thresholds', '', this.getValuesRangeItems()),
94 95 this.addStandardParamDropTarget('serie-colored-param', 'Colored Parameter'),
95 96 this.addStandardFieldSet('Lines', 'serie-lines-activated', this.addStandardLineItems('serie-lines')),
96 97 this.addStandardFieldSet('Symbols', 'serie-symbols-activated', this.addStandardSymbolsItems('serie-symbols')),
97 98 this.addStandardFieldSet('Time ticks', 'serie-timetick-activated', this.getTimeTickItems()),
98   - this.addStandardFieldSet('Interval ticks', 'serie-intervaltick-activated', this.getIntervalTickItems())
  99 + this.addStandardFieldSet('Interval ticks', 'serie-intervaltick-activated', this.getIntervalTickItems())
99 100 ];
100 101 }
101 102 });
... ...
js/app/views/PlotComponents/PlotSpectroForm.js
... ... @@ -18,22 +18,23 @@ Ext.define(&#39;amdaPlotComp.PlotSpectroForm&#39;, {
18 18  
19 19 getValuesRangeItems: function() {
20 20 return [
21   - this.addStandardFloat2('spectro-value-min', 'Min value', -Number.MAX_VALUE, Number.MAX_VALUE, true),
22   - this.addStandardFloat2('spectro-value-max', 'Max value', -Number.MAX_VALUE, Number.MAX_VALUE, true)
  21 + this.addStandardFloat2('spectro-value-min', 'Min value', -Number.MAX_VALUE, Number.MAX_VALUE, true),
  22 + this.addStandardFloat2('spectro-value-max', 'Max value', -Number.MAX_VALUE, Number.MAX_VALUE, true)
23 23 ];
24 24 },
25 25  
26 26 getFormItems: function() {
27 27 var me = this;
28 28 return [
29   - this.addStandardCombo('spectro-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes, function(name, value, oldValue) {
30   - me.object.set('spectro-yaxis', value);
31   - me.crtTree.refresh();
32   - }),
33   - this.addStandardFieldSet('Min/Max thresholds', '', this.getValuesRangeItems()),
34   - this.addStandardCheck('spectro-log0-as-min', 'Show 0 values as Min Values in log scale', function(name, value, oldValue) {
35   - me.object.set('spectro-log0-as-min', value);
36   - })
  29 + this.addStandardCombo('spectro-yaxis', 'Y axis', amdaPlotObj.PlotObjectConfig.availableYAxes, function(name, value, oldValue) {
  30 + me.object.set('spectro-yaxis', value);
  31 + me.crtTree.refresh();
  32 + }),
  33 + myDesktopApp.addAmdaInfo('MinMaxThreshold','vertical-align:bottom'),
  34 + this.addStandardFieldSet('Min/Max thresholds', '', this.getValuesRangeItems()),
  35 + this.addStandardCheck('spectro-log0-as-min', 'Show 0 values as Min Values in log scale', function(name, value, oldValue) {
  36 + me.object.set('spectro-log0-as-min', value);
  37 + })
37 38 ];
38 39 }
39 40 });
... ...
js/app/views/PlotComponents/PlotTabPanel.js
... ... @@ -33,10 +33,14 @@ Ext.define(&#39;amdaPlotComp.PlotTabPanel&#39;, {
33 33 {
34 34 this.object = object;
35 35 this.removeAll();
36   - var isFirstTab = true;
37   - this.object.tabs().each(function (rec) {
38   - this.addPlotTab(rec, isFirstTab);
39   - isFirstTab = false;
  36 + var selectedTab = this.object.get('active-tab-id');
  37 +
  38 + this.object.tabs().each(function (rec, index) {
  39 + var isSelected = false;
  40 + if (index+1 == selectedTab)
  41 + isSelected = true;
  42 +
  43 + this.addPlotTab(rec, isSelected);
40 44 }, this);
41 45 },
42 46  
... ...
js/app/views/PlotTabResultUI.js
... ... @@ -313,7 +313,8 @@ Ext.define(&#39;amdaUI.PlotTabResultUI&#39;, {
313 313  
314 314 me.contextualMenu.add([
315 315 {
316   - text:'Extend/Shift Time request',
  316 + text:'Extend/Shift Time interval',
  317 + disabled : me.isTTNavBar,
317 318 handler : function ()
318 319 {
319 320 var extendShiftPlugin = this.getPlugin('plot-extendshift-plugin-id');
... ...
js/app/views/PlotUI.js
... ... @@ -32,6 +32,8 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
32 32  
33 33 plotElement : null,
34 34  
  35 + allPlots : false,
  36 +
35 37 constructor: function(config) {
36 38 this.init(config);
37 39 this.callParent(arguments);
... ... @@ -45,88 +47,81 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
45 47 this.plotTabs.setRequestObject(this.object);
46 48 this.timeSelector.intervalSel.setInterval(this.object.get('startDate'), this.object.get('stopDate'));
47 49 this.addTTs(this.object.get('timeTables'));
  50 + this.updateRequestOption(this.object.get('all-in-one'));
48 51 },
49 52  
50   - saveProcess : function() {
51   - var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
52   - if (!plotModule)
53   - return;
54   -
55   - this.updateObject();
56   -
57   - if ((this.object.get('id') != '') && (plotModule.linkedNode.get('text') == this.object.get('name')))
58   - //update existing request
59   - plotModule.linkedNode.update();
60   - else
61   - {
62   - var me = this;
63   - //Request Name validation
64   - plotModule.linkedNode.isValidName(this.object.get('name'), function (res) {
65   - if (!res)
66   - {
67   - myDesktopApp.errorMsg('Error during object validation');
68   - return;
69   - }
70   -
71   - if (!res.valid)
72   - {
73   - if (res.error)
74   - myDesktopApp.errorMsg(res.error);
75   - else
76   - myDesktopApp.errorMsg('Invalid object name');
77   - return;
78   - }
79   -
80   - //Save
81   - if (me.object.get('id') != '')
82   - {
83   - //Duplicate request
84   - plotModule.createLinkedNode();
85   - plotModule.linkedNode.set('object',me.object);
86   - }
87   - else
88   - {
89   - //Create new request
90   - }
91   - plotModule.linkedNode.create();
92   - });
93   - }
  53 + updateRequestOption : function(allInOne) {
  54 + var requestOptionCB = this.formPanel.getForm().findField('all-in-one');
  55 + requestOptionCB.setValue(allInOne);
  56 + },
  57 +
  58 + /**
  59 + * overwrite metod called by Save button
  60 + */
  61 + overwriteProcess : function(btn)
  62 + {
  63 + if (btn == 'cancel') return;
  64 +
  65 + this.saveProcess(true);
94 66 },
  67 +
  68 +
  69 + /**
  70 + * save method called by Save button to launch the save process
  71 + */
  72 + saveProcess : function(toRename) {
  73 + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
  74 + if (!plotModule)
  75 + return;
  76 +
  77 + if (toRename) {
  78 + plotModule.linkedNode.set('object',this.object);
  79 + plotModule.linkedNode.update();
  80 + }
  81 + else {
  82 + //Save
  83 + if (this.object.get('id') != '') {
  84 + //Duplicate request
  85 + plotModule.createLinkedNode();
  86 + plotModule.linkedNode.set('object',this.object);
  87 + }
  88 + plotModule.linkedNode.create();
  89 + }
  90 + },
95 91  
96   - resetProcess : function(){
97   - var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
  92 + resetProcess : function(){
  93 + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
98 94 plotModule.createLinkedNode();
99 95 plotModule.createObject();
100 96 this.setObject(plotModule.linkedNode.get('object'));
101   - },
  97 + },
102 98  
103   - getDataProcess : function(){
  99 + getDataProcess : function(){
104 100 this.updateObject();
105 101 // plot was not called - form only
106   - if (this.object.get('last-plotted-tab') == 0)
107   - {
  102 + if (this.object.get('last-plotted-tab') == 0) {
108 103 this.object.set('last-plotted-tab', this.plotTabs.getSelectedTabId());
109 104 }
110   - var downObject = amdaModel.DownloadNode.decodeObject(this.object);
111   - amdaModel.DownloadNode.set('object',Ext.create('amdaModel.Download',downObject));
112   - amdaModel.DownloadNode.editInModule();
113   - },
  105 + var downObject = amdaModel.DownloadNode.decodeObject(this.object);
  106 + amdaModel.DownloadNode.set('object',Ext.create('amdaModel.Download',downObject));
  107 + amdaModel.DownloadNode.editInModule();
  108 + },
114 109  
115   - addParameter : function(node){
116   - var crtTree = this.plotTabs.getTreeFromPlotTab(this.plotTabs.getActiveTab());
117   - crtTree.dropRecord(node,null,'append');
118   - },
  110 + addParameter : function(node){
  111 + var crtTree = this.plotTabs.getTreeFromPlotTab(this.plotTabs.getActiveTab());
  112 + crtTree.dropRecord(node,null,'append');
  113 + },
119 114  
120 115 /**
121 116 * plot method called by 'Do Plot' button to launch the plot process
122 117 */
123   - doPlot : function(){
124   - this.updateObject();
125   - this.object.set('last-plotted-tab', this.plotTabs.getSelectedTabId());
126   - var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
127   - if (plotModule)
128   - plotModule.linkedNode.execute();
129   - },
  118 + doPlot : function(){
  119 + this.updateObject();
  120 + this.object.set('last-plotted-tab', this.plotTabs.getSelectedTabId());
  121 + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
  122 + if (plotModule)
  123 + plotModule.linkedNode.execute();
  124 + },
130 125  
131 126 /**
132 127 * Check if changes were made before closing window
... ... @@ -140,19 +135,19 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
140 135 return this.object.isDirty();
141 136 },
142 137  
143   - /**
144   - * update this.object from form
145   - */
146   - updateObject : function(){
147   - var timeSource = this.timeSelector.getActiveTimeSource();
148   - // var multiPlotForm = this.multiPlotIntervalPanel.getForm();
  138 + /**
  139 + * update time selector of this.object from form
  140 + */
  141 + updateObject : function(){
  142 + var timeSource = this.timeSelector.getActiveTimeSource();
  143 +
149 144 var multiPlotForm = this.timeSelector.getForm();
150   - multiPlotForm.updateRecord(this.object);
151   - this.object.set('timesrc', timeSource);
152   - if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0])
153   - this.object.set('timeTables',this.timeSelector.TTGrid.getStore().data.items);
154   - this.plotTabs.updateTimeObject();
155   - },
  145 + multiPlotForm.updateRecord(this.object);
  146 + this.object.set('timesrc', timeSource);
  147 + if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0])
  148 + this.object.set('timeTables',this.timeSelector.TTGrid.getStore().data.items);
  149 + this.plotTabs.updateTimeObject();
  150 + },
156 151  
157 152 addTT : function(newTTName,newTTid,timeSelectorId) {
158 153 var crtTimeSelector = Ext.getCmp(timeSelectorId);
... ... @@ -183,8 +178,7 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
183 178 this.timeSelector.intervalSel.setInterval(dateStart, dateStop);
184 179 },
185 180  
186   - updateLinkedToMultiPlotMode : function(isLinkedToMultiPlotMode) {
187   - // this.multiPlotIntervalPanel.setVisible(isLinkedToMultiPlotMode);
  181 + updateLinkedToMultiPlotMode : function(isLinkedToMultiPlotMode) {
188 182 this.timeSelector.setVisible(isLinkedToMultiPlotMode);
189 183 },
190 184  
... ... @@ -213,20 +207,6 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
213 207 ]
214 208 });
215 209  
216   -// this.multiPlotIntervalPanel = new Ext.form.Panel({
217   -// flex: 2,
218   -// layout: 'fit',
219   -// bodyStyle: { background : '#dfe8f6' },
220   -// visible : false,
221   -// collapsible : true,
222   -// defaults: {
223   -// border: false
224   -// },
225   -// items : [
226   -// this.timeSelector
227   -// ]
228   -// });
229   -
230 210 this.formPanel = new Ext.form.Panel({
231 211 region: 'center',
232 212 layout: {
... ... @@ -269,66 +249,116 @@ Ext.define(&#39;amdaUI.PlotUI&#39;, {
269 249 ]
270 250 }
271 251 ],
272   - fbar: [
273   - {
274   - xtype: 'button',
275   - text: 'Plot',
276   - scope: this,
277   - handler: function(button) {
278   - this.doPlot();
279   - }
280   - },
281   - ' ',
282   - {
283   - xtype: 'button',
284   - text: 'Get Data',
285   - scope: this,
286   - handler: function(button) {
287   - this.getDataProcess();
288   - }
289   - },
290   - ' ',
291   - {
292   - xtype: 'button',
293   - text: 'Reset',
294   - scope: this,
295   - handler: function(button) {
296   - this.resetProcess();
297   - }
298   - },
299   - '->',
300   - {
301   - xtype: 'button',
302   - text: 'Save Request',
303   - scope: this,
304   - handler: function(button) {
305   - this.saveProcess();
306   - }
307   - }
  252 + fbar: [{
  253 + xtype: 'button',
  254 + text: 'Plot',
  255 + scope: this,
  256 + handler: function(button) {
  257 + this.doPlot();
  258 + }
  259 + },' ', {
  260 + xtype: 'button',
  261 + text: 'Get Data',
  262 + scope: this,
  263 + handler: function(button) {
  264 + this.getDataProcess();
  265 + }
  266 + },' ', {
  267 + xtype: 'button',
  268 + text: 'Reset',
  269 + scope: this,
  270 + handler: function(button) {
  271 + this.resetProcess();
  272 + }
  273 + },
  274 + '->', '-', {
  275 + xtype: 'button',
  276 + text: 'Save Request',
  277 + scope: this,
  278 + handler: function(button) {
  279 + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
  280 + if (!plotModule)
  281 + return;
  282 +
  283 + this.updateObject();
  284 + this.object.set('active-tab-id', this.plotTabs.getSelectedTabId());
  285 + this.object.set('all-in-one', this.allPlots);
  286 +
  287 + //update existing request
  288 + if ((this.object.get('id') != '') &&
  289 + (plotModule.linkedNode.get('text') == this.object.get('name')))
  290 + plotModule.linkedNode.update();
  291 + else {
  292 + var me = this;
  293 + plotModule.linkedNode.isValidName(this.object.get('name'), function (res) {
  294 + if (!res) {
  295 + myDesktopApp.errorMsg('Error during object validation');
  296 + return;
  297 + }
  298 + if (!res.valid) {
  299 + if (res.error) {
  300 + if (res.error.search('subtree') != -1) {
  301 + Ext.Msg.show( { title : 'Warning',
  302 + msg: res.error + '<br/>Do you want to overwrite it?',
  303 + width: 300,
  304 + buttons: Ext.Msg.OKCANCEL,
  305 + icon: Ext.Msg.WARNING,
  306 + fn : me.overwriteProcess,
  307 + scope : me
  308 + });
  309 + }
  310 + else {
  311 + myDesktopApp.errorMsg(res.error);
  312 + }
  313 + }
  314 + else {
  315 + myDesktopApp.errorMsg('Invalid object name');
  316 + }
  317 +
  318 + return;
  319 + }
  320 + me.saveProcess(false);
  321 + })
  322 + }
  323 + }
  324 + }, ' ',
  325 + myDesktopApp.addAmdaInfo('plotSaveRequest'),
  326 + ' ', {
  327 + xtype: 'checkbox',
  328 + boxLabel: 'All Plot Tabs',
  329 + name : 'all-in-one',
  330 + listeners : {
  331 + scope: this,
  332 + change: function (cb, nv, ov) {
  333 + this.allPlots = nv;
  334 + }
  335 + }
  336 + }
308 337 ]
309 338 });
310   -
  339 +
311 340 var myConf = {
312   - layout: 'border',
313   - items: [
314   - this.formPanel,
315   - {
316   - xtype: 'panel',
317   - region: 'south',
318   - title: 'Information',
319   - collapsible: true,
320   - collapseMode: 'header',
321   - height: 100,
322   - autoHide: false,
323   - bodyStyle: 'padding:5px',
324   - iconCls: 'icon-information',
325   - loader: {
326   - autoLoad: true,
327   - url: helpDir+'plotHOWTO'
328   - }
329   - }
330   - ]
  341 + layout: 'border',
  342 + items: [
  343 + this.formPanel,
  344 + {
  345 + xtype: 'panel',
  346 + region: 'south',
  347 + title: 'Information',
  348 + collapsible: true,
  349 + collapseMode: 'header',
  350 + height: 100,
  351 + autoHide: false,
  352 + bodyStyle: 'padding:5px',
  353 + iconCls: 'icon-information',
  354 + loader: {
  355 + autoLoad: true,
  356 + url: helpDir+'plotHOWTO'
  357 + }
  358 + }
  359 + ]
331 360 };
332   - Ext.apply (this , Ext.apply (arguments, myConf));
  361 +
  362 + Ext.apply(this, Ext.apply(arguments, myConf));
333 363 }
334 364 });
... ...
js/app/views/TimeTableUI.js
... ... @@ -454,7 +454,7 @@ Ext.define(&#39;amdaUI.TimeTableUI&#39;, {
454 454 xtype: 'rownumberer',
455 455 width: 50,
456 456 renderer: function(value, metaData, record, row, col, store, gridView){
457   - var msg = record.index;
  457 + var msg = record.index + 1;
458 458 if (record.get('isNew') || record.get('isModified'))
459 459 {
460 460 msg += ' *';
... ...