Commit c52f6913b366eb4766861b70b0a4eaa6b1fd5525

Authored by Benjamin Renard
2 parents 520baf1e 7bb1a47f

Merge branch 'develop' into amdadev

js/app/views/IntervalUI.js
... ... @@ -231,6 +231,7 @@ Ext.define('amdaUI.IntervalUI', {
231 231 // margin : '10 0 5 5', // (top, right, bottom, left).
232 232 name: fieldName,
233 233 width : 230,
  234 + id : fieldName+'id',
234 235 emptyText: 'YYYY/MM/DD hh:mm:ss.uuu',
235 236 tip: 'Date formatted as YYYY/MM/DD hh:mm:ss.uuu',
236 237 format: 'Y/m/d H:i:s.u',
... ...
js/app/views/PlotComponents/PlotPanelForm.js
... ... @@ -50,7 +50,12 @@ Ext.define('amdaPlotComp.PlotPanelForm', {
50 50 //Instant time visibility
51 51 var instantTimeField = this.getForm().findField('panel-instant-time');
52 52 instantTimeField.setVisible(plotType == 'instantPlot');
53   -
  53 + var startDate = Ext.getCmp('startDateid').getValue();
  54 + var stopDate = Ext.getCmp('stopDateid').getValue();
  55 + if(startDate <= stopDate ){
  56 + var interval = (stopDate-startDate)/2
  57 + instantTimeField.setValue(new Date(stopDate-interval));
  58 + }
54 59 //Options in relation with the layout
55 60 this.updateLayoutOptions(plotType);
56 61 },
... ... @@ -142,7 +147,7 @@ Ext.define(&#39;amdaPlotComp.PlotPanelForm&#39;, {
142 147 me.crtTree.refresh();
143 148 }),
144 149 this.addColorsPicker('panel-background-color', 'Background Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none'),
145   - this.addColorsPicker('panel-plotareabackground-color', 'Plot Area Background Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none'),
  150 + this.addColorsPicker('panel-plotareabackground-color', 'Plot Area Background Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none'),
146 151 this.addStandardFieldSet('Manual Bounds', '', boundsItems),
147 152 this.addStandardFieldSet('Manual Margins', '', marginItems),
148 153 this.addStandardFieldSet('Preferred Dimensions', '', preferedDimItems),
... ...