Commit 46bd4591f670b00dddb07b0db6ec8c1f82adc7f3

Authored by Hacene SI HADJ MOHAND
1 parent 67210d01

us ok

js/app/views/PlotComponents/PlotTabContent.js
... ... @@ -39,6 +39,7 @@ Ext.define('amdaPlotComp.PlotTabContent', {
39 39  
40 40 setTime : function(startDate, stopDate) {
41 41 this.timeSelector.intervalSel.setInterval(startDate, stopDate);
  42 + this.timeSelector.setActiveTimeSource(amdaModel.AmdaTimeObject.inputTimeSrc[1]);
42 43  
43 44 },
44 45 getTimeSelector: function(){
... ...
js/app/views/PlotTabResultUI.js
... ... @@ -520,6 +520,22 @@ Ext.define('amdaUI.PlotTabResultUI', {
520 520 this.callInteractivePlot({'action' : 'goto', 'interactiveId' : this.interactiveId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex});
521 521 }
522 522 },
  523 + '-',
  524 + {
  525 + text: 'Use This Time Inteval',
  526 + scope: this,
  527 + handler: function(){
  528 + var timeObj = new Object();
  529 + var startTime = new Date(this.crtContext.page.startTime*1000);
  530 + timeObj.start = Ext.Date.add(startTime, Ext.Date.MINUTE, startTime.getTimezoneOffset());
  531 +
  532 + var stopTime = new Date(this.crtContext.page.stopTime*1000);
  533 + timeObj.stop = Ext.Date.add(stopTime, Ext.Date.MINUTE, stopTime.getTimezoneOffset());
  534 +
  535 + var plotModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.plot.id);
  536 + plotModule.setTimeInterval(timeObj);
  537 + }
  538 + },
523 539 '-',
524 540 {
525 541 text: 'Go to Interval #',
... ...
js/app/views/TimeSelectorUI.js
... ... @@ -61,6 +61,9 @@ Ext.define('amdaUI.TimeSelectorUI', {
61 61 getActiveTimeSource: function() {
62 62 return this.timeSrc.getActiveTab().getItemId();
63 63 },
  64 + setActiveTimeSource : function (timeSrcIndex){
  65 + this.timeSrc.setActiveTab(timeSrcIndex);
  66 + },
64 67  
65 68 isValid: function(acceptEmptyTTList = true) {
66 69 if (this.getActiveTimeSource() === amdaModel.AmdaTimeObject.inputTimeSrc[0]) {
... ...