Commit b39c9d1d675cd2373ed062d1eaa4ca55d76aa2a5
1 parent
d29f5012
Exists in
master
and in
96 other branches
Fix interactive navigation
Showing
7 changed files
with
40 additions
and
48 deletions
Show diff stats
js/app/controllers/PlotModule.js
... | ... | @@ -62,7 +62,6 @@ Ext.define('amdaDesktop.PlotModule', { |
62 | 62 | var me = this; |
63 | 63 | |
64 | 64 | |
65 | - console.log(session.result); | |
66 | 65 | Ext.each(session.result, function (tabResult, index) { |
67 | 66 | if (logExecTime && tabResult.exectime) |
68 | 67 | { |
... | ... | @@ -75,7 +74,7 @@ Ext.define('amdaDesktop.PlotModule', { |
75 | 74 | folder : session.folder, |
76 | 75 | plotFile : tabResult.plot, |
77 | 76 | context : tabResult.context, |
78 | - tabId : tabResult.id | |
77 | + interactiveId : tabResult.id | |
79 | 78 | }; |
80 | 79 | me.updatePreview(plotPreviewConfig); |
81 | 80 | return; |
... | ... | @@ -89,7 +88,7 @@ Ext.define('amdaDesktop.PlotModule', { |
89 | 88 | folder : session.folder, |
90 | 89 | plotFile : tabResult.plot, |
91 | 90 | context : tabResult.context, |
92 | - tabId : tabResult.id, | |
91 | + interactiveId : tabResult.id, | |
93 | 92 | isInterval: tabResult.isInterval, |
94 | 93 | ttName : tabResult.ttName, |
95 | 94 | ttIndex : tabResult.ttIndex, |
... | ... |
js/app/views/PlotComponents/PlotExtendShiftPlug.js
... | ... | @@ -21,7 +21,7 @@ Ext.define('amdaPlotComp.PlotExtendShiftPlug', { |
21 | 21 | id: 'plot-extendshift-plug', |
22 | 22 | win : null, |
23 | 23 | form : null, |
24 | - tabId : '', | |
24 | + interactiveId : '', | |
25 | 25 | |
26 | 26 | constructor: function(config) { |
27 | 27 | Ext.apply(this, config); |
... | ... | @@ -39,7 +39,7 @@ Ext.define('amdaPlotComp.PlotExtendShiftPlug', { |
39 | 39 | /** |
40 | 40 | * creation of the window |
41 | 41 | */ |
42 | - show : function(tabId) { | |
42 | + show : function(interactiveId) { | |
43 | 43 | if (!this.win) |
44 | 44 | { |
45 | 45 | this.win = new Ext.Window({ |
... | ... | @@ -77,7 +77,7 @@ Ext.define('amdaPlotComp.PlotExtendShiftPlug', { |
77 | 77 | Ext.PluginManager.register(this); |
78 | 78 | } |
79 | 79 | |
80 | - this.tabId = tabId; | |
80 | + this.interactiveId = interactiveId; | |
81 | 81 | this.win.show(); |
82 | 82 | this.win.setPosition(0,0); |
83 | 83 | }, |
... | ... | @@ -111,7 +111,7 @@ Ext.define('amdaPlotComp.PlotExtendShiftPlug', { |
111 | 111 | var durationUnitField = this.form.getForm().findField('durationUnit'); |
112 | 112 | var duration = this.toSec(durationField.getValue(), durationUnitField.getValue()); |
113 | 113 | if (duration) { |
114 | - this.hostCmp.callInteractivePlot({'action' : actionType, 'tabId' : this.tabId, 'duration' : duration}); | |
114 | + this.hostCmp.callInteractivePlot({'action' : actionType, 'interactiveId' : this.interactiveId, 'duration' : duration}); | |
115 | 115 | } |
116 | 116 | else |
117 | 117 | myDesktopApp.errorMsg('No duration defined'); |
... | ... | @@ -190,4 +190,4 @@ Ext.define('amdaPlotComp.PlotExtendShiftPlug', { |
190 | 190 | }); |
191 | 191 | return this.form; |
192 | 192 | } |
193 | -}); | |
194 | 193 | \ No newline at end of file |
194 | +}); | |
... | ... |
js/app/views/PlotComponents/PlotPreviewUI.js
... | ... | @@ -80,7 +80,7 @@ Ext.define('amdaPlotComp.PlotPreviewUI', { |
80 | 80 | var me = this; |
81 | 81 | |
82 | 82 | this.crtContext = configResult.context; |
83 | - this.tabId = configResult.tabId; | |
83 | + this.interactiveId = configResult.interactiveId; | |
84 | 84 | |
85 | 85 | this.sliderPage = new Ext.slider.Single({ |
86 | 86 | width: 130, |
... | ... | @@ -136,7 +136,7 @@ Ext.define('amdaPlotComp.PlotPreviewUI', { |
136 | 136 | me.hiddenForm.getForm().submit({ |
137 | 137 | params: { |
138 | 138 | sessionId: sessionID, |
139 | - tabId : me.tabId, | |
139 | + interactiveId : me.interactiveId, | |
140 | 140 | preview: true |
141 | 141 | }, |
142 | 142 | success: function(form, action) {}, |
... | ... |
js/app/views/PlotComponents/PlotTabPanel.js
... | ... | @@ -111,13 +111,6 @@ Ext.define('amdaPlotComp.PlotTabPanel', { |
111 | 111 | return plotTab.child().treePlot; |
112 | 112 | }, |
113 | 113 | |
114 | - getSelectedTabId: function() | |
115 | - { | |
116 | - if (this.getActiveTab()) | |
117 | - return this.getActiveTab().child().tabId; | |
118 | - return 0; | |
119 | - }, | |
120 | - | |
121 | 114 | init : function(config) { |
122 | 115 | var me = this; |
123 | 116 | |
... | ... |
js/app/views/PlotComponents/PlotZoomPlug.js
... | ... | @@ -26,7 +26,7 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { |
26 | 26 | win: null, |
27 | 27 | form: null, |
28 | 28 | zoomType: '', |
29 | - tabId: '', | |
29 | + interactiveId: '', | |
30 | 30 | panelId: -1, |
31 | 31 | |
32 | 32 | linkedTTCatNode: null, |
... | ... | @@ -101,7 +101,7 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { |
101 | 101 | /** |
102 | 102 | * creation of the window |
103 | 103 | */ |
104 | - show: function (tabId, zoomType, panelId) { | |
104 | + show: function (interactiveId, zoomType, panelId) { | |
105 | 105 | if (!this.win) { |
106 | 106 | this.win = new Ext.Window({ |
107 | 107 | id: 'plot-zoom-win-' + this.hostCmp.ownerCt.getId(), // Plot window ID |
... | ... | @@ -136,7 +136,7 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { |
136 | 136 | Ext.PluginManager.register(this); |
137 | 137 | } |
138 | 138 | |
139 | - this.tabId = tabId; | |
139 | + this.interactiveId = interactiveId; | |
140 | 140 | this.updateWinByType(zoomType, panelId); |
141 | 141 | this.win.show(); |
142 | 142 | this.win.setPosition(0, 0); |
... | ... | @@ -407,7 +407,7 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { |
407 | 407 | |
408 | 408 | this.hostCmp.callInteractivePlot({ |
409 | 409 | 'action': 'zoom', |
410 | - 'tabId': this.tabId, | |
410 | + 'interactiveId': this.interactiveId, | |
411 | 411 | 'panelId': this.panelId, |
412 | 412 | 'axeId': this.zoomType, |
413 | 413 | 'min': minZoom, |
... | ... | @@ -423,7 +423,7 @@ Ext.define('amdaPlotComp.PlotZoomPlug', { |
423 | 423 | handler: function () { |
424 | 424 | this.hostCmp.callInteractivePlot({ |
425 | 425 | 'action': 'undozoom', |
426 | - 'tabId': this.tabId, | |
426 | + 'interactiveId': this.interactiveId, | |
427 | 427 | 'panelId': this.panelId, |
428 | 428 | 'axeId': this.zoomType |
429 | 429 | }); |
... | ... |
js/app/views/PlotTabResultUI.js
... | ... | @@ -22,7 +22,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
22 | 22 | |
23 | 23 | panelImage : null, |
24 | 24 | crtContext : null, |
25 | - tabId : '', | |
25 | + interactiveId : '', | |
26 | 26 | navToolBar : null, |
27 | 27 | isTTNavBar : false, |
28 | 28 | crtTTFileIndex : 0, |
... | ... | @@ -140,7 +140,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
140 | 140 | me.contextualMenu.add({ |
141 | 141 | text:'Zoom on Time Axis', |
142 | 142 | handler : function(item, e) { |
143 | - zoomPlugin.show(me.tabId, axis.id, panelContext.id); | |
143 | + zoomPlugin.show(me.interactiveId, axis.id, panelContext.id); | |
144 | 144 | zoomPlugin.resetMinMaxValue(); |
145 | 145 | me.panelImage.startZoom(true, 0/*me.toPixelOnResultImage(panelContext.y)*/, size.height /*me.toPixelOnResultImage(panelContext.height)*/, onMinTimeSelection, onMaxTimeSelection); |
146 | 146 | }, |
... | ... | @@ -149,7 +149,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
149 | 149 | insertIntervalItem = { |
150 | 150 | text:'Insert Interval in TimeTable or Catalog', |
151 | 151 | handler : function(item, e) { |
152 | - zoomPlugin.show(me.tabId, axis.id, panelContext.id); | |
152 | + zoomPlugin.show(me.interactiveId, axis.id, panelContext.id); | |
153 | 153 | zoomPlugin.resetMinMaxValue(); |
154 | 154 | me.panelImage.startZoom(true, 0/*me.toPixelOnResultImage(panelContext.y)*/, size.height /*me.toPixelOnResultImage(panelContext.height)*/, onMinTimeSelection, onMaxTimeSelection); |
155 | 155 | }, |
... | ... | @@ -160,7 +160,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
160 | 160 | me.contextualMenu.add({ |
161 | 161 | text:'Zoom on Y Left Axis', |
162 | 162 | handler : function(item, e) { |
163 | - zoomPlugin.show(me.tabId, axis.id, panelContext.id); | |
163 | + zoomPlugin.show(me.interactiveId, axis.id, panelContext.id); | |
164 | 164 | zoomPlugin.resetMinMaxValue(); |
165 | 165 | me.panelImage.startZoom(false, me.toPixelOnResultImage(panelContext.x), me.toPixelOnResultImage(panelContext.width), onMinYValueSelection, onMaxYValueSelection); |
166 | 166 | } |
... | ... | @@ -170,7 +170,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
170 | 170 | me.contextualMenu.add({ |
171 | 171 | text:'Zoom on Y Right Axis', |
172 | 172 | handler : function(item, e) { |
173 | - zoomPlugin.show(me.tabId, axis.id, panelContext.id); | |
173 | + zoomPlugin.show(me.interactiveId, axis.id, panelContext.id); | |
174 | 174 | zoomPlugin.resetMinMaxValue(); |
175 | 175 | me.panelImage.startZoom(false, me.toPixelOnResultImage(panelContext.x), me.toPixelOnResultImage(panelContext.width), onMinYValueSelection, onMaxYValueSelection); |
176 | 176 | } |
... | ... | @@ -180,7 +180,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
180 | 180 | me.contextualMenu.add({ |
181 | 181 | text:'Zoom on X Axis', |
182 | 182 | handler : function(item, e) { |
183 | - zoomPlugin.show(me.tabId, axis.id, panelContext.id); | |
183 | + zoomPlugin.show(me.interactiveId, axis.id, panelContext.id); | |
184 | 184 | zoomPlugin.resetMinMaxValue(); |
185 | 185 | me.panelImage.startZoom(true, me.toPixelOnResultImage(panelContext.y), me.toPixelOnResultImage(panelContext.height), onMinXValueSelection, onMaxXValueSelection); |
186 | 186 | } |
... | ... | @@ -305,7 +305,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
305 | 305 | var crtTimestamp = amdaPlotComp.PlotContextManager.toAxisValue(timeAxisContext, panel.plotArea.x, panel.plotArea.x+panel.plotArea.width, sourceXPos); |
306 | 306 | var crtTime = new Date(crtTimestamp*1000); |
307 | 307 | crtTime = Ext.Date.add(crtTime, Ext.Date.MINUTE, crtTime.getTimezoneOffset()); |
308 | - me.callInteractivePlot({'action' : 'instant', 'tabId' : this.tabId, 'panelId' : panel.id, 'time' : crtTime}); | |
308 | + me.callInteractivePlot({'action' : 'instant', 'interactiveId' : this.interactiveId, 'panelId' : panel.id, 'time' : crtTime}); | |
309 | 309 | }, |
310 | 310 | scope: me |
311 | 311 | }, |
... | ... | @@ -326,7 +326,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
326 | 326 | handler : function () |
327 | 327 | { |
328 | 328 | var extendShiftPlugin = this.getPlugin('plot-extendshift-plugin-id'); |
329 | - extendShiftPlugin.show(me.tabId); | |
329 | + extendShiftPlugin.show(me.interactiveId); | |
330 | 330 | }, |
331 | 331 | scope: me |
332 | 332 | }, |
... | ... | @@ -351,7 +351,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
351 | 351 | me.hiddenForm.getForm().submit({ |
352 | 352 | params: { |
353 | 353 | sessionId: sessionID, |
354 | - tabId : me.tabId | |
354 | + interactiveId : me.interactiveId | |
355 | 355 | }, |
356 | 356 | success: function(form, action) {}, |
357 | 357 | failure: function(form, action) {} |
... | ... | @@ -394,15 +394,15 @@ Ext.define('amdaUI.PlotTabResultUI', { |
394 | 394 | if (!this.navToolBar) |
395 | 395 | return; |
396 | 396 | |
397 | - var ttNameField = this.navToolBar.items.get('tt-table-'+this.tabId); | |
397 | + var ttNameField = this.navToolBar.items.get('tt-table-'+this.interactiveId); | |
398 | 398 | if (ttNameField) |
399 | 399 | ttNameField.setValue(this.crtContext.page.ttName); |
400 | 400 | |
401 | - var ttNumberField = this.navToolBar.items.get('tt-number-'+this.tabId); | |
401 | + var ttNumberField = this.navToolBar.items.get('tt-number-'+this.interactiveId); | |
402 | 402 | if (ttNumberField) |
403 | 403 | ttNumberField.setValue(this.crtContext.page.ttIndex + 1); |
404 | 404 | |
405 | - var ttTotalField = this.navToolBar.items.get('tt-total-'+this.tabId); | |
405 | + var ttTotalField = this.navToolBar.items.get('tt-total-'+this.interactiveId); | |
406 | 406 | if (ttTotalField) |
407 | 407 | ttTotalField.setValue(this.crtContext.page.ttNbIntervals); |
408 | 408 | }, |
... | ... | @@ -484,7 +484,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
484 | 484 | } |
485 | 485 | else |
486 | 486 | --ttintervalIndex; |
487 | - this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); | |
487 | + this.callInteractivePlot({'action' : 'goto', 'interactiveId' : this.interactiveId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); | |
488 | 488 | } |
489 | 489 | }, |
490 | 490 | '-', |
... | ... | @@ -503,7 +503,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
503 | 503 | else |
504 | 504 | ++ttintervalIndex; |
505 | 505 | |
506 | - this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); | |
506 | + this.callInteractivePlot({'action' : 'goto', 'interactiveId' : this.interactiveId, 'ttFileIndex' : ttFileIndex, 'intIndex' : ttintervalIndex}); | |
507 | 507 | } |
508 | 508 | }, |
509 | 509 | '-', |
... | ... | @@ -511,17 +511,17 @@ Ext.define('amdaUI.PlotTabResultUI', { |
511 | 511 | text: 'Go to Interval #', |
512 | 512 | scope: this, |
513 | 513 | handler: function(bt){ |
514 | - var ttGotoNumberField = this.navToolBar.items.get('tt-goto-number-'+this.tabId); | |
514 | + var ttGotoNumberField = this.navToolBar.items.get('tt-goto-number-'+this.interactiveId); | |
515 | 515 | var goToIndex = ttGotoNumberField.getValue() - 1; |
516 | 516 | if ((goToIndex < 0) || (goToIndex >= this.crtContext.page.ttNbIntervals)) |
517 | 517 | myDesktopApp.errorMsg('This interval number is outside of the current timeTable'); |
518 | 518 | else |
519 | - this.callInteractivePlot({'action' : 'goto', 'tabId' : this.tabId, 'ttFileIndex' : this.crtTTFileIndex, 'intIndex' : goToIndex}); | |
519 | + this.callInteractivePlot({'action' : 'goto', 'interactiveId' : this.interactiveId, 'ttFileIndex' : this.crtTTFileIndex, 'intIndex' : goToIndex}); | |
520 | 520 | } |
521 | 521 | }, |
522 | 522 | { |
523 | 523 | xtype: 'numberfield', |
524 | - id : 'tt-goto-number-'+this.tabId, | |
524 | + id : 'tt-goto-number-'+this.interactiveId, | |
525 | 525 | hideTrigger: true, |
526 | 526 | width: 50, |
527 | 527 | minValue: 1 |
... | ... | @@ -531,7 +531,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
531 | 531 | ' ', |
532 | 532 | { |
533 | 533 | xtype: 'textfield', |
534 | - id: 'tt-table-'+this.tabId, | |
534 | + id: 'tt-table-'+this.interactiveId, | |
535 | 535 | labelAlign: 'right', |
536 | 536 | labelWidth: 30, |
537 | 537 | fieldLabel: 'Table', |
... | ... | @@ -540,7 +540,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
540 | 540 | }, |
541 | 541 | { |
542 | 542 | xtype: 'textfield', |
543 | - id: 'tt-number-'+this.tabId, | |
543 | + id: 'tt-number-'+this.interactiveId, | |
544 | 544 | labelAlign: 'right', |
545 | 545 | labelWidth: 30, |
546 | 546 | fieldLabel: 'Int #', |
... | ... | @@ -549,7 +549,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
549 | 549 | }, |
550 | 550 | { |
551 | 551 | xtype: 'textfield', |
552 | - id: 'tt-total-'+this.tabId, | |
552 | + id: 'tt-total-'+this.interactiveId, | |
553 | 553 | labelAlign: 'right', |
554 | 554 | labelWidth: 30, |
555 | 555 | fieldLabel: 'Total', |
... | ... | @@ -564,7 +564,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
564 | 564 | text: 'Backward', |
565 | 565 | scope: this, |
566 | 566 | handler: function(){ |
567 | - this.callInteractivePlot({'action' : 'backward', 'tabId' : this.tabId}); | |
567 | + this.callInteractivePlot({'action' : 'backward', 'interactiveId' : this.interactiveId}); | |
568 | 568 | } |
569 | 569 | }, |
570 | 570 | '-', |
... | ... | @@ -572,7 +572,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
572 | 572 | text: '1/2 Backward', |
573 | 573 | scope: this, |
574 | 574 | handler: function(){ |
575 | - this.callInteractivePlot({'action' : 'halfbackward', 'tabId' : this.tabId}); | |
575 | + this.callInteractivePlot({'action' : 'halfbackward', 'interactiveId' : this.interactiveId}); | |
576 | 576 | } |
577 | 577 | }, |
578 | 578 | '-', |
... | ... | @@ -580,7 +580,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
580 | 580 | text: '1/2 Forward', |
581 | 581 | scope: this, |
582 | 582 | handler: function(){ |
583 | - this.callInteractivePlot({'action' : 'halfforward', 'tabId' : this.tabId}); | |
583 | + this.callInteractivePlot({'action' : 'halfforward', 'interactiveId' : this.interactiveId}); | |
584 | 584 | } |
585 | 585 | }, |
586 | 586 | '-', |
... | ... | @@ -588,7 +588,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
588 | 588 | text: 'Forward', |
589 | 589 | scope: this, |
590 | 590 | handler: function(){ |
591 | - this.callInteractivePlot({'action' : 'forward', 'tabId' : this.tabId}); | |
591 | + this.callInteractivePlot({'action' : 'forward', 'interactiveId' : this.interactiveId}); | |
592 | 592 | } |
593 | 593 | }]; |
594 | 594 | } |
... | ... | @@ -618,7 +618,7 @@ Ext.define('amdaUI.PlotTabResultUI', { |
618 | 618 | |
619 | 619 | init: function(configResult){ |
620 | 620 | this.crtContext = configResult.context; |
621 | - this.tabId = configResult.tabId; | |
621 | + this.interactiveId = configResult.interactiveId; | |
622 | 622 | |
623 | 623 | this.coordinatesField = new Ext.toolbar.TextItem({ |
624 | 624 | width: 300, |
... | ... |
php/config.php
... | ... | @@ -183,7 +183,7 @@ $API = array( |
183 | 183 | //AKKA - New action to clean user WS |
184 | 184 | 'cleanUserWS'=>array('len'=>0), |
185 | 185 | 'deleteSpecialInfo'=>array('len'=>1), |
186 | - 'interactivePlot'=>array('len'=>2), | |
186 | + 'interactivePlot'=>array('len'=>1), | |
187 | 187 | 'getParamPlotInit'=>array('len'=>1), |
188 | 188 | 'getParamInfo'=>array('len'=>1), |
189 | 189 | 'getDerivedParamInfo'=>array('len'=>1), |
... | ... |