Commit d3291d90f7e468b5ea15de35cb4afc0a79c1ae7a
Exists in
9014
Fixing some issues
Showing
4 changed files
with
436 additions
and
339 deletions
Show diff stats
js/app/AmdaApp.js
... | ... | @@ -16,100 +16,101 @@ Ext.define('amdaApp.AmdaApp', { |
16 | 16 | 'amdaUI.SampToolBarUI', |
17 | 17 | 'amdaDesktop.DynamicModule', |
18 | 18 | 'amdaDesktop.WindowsModule', |
19 | - 'MyDesktop.Settings' | |
19 | + 'MyDesktop.Settings', | |
20 | + 'amdaUI.openedWindows', | |
20 | 21 | ], |
21 | 22 | |
22 | 23 | dynamicModules: { |
23 | - visu : { | |
24 | - id : 'visu-win', | |
25 | - icon : 'icon-visu_catalog', | |
26 | - title : 'Visualization', | |
27 | - source : 'amdaDesktop.VisuModule', | |
28 | - useLauncher : true | |
29 | - }, | |
30 | - statistics : { | |
31 | - id : 'statistics-win', | |
32 | - icon : 'icon-statistics', | |
33 | - title : 'Statistics', | |
34 | - source : 'amdaDesktop.StatisticsModule', | |
35 | - useLauncher : true | |
36 | - }, | |
37 | - catalog : { | |
38 | - id : 'catalog-win', | |
39 | - icon : 'icon-catalog', | |
40 | - title : 'Manage catalogs', | |
41 | - source : 'amdaDesktop.CatalogModule', | |
42 | - useLauncher : true | |
43 | - }, | |
44 | - param : { | |
45 | - id : 'param-win', | |
46 | - icon : 'icon-parameters', | |
47 | - title : 'Create/modify parameters', | |
48 | - source : 'amdaDesktop.ParameterModule', | |
49 | - useLauncher : true | |
24 | + visu: { | |
25 | + id: 'visu-win', | |
26 | + icon: 'icon-visu_catalog', | |
27 | + title: 'Visualization', | |
28 | + source: 'amdaDesktop.VisuModule', | |
29 | + useLauncher: true | |
50 | 30 | }, |
51 | - tt : { | |
52 | - id : 'timetab-win', | |
53 | - icon : 'icon-manage-tt', | |
54 | - title : 'Manage Time Tables', | |
55 | - source : 'amdaDesktop.TimeTableModule', | |
56 | - useLauncher : true | |
31 | + statistics: { | |
32 | + id: 'statistics-win', | |
33 | + icon: 'icon-statistics', | |
34 | + title: 'Statistics', | |
35 | + source: 'amdaDesktop.StatisticsModule', | |
36 | + useLauncher: true | |
57 | 37 | }, |
58 | - tt_op : { | |
59 | - id : 'ttsOpe-win', | |
60 | - icon : 'icon-tts', | |
61 | - title : 'Operations on Time Tables', | |
62 | - source : 'amdaDesktop.TimeTableOperationModule', | |
63 | - useLauncher : true | |
38 | + catalog: { | |
39 | + id: 'catalog-win', | |
40 | + icon: 'icon-catalog', | |
41 | + title: 'Manage catalogs', | |
42 | + source: 'amdaDesktop.CatalogModule', | |
43 | + useLauncher: true | |
64 | 44 | }, |
65 | - plot : { | |
66 | - id : 'plot-win', | |
67 | - icon : 'icon-plot', | |
68 | - title : 'Plot Manager', | |
69 | - source : 'amdaDesktop.PlotModule', | |
70 | - useLauncher : true | |
45 | + param: { | |
46 | + id: 'param-win', | |
47 | + icon: 'icon-parameters', | |
48 | + title: 'Create/modify parameters', | |
49 | + source: 'amdaDesktop.ParameterModule', | |
50 | + useLauncher: true | |
71 | 51 | }, |
72 | - search : { | |
73 | - id : 'search-win', | |
74 | - icon : 'icon-search', | |
75 | - title : 'Data Mining', | |
76 | - source : 'amdaDesktop.SearchModule', | |
77 | - useLauncher : true | |
52 | + tt: { | |
53 | + id: 'timetab-win', | |
54 | + icon: 'icon-manage-tt', | |
55 | + title: 'Manage Time Tables', | |
56 | + source: 'amdaDesktop.TimeTableModule', | |
57 | + useLauncher: true | |
78 | 58 | }, |
79 | - download : { | |
80 | - id : 'down-win', | |
81 | - icon : 'icon-download', | |
82 | - title : 'Download data', | |
83 | - source : 'amdaDesktop.DownloadModule', | |
84 | - useLauncher : true | |
59 | + tt_op: { | |
60 | + id: 'ttsOpe-win', | |
61 | + icon: 'icon-tts', | |
62 | + title: 'Operations on Time Tables', | |
63 | + source: 'amdaDesktop.TimeTableOperationModule', | |
64 | + useLauncher: true | |
85 | 65 | }, |
86 | - upload : { | |
87 | - id : 'up-win', | |
88 | - icon : 'icon-mydata', | |
89 | - title : 'Upload data', | |
90 | - source : 'amdaDesktop.UploadModule', | |
91 | - useLauncher : true | |
66 | + plot: { | |
67 | + id: 'plot-win', | |
68 | + icon: 'icon-plot', | |
69 | + title: 'Plot Manager', | |
70 | + source: 'amdaDesktop.PlotModule', | |
71 | + useLauncher: true | |
92 | 72 | }, |
93 | - interop : { | |
94 | - id : 'interop-win', | |
95 | - icon : 'icon-interop', | |
96 | - title : 'Interoperability', | |
97 | - source : 'amdaDesktop.InteropModule', | |
98 | - useLauncher : true | |
73 | + search: { | |
74 | + id: 'search-win', | |
75 | + icon: 'icon-search', | |
76 | + title: 'Data Mining', | |
77 | + source: 'amdaDesktop.SearchModule', | |
78 | + useLauncher: true | |
99 | 79 | }, |
100 | - epntap : { | |
101 | - id : 'epntap-win', | |
102 | - icon : 'icon-interop', | |
103 | - title : 'EPN-TAP data', | |
104 | - source : 'amdaDesktop.EpnTapModule', | |
105 | - useLauncher : false | |
80 | + download: { | |
81 | + id: 'down-win', | |
82 | + icon: 'icon-download', | |
83 | + title: 'Download data', | |
84 | + source: 'amdaDesktop.DownloadModule', | |
85 | + useLauncher: true | |
106 | 86 | }, |
107 | - info : { | |
108 | - id : 'info-win', | |
109 | - icon : 'icon-information', | |
110 | - title : 'About AMDA', | |
111 | - source : 'amdaDesktop.AboutModule', | |
112 | - useLauncher : false | |
87 | + upload: { | |
88 | + id: 'up-win', | |
89 | + icon: 'icon-mydata', | |
90 | + title: 'Upload data', | |
91 | + source: 'amdaDesktop.UploadModule', | |
92 | + useLauncher: true | |
93 | + }, | |
94 | + interop: { | |
95 | + id: 'interop-win', | |
96 | + icon: 'icon-interop', | |
97 | + title: 'Interoperability', | |
98 | + source: 'amdaDesktop.InteropModule', | |
99 | + useLauncher: true | |
100 | + }, | |
101 | + epntap: { | |
102 | + id: 'epntap-win', | |
103 | + icon: 'icon-interop', | |
104 | + title: 'EPN-TAP data', | |
105 | + source: 'amdaDesktop.EpnTapModule', | |
106 | + useLauncher: false | |
107 | + }, | |
108 | + info: { | |
109 | + id: 'info-win', | |
110 | + icon: 'icon-information', | |
111 | + title: 'About AMDA', | |
112 | + source: 'amdaDesktop.AboutModule', | |
113 | + useLauncher: false | |
113 | 114 | }, |
114 | 115 | opened: { |
115 | 116 | id: 'opened-win', |
... | ... | @@ -118,109 +119,113 @@ Ext.define('amdaApp.AmdaApp', { |
118 | 119 | source: 'amdaDesktop.WindowsModule', |
119 | 120 | useLauncher: false |
120 | 121 | }, |
121 | - explorer : { | |
122 | - id : 'explorer-win', | |
123 | - icon : 'icon-elements', | |
124 | - title : 'Workspace Explorer', | |
125 | - source : 'amdaDesktop.ExplorerModule', | |
126 | - useLauncher : false | |
122 | + explorer: { | |
123 | + id: 'explorer-win', | |
124 | + icon: 'icon-elements', | |
125 | + title: 'Workspace Explorer', | |
126 | + source: 'amdaDesktop.ExplorerModule', | |
127 | + useLauncher: false | |
127 | 128 | }, |
128 | - my_data : { | |
129 | - id : 'mydata-win', | |
130 | - icon : 'icon-mydata', | |
131 | - title : 'Define parameter', | |
132 | - source : 'amdaDesktop.MyDataModule', | |
133 | - useLauncher : false | |
129 | + my_data: { | |
130 | + id: 'mydata-win', | |
131 | + icon: 'icon-mydata', | |
132 | + title: 'Define parameter', | |
133 | + source: 'amdaDesktop.MyDataModule', | |
134 | + useLauncher: false | |
134 | 135 | }, |
135 | - help : { | |
136 | - id : 'help-win', | |
137 | - icon : 'icon-help', | |
138 | - title : 'Help', | |
139 | - source : 'amdaDesktop.HelpModule', | |
140 | - useLauncher : false | |
136 | + help: { | |
137 | + id: 'help-win', | |
138 | + icon: 'icon-help', | |
139 | + title: 'Help', | |
140 | + source: 'amdaDesktop.HelpModule', | |
141 | + useLauncher: false | |
141 | 142 | }, |
142 | - feedback : { | |
143 | - id : 'feed-win', | |
144 | - icon : 'icon-feedback', | |
145 | - title : 'Feedback', | |
146 | - source : 'amdaDesktop.FeedbackModule', | |
147 | - useLauncher : false | |
143 | + feedback: { | |
144 | + id: 'feed-win', | |
145 | + icon: 'icon-feedback', | |
146 | + title: 'Feedback', | |
147 | + source: 'amdaDesktop.FeedbackModule', | |
148 | + useLauncher: false | |
148 | 149 | }, |
149 | - filters : { | |
150 | - id : 'filters-win', | |
151 | - icon : 'icon-filter', | |
152 | - title : 'Filters', | |
153 | - source : 'amdaDesktop.FiltersModule', | |
154 | - useLauncher : false | |
150 | + windows: { | |
151 | + id: 'windows_list', | |
152 | + icon: 'icon-elements', | |
153 | + title: 'Windows', | |
154 | + source: 'amdaDesktop.WindowsModule', | |
155 | + useLauncher: false | |
155 | 156 | }, |
156 | - result : { | |
157 | - id : 'result-win', | |
158 | - contentId : 'resultUI', | |
159 | - icon : 'icon-results', | |
160 | - title : 'Results', | |
161 | - source : 'amdaDesktop.ResultModule', | |
162 | - useLauncher : false | |
157 | + filters: { | |
158 | + id: 'filters-win', | |
159 | + icon: 'icon-filter', | |
160 | + title: 'Filters', | |
161 | + source: 'amdaDesktop.FiltersModule', | |
162 | + useLauncher: false | |
163 | 163 | }, |
164 | - astro : { | |
165 | - id : 'astroimages-win', | |
166 | - icon : 'icon-interop', | |
167 | - title : 'Astronomical Images', | |
168 | - source : 'amdaDesktop.AstroImagesModule', | |
169 | - useLauncher : false | |
164 | + result: { | |
165 | + id: 'result-win', | |
166 | + contentId: 'resultUI', | |
167 | + icon: 'icon-results', | |
168 | + title: 'Results', | |
169 | + source: 'amdaDesktop.ResultModule', | |
170 | + useLauncher: false | |
171 | + }, | |
172 | + astro: { | |
173 | + id: 'astroimages-win', | |
174 | + icon: 'icon-interop', | |
175 | + title: 'Astronomical Images', | |
176 | + source: 'amdaDesktop.AstroImagesModule', | |
177 | + useLauncher: false | |
170 | 178 | } |
171 | 179 | }, |
172 | 180 | |
173 | 181 | // IDs of Modules working with parameters; used in Alias Node |
174 | 182 | //TODO stats-win |
175 | - paramModulesID : ['plot-win', 'param-win', 'search-win', 'down-win'], | |
183 | + paramModulesID: ['plot-win', 'param-win', 'search-win', 'down-win'], | |
176 | 184 | |
177 | 185 | // Important system constants |
178 | - MAX_UPLOADED_FILE_SIZE : max_uploaded_file_size, // in B, from my_config.php | |
186 | + MAX_UPLOADED_FILE_SIZE: max_uploaded_file_size, // in B, from my_config.php | |
179 | 187 | |
180 | - listeners : { | |
181 | - scope : this, | |
182 | - beforeunload : function () | |
183 | - { | |
188 | + listeners: { | |
189 | + scope: this, | |
190 | + beforeunload: function () { | |
184 | 191 | var interopModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.interop.id); |
185 | 192 | if (interopModule) |
186 | 193 | interopModule.forceSampDisconnect(); |
187 | 194 | return true; |
188 | 195 | }, |
189 | - ready : function () | |
190 | - { | |
191 | - AmdaAction.cleanUserWS(function(res,e){},this); | |
196 | + ready: function () { | |
197 | + AmdaAction.cleanUserWS(function (res, e) { }, this); | |
192 | 198 | } |
193 | 199 | }, |
194 | 200 | |
195 | - init: function() | |
196 | - { | |
201 | + init: function () { | |
197 | 202 | // custom logic before getXYZ methods get called... |
198 | 203 | this.callParent(); |
199 | - | |
204 | + | |
200 | 205 | // now ready... |
201 | 206 | //override createWindow method of desktop |
202 | 207 | Ext.override(Ext.ux.desktop.Desktop, { |
203 | 208 | createWindow: function (config, cls) { |
204 | 209 | var me = this; |
205 | - var win = this.callParent([config,cls]); | |
210 | + var win = this.callParent([config, cls]); | |
206 | 211 | win.on({ |
207 | 212 | boxready: function (w) { |
208 | 213 | w.dd.xTickSize = me.xTickSize; |
209 | 214 | w.dd.yTickSize = me.yTickSize; |
210 | 215 | |
211 | 216 | if (w.resizer) { |
212 | - w.resizer.widthIncrement = me.xTickSize; | |
213 | - w.resizer.heightIncrement = me.yTickSize; | |
217 | + w.resizer.widthIncrement = me.xTickSize; | |
218 | + w.resizer.heightIncrement = me.yTickSize; | |
214 | 219 | } |
215 | 220 | |
216 | 221 | if (w.y < 0) |
217 | - w.el.setY(0); | |
222 | + w.el.setY(0); | |
218 | 223 | |
219 | 224 | if (w.x + w.width > me.el.getWidth()) |
220 | - w.el.setX(me.el.getWidth()-w.width); | |
225 | + w.el.setX(me.el.getWidth() - w.width); | |
221 | 226 | |
222 | 227 | if (w.y + w.height > me.el.getHeight()) |
223 | - w.el.setY((me.el.getHeight()-w.height > 0) ? me.el.getHeight()-w.height : 0); | |
228 | + w.el.setY((me.el.getHeight() - w.height > 0) ? me.el.getHeight() - w.height : 0); | |
224 | 229 | |
225 | 230 | }, |
226 | 231 | single: true |
... | ... | @@ -229,9 +234,9 @@ Ext.define('amdaApp.AmdaApp', { |
229 | 234 | } |
230 | 235 | }); |
231 | 236 | }, |
232 | - | |
237 | + | |
233 | 238 | //create InfoBox |
234 | - infoMsg : function(msg) { | |
239 | + infoMsg: function (msg) { | |
235 | 240 | Ext.Msg.show({ |
236 | 241 | title: 'AMDA Info', |
237 | 242 | cls: 'infoMsg', |
... | ... | @@ -244,7 +249,7 @@ Ext.define('amdaApp.AmdaApp', { |
244 | 249 | }); |
245 | 250 | }, |
246 | 251 | //create InfoBox |
247 | - infoMsgLong : function(msg) { | |
252 | + infoMsgLong: function (msg) { | |
248 | 253 | Ext.Msg.show({ |
249 | 254 | title: 'AMDA Info', |
250 | 255 | cls: 'infoMsgLong', |
... | ... | @@ -257,7 +262,7 @@ Ext.define('amdaApp.AmdaApp', { |
257 | 262 | }); |
258 | 263 | }, |
259 | 264 | //create WarningBox |
260 | - warningMsg : function(msg) { | |
265 | + warningMsg: function (msg) { | |
261 | 266 | Ext.Msg.show({ |
262 | 267 | title: 'Attention', |
263 | 268 | msg: msg, |
... | ... | @@ -267,7 +272,7 @@ Ext.define('amdaApp.AmdaApp', { |
267 | 272 | }, |
268 | 273 | |
269 | 274 | //create ErrorBox |
270 | - errorMsg : function(msg) { | |
275 | + errorMsg: function (msg) { | |
271 | 276 | Ext.Msg.show({ |
272 | 277 | title: 'Failure', |
273 | 278 | msg: msg, |
... | ... | @@ -277,25 +282,25 @@ Ext.define('amdaApp.AmdaApp', { |
277 | 282 | }, |
278 | 283 | |
279 | 284 | // add info icon; onCick AmdaHelp is shown |
280 | - addAmdaInfo : function(help, style) { | |
285 | + addAmdaInfo: function (help, style) { | |
281 | 286 | if (style) { |
282 | - help += '" style="' + style; | |
287 | + help += '" style="' + style; | |
283 | 288 | } |
284 | - var html = '<img amda_clicktip="' + help + '" src="js/resources/images/16x16/info_mini.png"' | |
289 | + var html = '<img amda_clicktip="' + help + '" src="js/resources/images/16x16/info_mini.png"' | |
285 | 290 | return { |
286 | 291 | xtype: 'label', |
287 | 292 | html: html, |
288 | 293 | listeners: { |
289 | 294 | click: { |
290 | 295 | element: 'el', |
291 | - fn: function(e,t) { | |
296 | + fn: function (e, t) { | |
292 | 297 | var me = t, |
293 | - text = me.getAttribute('amda_clicktip'); | |
298 | + text = me.getAttribute('amda_clicktip'); | |
294 | 299 | if (text) { |
295 | 300 | e.preventDefault(); |
296 | - AmdaAction.getInfo({name : text}, function(res,e) { | |
301 | + AmdaAction.getInfo({ name: text }, function (res, e) { | |
297 | 302 | if (res.success) myDesktopApp.infoMsg(res.result); |
298 | - }); | |
303 | + }); | |
299 | 304 | } |
300 | 305 | } |
301 | 306 | } |
... | ... | @@ -303,45 +308,45 @@ Ext.define('amdaApp.AmdaApp', { |
303 | 308 | }; |
304 | 309 | }, |
305 | 310 | |
306 | - getModules : function(){ | |
311 | + getModules: function () { | |
307 | 312 | var allModules = []; |
308 | 313 | |
309 | 314 | //Add dynamic modules |
310 | - Ext.Object.each(this.dynamicModules, function(key, def) { | |
315 | + Ext.Object.each(this.dynamicModules, function (key, def) { | |
311 | 316 | allModules.push(new amdaDesktop.DynamicModule(def.id, def.icon, def.title, def.source, def.useLauncher)); |
312 | 317 | }); |
313 | - | |
318 | + var index = Math.round(allModules.length / 4); | |
319 | + allModules.splice(index, 0, new amdaUI.openedWindows()); | |
314 | 320 | return allModules; |
315 | 321 | }, |
316 | 322 | |
317 | - getDesktopConfig: function () | |
318 | - { | |
323 | + getDesktopConfig: function () { | |
319 | 324 | var me = this, ret = me.callParent(); |
320 | 325 | |
321 | 326 | var desktopId = 'AmdaDesktop'; |
322 | - var wallpaper = Ext.state.Manager.getProvider().get(desktopId+'_wallpaper'); | |
327 | + var wallpaper = Ext.state.Manager.getProvider().get(desktopId + '_wallpaper'); | |
323 | 328 | if (!wallpaper) |
324 | - wallpaper = 'js/resources/images/desktop/wallpapers/Cdpp2.jpg'; | |
329 | + wallpaper = 'js/resources/images/desktop/wallpapers/Cdpp2.jpg'; | |
325 | 330 | return Ext.apply(ret, { |
326 | - id : desktopId, | |
331 | + id: desktopId, | |
327 | 332 | contextMenuItems: [ |
328 | - { text: 'Change Settings', handler: me.onSettings, scope: me } | |
333 | + { text: 'Change Settings', handler: me.onSettings, scope: me } | |
329 | 334 | ], |
330 | 335 | shortcuts: Ext.create('Ext.data.Store', { |
331 | 336 | model: 'Ext.ux.desktop.ShortcutModel', |
332 | 337 | data: [ |
333 | - { name: 'Help', iconCls: 'help', module: 'help-win' }, | |
334 | - { name: 'Create/Modify parameter', iconCls: 'edit', module: 'param-win' }, | |
335 | - { name: 'Plot data', iconCls: 'plot', module: 'plot-win'}, | |
336 | - { name: 'Data mining', iconCls: 'search', module: 'search-win'}, | |
337 | - { name: 'Statistics', iconCls: 'statistics', module: 'statistics-win'}, | |
338 | - { name: 'Download data', iconCls: 'download_manager', module: 'down-win'}, | |
339 | - { name: 'Upload data', iconCls: 'mydata', module: 'up-win'}, | |
340 | - { name: 'Manage TimeTables', iconCls: 'timeTable', module: 'timetab-win' }, | |
341 | - { name: 'TimeTables operations', iconCls: 'operations', module: 'ttsOpe-win' }, | |
342 | - { name: 'Manage catalogs', iconCls: 'catalog', module: 'catalog-win'}, | |
343 | - { name: 'Visualize catalogs', iconCls: 'visu_catalog', module: 'visu-win'}, | |
344 | - { name: 'Interoperability', iconCls: 'interop', module: 'interop-win' } | |
338 | + { name: 'Help', iconCls: 'help', module: 'help-win' }, | |
339 | + { name: 'Create/Modify parameter', iconCls: 'edit', module: 'param-win' }, | |
340 | + { name: 'Plot data', iconCls: 'plot', module: 'plot-win' }, | |
341 | + { name: 'Data mining', iconCls: 'search', module: 'search-win' }, | |
342 | + { name: 'Statistics', iconCls: 'statistics', module: 'statistics-win' }, | |
343 | + { name: 'Download data', iconCls: 'download_manager', module: 'down-win' }, | |
344 | + { name: 'Upload data', iconCls: 'mydata', module: 'up-win' }, | |
345 | + { name: 'Manage TimeTables', iconCls: 'timeTable', module: 'timetab-win' }, | |
346 | + { name: 'TimeTables operations', iconCls: 'operations', module: 'ttsOpe-win' }, | |
347 | + { name: 'Manage catalogs', iconCls: 'catalog', module: 'catalog-win' }, | |
348 | + { name: 'Visualize catalogs', iconCls: 'visu_catalog', module: 'visu-win' }, | |
349 | + { name: 'Interoperability', iconCls: 'interop', module: 'interop-win' } | |
345 | 350 | ] |
346 | 351 | }), |
347 | 352 | |
... | ... | @@ -351,8 +356,7 @@ Ext.define('amdaApp.AmdaApp', { |
351 | 356 | }, |
352 | 357 | |
353 | 358 | // config for the start menu |
354 | - getStartConfig : function() | |
355 | - { | |
359 | + getStartConfig: function () { | |
356 | 360 | var me = this, ret = me.callParent(); |
357 | 361 | return Ext.apply(ret, { |
358 | 362 | title: sessionID, |
... | ... | @@ -362,66 +366,67 @@ Ext.define('amdaApp.AmdaApp', { |
362 | 366 | width: 130, |
363 | 367 | items: [ |
364 | 368 | { |
365 | - text:'Settings', | |
366 | - iconCls:'settings', | |
369 | + text: 'Settings', | |
370 | + iconCls: 'settings', | |
367 | 371 | handler: me.onSettings, |
368 | 372 | scope: me |
369 | 373 | }, '-', |
370 | 374 | { |
371 | - text : 'Profile', | |
372 | - iconCls : 'icon-user', | |
373 | - id : 'profile-win-tool', | |
374 | - handler : function(obj, e) { | |
375 | - e.stopEvent(); | |
376 | - AmdaAction.getUserInfo(this.onGetUserInfo,this); | |
375 | + text: 'Profile', | |
376 | + iconCls: 'icon-user', | |
377 | + id: 'profile-win-tool', | |
378 | + handler: function (obj, e) { | |
379 | + e.stopEvent(); | |
380 | + AmdaAction.getUserInfo(this.onGetUserInfo, this); | |
377 | 381 | }, |
378 | - scope : this | |
382 | + scope: this | |
379 | 383 | }, |
380 | 384 | { |
381 | - text : 'Feedback', | |
382 | - iconCls : 'icon-feedback', | |
383 | - id : 'feed-win-tool', | |
384 | - handler : function(obj, e) { | |
385 | - e.stopEvent(); | |
386 | - var moduleId = obj.el.id; | |
387 | - this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) { | |
385 | + text: 'Feedback', | |
386 | + iconCls: 'icon-feedback', | |
387 | + id: 'feed-win-tool', | |
388 | + handler: function (obj, e) { | |
389 | + e.stopEvent(); | |
390 | + var moduleId = obj.el.id; | |
391 | + this.getLoadedModule(moduleId.replace('-tool', ''), true, function (module) { | |
388 | 392 | module.createWindow(); |
389 | - }); | |
393 | + }); | |
390 | 394 | }, |
391 | - scope : this | |
392 | - }, | |
395 | + scope: this | |
396 | + }, | |
393 | 397 | { |
394 | - text : 'Help', | |
395 | - iconCls : 'icon-help', | |
396 | - id : 'help-win-tool', | |
397 | - scope : this, | |
398 | - handler : function(obj, e) { | |
399 | - e.stopEvent(); | |
400 | - var moduleId = obj.el.id; | |
401 | - this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) { | |
398 | + text: 'Help', | |
399 | + iconCls: 'icon-help', | |
400 | + id: 'help-win-tool', | |
401 | + scope: this, | |
402 | + handler: function (obj, e) { | |
403 | + e.stopEvent(); | |
404 | + var moduleId = obj.el.id; | |
405 | + this.getLoadedModule(moduleId.replace('-tool', ''), true, function (module) { | |
402 | 406 | module.createWindow(); |
403 | 407 | }); |
404 | 408 | } |
405 | - }, | |
409 | + }, | |
406 | 410 | { |
407 | - text : 'About AMDA', | |
408 | - iconCls : 'icon-information', | |
409 | - id : 'info-win-tool', | |
410 | - scope : this, | |
411 | - handler : function(obj, e) { | |
412 | - e.stopEvent(); | |
413 | - var moduleId = obj.el.id; | |
414 | - this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) { | |
411 | + text: 'About AMDA', | |
412 | + iconCls: 'icon-information', | |
413 | + id: 'info-win-tool', | |
414 | + scope: this, | |
415 | + handler: function (obj, e) { | |
416 | + e.stopEvent(); | |
417 | + var moduleId = obj.el.id; | |
418 | + this.getLoadedModule(moduleId.replace('-tool', ''), true, function (module) { | |
415 | 419 | module.createWindow(); |
416 | - }); | |
420 | + }); | |
417 | 421 | }, |
418 | - }, '-', | |
422 | + }, '-', | |
419 | 423 | { |
420 | - text : 'Workspaces', | |
421 | - iconCls : 'icon-ws', | |
424 | + text: 'Workspaces', | |
425 | + iconCls: 'icon-ws', | |
422 | 426 | disabled: true, |
423 | - scope : this | |
424 | - }, '-', | |
427 | + scope: this | |
428 | + }, | |
429 | + '-', | |
425 | 430 | { |
426 | 431 | text: 'Opened windows', |
427 | 432 | iconCls: 'icon-ws', |
... | ... | @@ -438,28 +443,26 @@ Ext.define('amdaApp.AmdaApp', { |
438 | 443 | }, |
439 | 444 | }, '-', |
440 | 445 | { |
441 | - text : 'Logout', | |
442 | - iconCls : 'logout', | |
443 | - scope : this, | |
444 | - handler : me.onLogout | |
446 | + text: 'Logout', | |
447 | + iconCls: 'logout', | |
448 | + scope: this, | |
449 | + handler: me.onLogout | |
445 | 450 | } |
446 | 451 | ] |
447 | 452 | } |
448 | 453 | }); |
449 | 454 | }, |
450 | 455 | |
451 | - getModuleDefinition: function(id) { | |
456 | + getModuleDefinition: function (id) { | |
452 | 457 | return this.getModule(id); |
453 | 458 | }, |
454 | 459 | |
455 | - getLoadedModule: function(id, forceLoad, onReady) { | |
460 | + getLoadedModule: function (id, forceLoad, onReady) { | |
456 | 461 | var moduleDef = this.getModuleDefinition(id); |
457 | 462 | if (!moduleDef) |
458 | 463 | return null; |
459 | - if (!moduleDef.isReady()) | |
460 | - { | |
461 | - if (forceLoad) | |
462 | - { | |
464 | + if (!moduleDef.isReady()) { | |
465 | + if (forceLoad) { | |
463 | 466 | //loadMask.show(); |
464 | 467 | moduleDef.get(function (module) { |
465 | 468 | //loadMask.hide(); |
... | ... | @@ -474,8 +477,7 @@ Ext.define('amdaApp.AmdaApp', { |
474 | 477 | return moduleDef.get(); |
475 | 478 | }, |
476 | 479 | |
477 | - getTaskbarConfig: function () | |
478 | - { | |
480 | + getTaskbarConfig: function () { | |
479 | 481 | var ret = this.callParent(); |
480 | 482 | return Ext.apply(ret, { |
481 | 483 | quickStart: [], |
... | ... | @@ -486,10 +488,10 @@ Ext.define('amdaApp.AmdaApp', { |
486 | 488 | overflowText: this.dynamicModules.feedback.title, |
487 | 489 | iconCls: this.dynamicModules.feedback.icon, |
488 | 490 | scope: this, |
489 | - handler : function(obj, e) { | |
491 | + handler: function (obj, e) { | |
490 | 492 | e.stopEvent(); |
491 | - this.getLoadedModule(this.dynamicModules.feedback.id, true, function(module) { | |
492 | - module.createWindow(); | |
493 | + this.getLoadedModule(this.dynamicModules.feedback.id, true, function (module) { | |
494 | + module.createWindow(); | |
493 | 495 | }); |
494 | 496 | } |
495 | 497 | }, |
... | ... | @@ -499,120 +501,114 @@ Ext.define('amdaApp.AmdaApp', { |
499 | 501 | overflowText: this.dynamicModules.info.title, |
500 | 502 | iconCls: this.dynamicModules.info.icon, |
501 | 503 | scope: this, |
502 | - handler : function(obj, e) { | |
504 | + handler: function (obj, e) { | |
503 | 505 | e.stopEvent(); |
504 | - this.getLoadedModule(this.dynamicModules.info.id, true, function(module) { | |
505 | - module.createWindow(); | |
506 | + this.getLoadedModule(this.dynamicModules.info.id, true, function (module) { | |
507 | + module.createWindow(); | |
506 | 508 | }); |
507 | 509 | } |
508 | 510 | }, |
509 | 511 | { |
510 | - name: 'Logout', iconCls : 'logout', | |
512 | + name: 'Logout', iconCls: 'logout', | |
511 | 513 | tooltip: { text: 'Logout', align: 'bl-tl' }, |
512 | 514 | overflowText: 'Logout', |
513 | - scope : this, | |
514 | - handler : this.onLogout | |
515 | + scope: this, | |
516 | + handler: this.onLogout | |
515 | 517 | }, '-', |
516 | 518 | { xtype: 'trayclock', flex: 1 } |
517 | 519 | ] |
518 | 520 | }); |
519 | 521 | }, |
520 | 522 | |
521 | - onLogout: function (obj,e) { | |
523 | + onLogout: function (obj, e) { | |
522 | 524 | e.stopEvent(); |
523 | 525 | if (isGuest) { |
524 | - this.guestLogout(); | |
525 | - } | |
526 | + this.guestLogout(); | |
527 | + } | |
526 | 528 | else { |
527 | 529 | this.saveSessionState(); |
528 | 530 | } |
529 | 531 | }, |
530 | 532 | |
531 | - onGetUserInfo : function (result, e){ | |
533 | + onGetUserInfo: function (result, e) { | |
532 | 534 | var t = e.getTransaction(); |
533 | - if (e.status) | |
534 | - { | |
535 | - if (result && result.success) | |
536 | - { | |
535 | + if (e.status) { | |
536 | + if (result && result.success) { | |
537 | 537 | // SUCCESS |
538 | - var msg = '<b>Login :</b> '+result['login']+'<br/>'; | |
539 | - msg += ('<b> Name :</b> '+result['first_name']+' '+result['name']+'<br/>'); | |
540 | - msg += ('<b>Groups :</b> '+result['group']+'<br/>'); | |
541 | - msg += ('<b>Email :</b> '+result['email']+'<br/>'); | |
542 | - msg += ('<b>Registration date :</b> '+result['date']+'<br/>'); | |
543 | - msg += ('<b>Disk space total / used / available :</b> '+result['total']+' / '+result['used']+' / '+result['available']+' MB<br/>'); | |
538 | + var msg = '<b>Login :</b> ' + result['login'] + '<br/>'; | |
539 | + msg += ('<b> Name :</b> ' + result['first_name'] + ' ' + result['name'] + '<br/>'); | |
540 | + msg += ('<b>Groups :</b> ' + result['group'] + '<br/>'); | |
541 | + msg += ('<b>Email :</b> ' + result['email'] + '<br/>'); | |
542 | + msg += ('<b>Registration date :</b> ' + result['date'] + '<br/>'); | |
543 | + msg += ('<b>Disk space total / used / available :</b> ' + result['total'] + ' / ' + result['used'] + ' / ' + result['available'] + ' MB<br/>'); | |
544 | 544 | this.infoMsg(msg); |
545 | 545 | } |
546 | - else | |
547 | - { | |
546 | + else { | |
548 | 547 | //ERROR |
549 | 548 | this.errorMsg('Cannot get user info'); |
550 | 549 | } |
551 | 550 | } |
552 | - else | |
553 | - { | |
551 | + else { | |
554 | 552 | // FAILURE |
555 | - this.errorMsg('Cannot get user info : '+e.message); | |
553 | + this.errorMsg('Cannot get user info : ' + e.message); | |
556 | 554 | } |
557 | 555 | }, |
558 | 556 | |
559 | - guestLogout: function() { | |
557 | + guestLogout: function () { | |
560 | 558 | Ext.Msg.show({ |
561 | - title : 'Logout', | |
562 | - msg :'Your guest workspace is to be deleted. Continue logout ?', | |
563 | - buttons : Ext.Msg.YESNO, | |
564 | - iconCls : 'logout', | |
565 | - fn : function(btn) { | |
566 | - if (btn == 'yes'){ | |
567 | - AmdaAction.logout(true, function(){ | |
559 | + title: 'Logout', | |
560 | + msg: 'Your guest workspace is to be deleted. Continue logout ?', | |
561 | + buttons: Ext.Msg.YESNO, | |
562 | + iconCls: 'logout', | |
563 | + fn: function (btn) { | |
564 | + if (btn == 'yes') { | |
565 | + AmdaAction.logout(true, function () { | |
568 | 566 | sessionID = ''; |
569 | - window.location.href ='index.html'; | |
567 | + window.location.href = 'index.html'; | |
570 | 568 | }); |
571 | 569 | } |
572 | 570 | } |
573 | 571 | }); |
574 | 572 | }, |
575 | 573 | |
576 | - forceLogout: function(){ | |
574 | + forceLogout: function () { | |
577 | 575 | // myDesktopApp.warningMsg('Your guest session is finished'); |
578 | - AmdaAction.logout(true, function(){ | |
576 | + AmdaAction.logout(true, function () { | |
579 | 577 | sessionID = ''; |
580 | - window.location.href ='index.html'; | |
578 | + window.location.href = 'index.html'; | |
581 | 579 | }); |
582 | 580 | }, |
583 | 581 | |
584 | - saveSessionState : function() | |
585 | - { | |
582 | + saveSessionState: function () { | |
586 | 583 | var me = this; |
587 | 584 | Ext.Msg.show({ |
588 | - title : 'Logout', | |
589 | - msg :'Do you want to keep current windows sizes and locations<br/> for the next sessions?', | |
590 | - buttons : Ext.Msg.YESNOCANCEL, | |
591 | - iconCls : 'logout', | |
592 | - fn : function(btn) { | |
593 | - if (btn == 'yes'){ | |
585 | + title: 'Logout', | |
586 | + msg: 'Do you want to keep current windows sizes and locations<br/> for the next sessions?', | |
587 | + buttons: Ext.Msg.YESNOCANCEL, | |
588 | + iconCls: 'logout', | |
589 | + fn: function (btn) { | |
590 | + if (btn == 'yes') { | |
594 | 591 | //set wallpaper |
595 | - Ext.state.Manager.getProvider().set(me.desktop.id+'_wallpaper',me.desktop.getWallpaper()); | |
592 | + Ext.state.Manager.getProvider().set(me.desktop.id + '_wallpaper', me.desktop.getWallpaper()); | |
596 | 593 | Ext.state.Manager.getProvider().on({ |
597 | - scope : this, | |
598 | - aftersave : function(provider) { | |
594 | + scope: this, | |
595 | + aftersave: function (provider) { | |
599 | 596 | sessionID = ''; |
600 | - window.location.href ='index.html'; | |
597 | + window.location.href = 'index.html'; | |
601 | 598 | } |
602 | 599 | }); |
603 | 600 | Ext.state.Manager.getProvider().saveState(); |
604 | 601 | AmdaAction.logout(false); |
605 | 602 | } |
606 | - else if (btn == 'no') | |
607 | - { | |
603 | + else if (btn == 'no') { | |
608 | 604 | Ext.state.Manager.getProvider().on({ |
609 | - scope : this, | |
610 | - aftersave : function(provider) { | |
605 | + scope: this, | |
606 | + aftersave: function (provider) { | |
611 | 607 | sessionID = ''; |
612 | - window.location.href ='index.html'; | |
608 | + window.location.href = 'index.html'; | |
613 | 609 | } |
614 | 610 | }); |
615 | - Ext.state.Manager.getProvider().set(me.desktop.id+'_wallpaper',me.desktop.getWallpaper()); | |
611 | + Ext.state.Manager.getProvider().set(me.desktop.id + '_wallpaper', me.desktop.getWallpaper()); | |
616 | 612 | Ext.state.Manager.getProvider().saveLastTime(); |
617 | 613 | AmdaAction.logout(false); |
618 | 614 | } |
... | ... | @@ -630,13 +626,12 @@ Ext.define('amdaApp.AmdaApp', { |
630 | 626 | /** |
631 | 627 | * initialization at the start of AMDA-NG webApplication |
632 | 628 | */ |
633 | - initProject : function() | |
634 | - { | |
629 | + initProject: function () { | |
635 | 630 | moduleIds = new Ext.util.MixedCollection(); |
636 | 631 | // Adding Workspace Explorer Id |
637 | 632 | moduleIds.add(this.dynamicModules.explorer.id); |
638 | 633 | |
639 | - moduleIds.each(function(item) { | |
634 | + moduleIds.each(function (item) { | |
640 | 635 | this.getLoadedModule(item, true, function (module) { |
641 | 636 | module.createWindow(); |
642 | 637 | }); |
... | ... | @@ -644,43 +639,45 @@ Ext.define('amdaApp.AmdaApp', { |
644 | 639 | |
645 | 640 | if (freeSpace < diskQuota / 20) { |
646 | 641 | myDesktopApp.warningMsg('Think of cleaning up your work space.<br/>Only ' + |
647 | - Math.round(freeSpace/1024/1024)+ 'MB of '+Math.round(diskQuota/1024/1024) + | |
648 | - 'MB rests'); | |
642 | + Math.round(freeSpace / 1024 / 1024) + 'MB of ' + Math.round(diskQuota / 1024 / 1024) + | |
643 | + 'MB rests'); | |
649 | 644 | } |
650 | 645 | |
651 | 646 | if (isFirstVisit && !isGuest) { |
652 | - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.help.id, true, function(module) { | |
653 | - module.createWindow(); | |
654 | - }); | |
647 | + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.help.id, true, function (module) { | |
648 | + module.createWindow(); | |
649 | + }); | |
655 | 650 | } |
656 | 651 | else { |
657 | 652 | if (isSpecialInfo && !isNewInfo) { |
658 | - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) { | |
653 | + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function (module) { | |
659 | 654 | module.createWindow(isSpecialInfo, 'Welcome on AMDA', true); |
660 | 655 | }); |
661 | 656 | } |
662 | 657 | } |
663 | 658 | |
664 | 659 | if (isNewInfo) { |
665 | - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) { | |
660 | + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function (module) { | |
666 | 661 | // module.createWindow('releaseNotes.' + AMDAVERSION, 'New Release V'+ AMDAVERSION); |
667 | 662 | module.createWindow(news, 'Amda Latest News'); |
668 | 663 | }); |
669 | 664 | } |
670 | 665 | |
671 | 666 | if (isGuest) { |
672 | - myDesktopApp.warningMsg("Welcome to Guest Session<br/>Guest session lasts for "+ | |
673 | - guestSessionDuration/3600+" h maximum<br/>"+ | |
667 | + myDesktopApp.warningMsg("Welcome to Guest Session<br/>Guest session lasts for " + | |
668 | + guestSessionDuration / 3600 + " h maximum<br/>" + | |
674 | 669 | "For extended use time and functionalities (saved sessions)<br/> please register at amda@irap.omp.eu"); |
675 | - Ext.Function.defer(myDesktopApp.warningMsg,(guestSessionDuration-300)*1000, this, ["Your session will be closed in 5 min!"]); | |
676 | - Ext.Function.defer(myDesktopApp.forceLogout, guestSessionDuration*1000); | |
670 | + Ext.Function.defer(myDesktopApp.warningMsg, (guestSessionDuration - 300) * 1000, this, ["Your session will be closed in 5 min!"]); | |
671 | + Ext.Function.defer(myDesktopApp.forceLogout, guestSessionDuration * 1000); | |
677 | 672 | } |
678 | 673 | |
679 | 674 | this.desktop.taskbar.tray.width = 130; |
680 | - this.desktop.taskbar.insert(4,new amdaUI.SampToolBarUI({id : 'samptb', onSwitchConnect : function () { | |
681 | - myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.interop.id, true, function(module) { | |
682 | - module.switchSampConnect(); | |
683 | - }); | |
684 | - }})); | |
675 | + this.desktop.taskbar.insert(4, new amdaUI.SampToolBarUI({ | |
676 | + id: 'samptb', onSwitchConnect: function () { | |
677 | + myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.interop.id, true, function (module) { | |
678 | + module.switchSampConnect(); | |
679 | + }); | |
680 | + } | |
681 | + })); | |
685 | 682 | } |
686 | 683 | }); | ... | ... |
js/app/views/PlotComponents/PlotSerieForm.js
... | ... | @@ -10,44 +10,43 @@ |
10 | 10 | |
11 | 11 | Ext.define('amdaPlotComp.PlotSerieForm', { |
12 | 12 | extend: 'amdaPlotComp.PlotBaseSerieForm', |
13 | - | |
14 | - updateOptions: function(plotType) { | |
13 | + | |
14 | + updateOptions: function (plotType) { | |
15 | 15 | var isScatter = (plotType == 'xyPlot'); |
16 | - | |
16 | + | |
17 | 17 | var xParamField = this.getForm().findField('serie-xaxis-param'); |
18 | 18 | var xValueMinField = this.getForm().findField('serie-xvalue-min'); |
19 | 19 | var xValueFieldSet = xValueMinField.findParentByType('fieldset'); |
20 | 20 | var resamplingModeField = this.getForm().findField('serie-resampling-mode'); |
21 | - | |
21 | + | |
22 | 22 | xParamField.setVisible(isScatter); |
23 | 23 | xValueFieldSet.setVisible(isScatter); |
24 | 24 | resamplingModeField.setVisible(isScatter); |
25 | - | |
25 | + | |
26 | 26 | var errorBarTypeField = this.getForm().findField('serie-errorbar-type'); |
27 | 27 | var errorBarFieldSet = errorBarTypeField.findParentByType('fieldset'); |
28 | - | |
28 | + | |
29 | 29 | errorBarFieldSet.setVisible(!isScatter); |
30 | - | |
31 | - if (!isScatter) | |
32 | - { | |
30 | + | |
31 | + if (!isScatter) { | |
33 | 32 | var errorMinField = this.getForm().findField('serie-errorbar-minparam'); |
34 | 33 | var errorMaxField = this.getForm().findField('serie-errorbar-maxparam'); |
35 | 34 | var errorDeltaField = this.getForm().findField('serie-errorbar-deltaparam'); |
36 | - | |
35 | + | |
37 | 36 | errorMinField.setVisible(errorBarTypeField.getValue() == 'min-max'); |
38 | 37 | errorMaxField.setVisible(errorBarTypeField.getValue() == 'min-max'); |
39 | 38 | errorDeltaField.setVisible(errorBarTypeField.getValue() == 'delta'); |
40 | 39 | } |
41 | - | |
40 | + | |
42 | 41 | this.callParent(arguments); |
43 | 42 | }, |
44 | - | |
45 | - getErrorBarItems: function() { | |
43 | + | |
44 | + getErrorBarItems: function () { | |
46 | 45 | var me = this; |
47 | - | |
46 | + | |
48 | 47 | return [ |
49 | - this.addStandardCombo('serie-errorbar-type', 'Type', amdaPlotObj.PlotObjectConfig.availableErrorBarTypes, function(name, value, oldValue) { | |
50 | - me.updateOptions(me.crtTree.getSelectedPlotType()); | |
48 | + this.addStandardCombo('serie-errorbar-type', 'Type', amdaPlotObj.PlotObjectConfig.availableErrorBarTypes, function (name, value, oldValue) { | |
49 | + me.updateOptions(me.crtTree.getSelectedPlotType()); | |
51 | 50 | }), |
52 | 51 | this.addStandardParamDropTarget('serie-errorbar-minparam', 'Min. Parameter'), |
53 | 52 | this.addStandardParamDropTarget('serie-errorbar-maxparam', 'Max. Parameter'), |
... | ... | @@ -55,32 +54,41 @@ Ext.define('amdaPlotComp.PlotSerieForm', { |
55 | 54 | this.addStandardFieldSet('Bar Lines', '', this.addStandardLineItems('serie-errorbar-lines')) |
56 | 55 | ]; |
57 | 56 | }, |
58 | - | |
59 | - getXValuesRangeItems: function() { | |
57 | + | |
58 | + getXValuesRangeItems: function () { | |
60 | 59 | return [ |
61 | - this.addStandardFloat2('serie-xvalue-min', 'Min value', -Number.MAX_VALUE, Number.MAX_VALUE, true), | |
62 | - this.addStandardFloat2('serie-xvalue-max', 'Max value', -Number.MAX_VALUE, Number.MAX_VALUE, true) | |
60 | + this.addStandardFloat2('serie-xvalue-min', 'Min value', -Number.MAX_VALUE, Number.MAX_VALUE, true), | |
61 | + this.addStandardFloat2('serie-xvalue-max', 'Max value', -Number.MAX_VALUE, Number.MAX_VALUE, true) | |
63 | 62 | ]; |
64 | 63 | }, |
65 | - | |
66 | - getFormItems: function() { | |
64 | + | |
65 | + getFormItems: function () { | |
67 | 66 | var me = this; |
68 | - | |
67 | + | |
69 | 68 | var baseSerieItems = this.callParent(arguments); |
70 | - | |
69 | + | |
71 | 70 | var serieItems = [ |
72 | - this.addStandardParamDropTarget('serie-xaxis-param', 'X Parameter', function(name, value, oldValue) { | |
71 | + this.addStandardParamDropTarget('serie-xaxis-param', 'X Parameter', function (name, value, oldValue) { | |
73 | 72 | me.object.set('serie-xaxis-param', value); |
74 | - me.crtTree.refresh(); | |
73 | + me.crtTree.refresh(); | |
75 | 74 | }), |
76 | 75 | this.addStandardFieldSet('X Values range', '', this.getXValuesRangeItems()), |
77 | 76 | this.addStandardCombo('serie-resampling-mode', 'Reference parameter for resampling', amdaPlotObj.PlotObjectConfig.availableResamplingModes) |
78 | 77 | ]; |
79 | - | |
80 | - Ext.each(baseSerieItems, function(item) { | |
78 | + | |
79 | + Ext.each(baseSerieItems, function (item) { | |
81 | 80 | serieItems.push(item); |
82 | 81 | }); |
83 | - | |
82 | + var clor_picker = Ext.create('Ext.picker.Color', { | |
83 | + value: '993300', // initial selected color | |
84 | + renderTo: Ext.getBody(), | |
85 | + listeners: { | |
86 | + select: function (picker, selColor) { | |
87 | + alert(selColor); | |
88 | + } | |
89 | + } | |
90 | + }); | |
91 | + | |
84 | 92 | serieItems.push(this.addStandardFieldSet('Error Bar', 'serie-errorbar-activated', this.getErrorBarItems())); |
85 | 93 | return serieItems; |
86 | 94 | } | ... | ... |
... | ... | @@ -0,0 +1,92 @@ |
1 | +/* | |
2 | + * To change this license header, choose License Headers in Project Properties. | |
3 | + * To change this template file, choose Tools | Templates | |
4 | + * and open the template in the editor. | |
5 | + */ | |
6 | + | |
7 | +var windowIndex = 0; | |
8 | + | |
9 | +Ext.define('amdaUI.openedWindows',{ | |
10 | + extend:'Ext.ux.desktop.Module', | |
11 | + init : function() { | |
12 | + | |
13 | + this.launcher = { | |
14 | + text: 'My Windows', | |
15 | + iconCls: 'bogus', | |
16 | + listeners: { | |
17 | + scope : this, | |
18 | + 'beforeshow': function(obj, e) { | |
19 | + this.beforeshow(obj); | |
20 | + }, | |
21 | + 'beforerender': function(obj, e) { | |
22 | + // this.loadOpenedWindows(obj); | |
23 | + }, | |
24 | + 'mouseover': function(obj, e) { | |
25 | + console.log('In mouseover', obj); | |
26 | + } | |
27 | + }, | |
28 | + handler: function() { | |
29 | + return false; | |
30 | + }, | |
31 | + menu: { | |
32 | + items: [] | |
33 | + } | |
34 | + }; | |
35 | + | |
36 | + for (var i = 0; i < 5; ++i) { | |
37 | + this.launcher.menu.items.push({ | |
38 | + text: 'Window '+(++windowIndex), | |
39 | + iconCls:'bogus', | |
40 | + handler : this.createWindow, | |
41 | + scope: this, | |
42 | + windowId: windowIndex | |
43 | + }); | |
44 | + } | |
45 | + }, | |
46 | + | |
47 | + createWindow : function(src){ | |
48 | + var desktop = this.app.getDesktop(); | |
49 | + var win = desktop.getWindow('bogus'+src.windowId); | |
50 | + if(!win){ | |
51 | + win = desktop.createWindow({ | |
52 | + id: 'bogus'+src.windowId, | |
53 | + title:src.text, | |
54 | + width:640, | |
55 | + height:480, | |
56 | + html : '<p>Something useful would be in here.</p>', | |
57 | + iconCls: 'bogus', | |
58 | + animCollapse:false, | |
59 | + constrainHeader:true | |
60 | + }); | |
61 | + } | |
62 | + win.show(); | |
63 | + return win; | |
64 | + }, | |
65 | + | |
66 | + | |
67 | + beforeshow: function(obj){ | |
68 | + var opendedIems = myDesktopApp.getDesktop().taskbar.windowBar.items.items; | |
69 | + var menuItems = []; | |
70 | + opendedIems.forEach(function(record){ | |
71 | + if(record.iconCls && record.iconCls != "icon-elements"){ | |
72 | + | |
73 | + menuItems.push({ | |
74 | + text: record.text, | |
75 | + iconCls:record.iconCls, | |
76 | + windowId: record.id, | |
77 | + handler : function(obj, e){ | |
78 | + var win = myDesktopApp.getDesktop().getWindow(obj.windowId); | |
79 | + if(win) | |
80 | + win.show(); | |
81 | + }, | |
82 | + scope: this | |
83 | + }); | |
84 | + } | |
85 | + }); | |
86 | + while(obj.menu.items.length){ | |
87 | + obj.menu.items.pope(); | |
88 | + } | |
89 | + obj.menu.items.add(menuItems); | |
90 | + }, | |
91 | +}); | |
92 | + | ... | ... |
php/classes/AmdaAction.php
... | ... | @@ -678,7 +678,7 @@ class AmdaAction |
678 | 678 | $result = $this->executeRequest((Object) array( |
679 | 679 | 'compression' => 'none', |
680 | 680 | 'fileformat' => 'internal', |
681 | - 'timeformat' => 'YYYY-MM-DDThh:mm:ss.u', | |
681 | + 'timeformat' => 'YYYY-MM-DDThh:mm:ss.u', | |
682 | 682 | 'sendToSamp' => FALSE, |
683 | 683 | 'list' => array( |
684 | 684 | (Object) array( | ... | ... |