Commit d4ab05cd5b7e019f6777de9df94f5ad75eb44840
1 parent
7aa4cc7d
Exists in
master
and in
63 other branches
Update interactive plot title (cf. #10044 et #9165)
Showing
2 changed files
with
15 additions
and
0 deletions
Show diff stats
js/app/controllers/PlotModule.js
... | ... | @@ -154,6 +154,19 @@ Ext.define('amdaDesktop.PlotModule', { |
154 | 154 | } |
155 | 155 | }, |
156 | 156 | |
157 | + updatePlotResultTitle: function(tabIndex, title) { | |
158 | + var winResultId = 'plot_'+tabIndex+'-win'; | |
159 | + var winResult = this.getWindowResult(winResultId); | |
160 | + if (winResult) { | |
161 | + winResult.setTitle(title); | |
162 | + myDesktopApp.getDesktop().taskbar.windowBar.items.each(function (item) { | |
163 | + if (winResult == item.win) { | |
164 | + item.setText(title); | |
165 | + } | |
166 | + }); | |
167 | + } | |
168 | + }, | |
169 | + | |
157 | 170 | updatePreview : function(plotPreviewConfig) { |
158 | 171 | var winPreviewId = "plot-preview-win"; |
159 | 172 | |
... | ... |
js/app/views/PlotComponents/PlotTabContent.js
... | ... | @@ -140,6 +140,7 @@ Ext.define('amdaPlotComp.PlotTabContent', { |
140 | 140 | me.setPlotNode(targetPlotNode); |
141 | 141 | me.plotTabPanel.updatePlotTabs(); |
142 | 142 | me.updateUI(); |
143 | + plotModule.updatePlotResultTitle(me.tabIndex, targetPlotNode.get('text')); | |
143 | 144 | }}); |
144 | 145 | } |
145 | 146 | }); |
... | ... | @@ -161,6 +162,7 @@ Ext.define('amdaPlotComp.PlotTabContent', { |
161 | 162 | me.setPlotNode(me.plotNode); //to update initial request data |
162 | 163 | me.plotTabPanel.updatePlotTabs(); |
163 | 164 | me.updateUI(); |
165 | + plotModule.updatePlotResultTitle(me.tabIndex, me.plotNode.get('text')); | |
164 | 166 | }}); |
165 | 167 | } |
166 | 168 | }, |
... | ... |