Commit 8f85fbfa919e49dfd48b746d30280a85ffe51307

Authored by Benjamin Renard
1 parent 553dd634

Remove deprecated code (cf. #5281)

js/app/models/InteractiveNode.js
... ... @@ -462,7 +462,7 @@ Ext.define('amdaModel.InteractiveNode', {
462 462 },
463 463  
464 464 getTimeFromNode: function(node) {
465   -
  465 +console.log(node);
466 466 var startString = new String(node.get('globalStart'));
467 467 var stopString = new String(node.get('globalStop'));
468 468 var startDate = new Date(startString.replace(/\-/g,'\/').replace(/[T|Z]/g,' '));
... ... @@ -486,7 +486,7 @@ Ext.define('amdaModel.InteractiveNode', {
486 486 var newNode = Ext.create(amdaModel.PlotNode.$className, { object : request });
487 487 // edit newNode into Plot Module with node as contextNode
488 488 newNode.editInModule();
489   - if(node.get('globalStart') != 'depending on mission' && ( node.get('nodeType') == 'localParam' ||
  489 + if((node.get('globalStart') != null) && (node.get('globalStop') != null) && node.get('globalStart') != 'depending on mission' && ( node.get('nodeType') == 'localParam' ||
490 490 node.get('nodeType') == 'myDataParam' || node.get('nodeType') == 'remoteSimuParam')) {
491 491 module.getUiContent().setTimeFromData(node.getTimeFromNode(node));
492 492 }
... ...
js/app/views/DownloadUI.js
... ... @@ -78,7 +78,8 @@ Ext.define('amdaUI.DownloadUI', {
78 78 * Set Start-Stop from parameter info (Local & MyData)
79 79 */
80 80 setTimeFromData : function(obj) {
81   -
  81 + if (!obj.start || !obj.stop)
  82 + return;
82 83 var dateStart = new Date(obj.start.replace(/[T|Z]/g,' ').replace(/\-/g,'\/'));
83 84 var dateStop = new Date(obj.stop.replace(/[T|Z]/g,' ').replace(/\-/g,'\/'));
84 85  
... ...
js/app/views/PlotUI.js
... ... @@ -108,6 +108,7 @@ Ext.define('amdaUI.PlotUI', {
108 108 this.object.set('last-plotted-tab', this.plotTabs.getSelectedTabId());
109 109 }
110 110 var downObject = amdaModel.DownloadNode.decodeObject(this.object);
  111 +console.log(this.object);
111 112 amdaModel.DownloadNode.set('object',Ext.create('amdaModel.Download',downObject));
112 113 amdaModel.DownloadNode.editInModule();
113 114 },
... ... @@ -170,6 +171,8 @@ Ext.define('amdaUI.PlotUI', {
170 171 */
171 172 setTimeFromData : function(obj)
172 173 {
  174 + if (!obj.start || !obj.stop)
  175 + return;
173 176 var dateStart = new Date(obj.start.replace(/[T|Z]/g,' ').replace(/\-/g,'\/'));
174 177 var dateStop = new Date(obj.stop.replace(/[T|Z]/g,' ').replace(/\-/g,'\/'));
175 178  
... ... @@ -328,4 +331,4 @@ Ext.define('amdaUI.PlotUI', {
328 331 };
329 332 Ext.apply (this , Ext.apply (arguments, myConf));
330 333 }
331   -});
332 334 \ No newline at end of file
  335 +});
... ...
js/app/views/SearchUI.js
... ... @@ -105,6 +105,8 @@ Ext.define('amdaUI.SearchUI',
105 105 */
106 106 setTimeFromData : function(obj)
107 107 {
  108 + if (!obj.start || !obj.stop)
  109 + return;
108 110 var dateStart = new Date(obj.start.replace(/[T|Z]/g,' ').replace(/\-/g,'\/'));
109 111 var dateStop = new Date(obj.stop.replace(/[T|Z]/g,' ').replace(/\-/g,'\/'));
110 112  
... ...
js/app/views/TimeSelectorUI.js
... ... @@ -166,26 +166,15 @@ Ext.define('amdaUI.TimeSelectorUI',
166 166 {
167 167 if (!this.valid) return false;
168 168  
169   - var module = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.interactive_plot.id);
170   -
171   - if (module && module.multiSelector)
172   - {
173   - var targetWin = myDesktopApp.desktop.getWindow(myDesktopApp.dynamicModules.interactive_plot.id);
174   - targetWin.items.items[0].setTimeFromData({ start : data.records[0].get('globalStart'),
175   - stop : data.records[0].get('globalStop')});
176   - }
177   - else
178   - {
179   - var explorerModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.explorer.id);
180   - if (!explorerModule)
181   - return false;
182   - var targetModuleId = explorerModule.getPinedModule();
183   - var targetModule = myDesktopApp.getLoadedModule(targetModuleId);
184   - targetModule.getUiContent().setTimeFromData({ start : data.records[0].get('globalStart'),
185   - stop : data.records[0].get('globalStop')});
186   - me.updateDuration();
187   - }
188   - return true;
  169 + var explorerModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.explorer.id);
  170 + if (!explorerModule)
  171 + return false;
  172 + var targetModuleId = explorerModule.getPinedModule();
  173 + var targetModule = myDesktopApp.getLoadedModule(targetModuleId);
  174 + targetModule.getUiContent().setTimeFromData({ start : data.records[0].get('globalStart'),
  175 + stop : data.records[0].get('globalStop')});
  176 + me.updateDuration();
  177 + return true;
189 178 }
190 179 });
191 180 }
... ...