Blame view

js/app/AmdaApp.js 22.9 KB
16035364   Benjamin Renard   First commit
1
2
3
4
5
6
7
/** 
 * Project  : AMDA-NG4
 * Name     : AmdaApp.js
 * @class   amdaApp.AmdaApp 
 * @extends Ext.ux.desktop.App
 * @brief   Main class defining Amda Desktop and its Modules
 * @author  Ext JS Library 4.0 Copyright(c) 2006-2011 Sencha Inc. licensing@sencha.com
16035364   Benjamin Renard   First commit
8
9
10
11
12
13
 */

 
Ext.define('amdaApp.AmdaApp', {
    extend: 'Ext.ux.desktop.App',

f792a3de   elena   catalog ihm
14
    requires: [      
16035364   Benjamin Renard   First commit
15
16
17
18
19
20
21
22
       'Ext.window.MessageBox',
       'Ext.ux.desktop.ShortcutModel',
       'amdaUI.SampToolBarUI',
       'amdaDesktop.DynamicModule',
       'MyDesktop.Settings'
    ],
    
    dynamicModules: {
5cfea1f2   elena   vizu draft
23
24
25
26
27
28
29
	visu : {
    		id          : 'visu-win',
    		icon        : 'icon-visu_catalog',
    		title       : 'Visualization',
    		source      : 'amdaDesktop.VisuModule',
    		useLauncher : true
    	},    
d18b535d   elena   catalog draft + c...
30
31
32
33
34
35
36
	statistics : {
    		id          : 'statistics-win',
    		icon        : 'icon-statistics',
    		title       : 'Statistics',
    		source      : 'amdaDesktop.StatisticsModule',
    		useLauncher : true
    	},
f792a3de   elena   catalog ihm
37
38
39
	catalog : {
    		id          : 'catalog-win',
    		icon        : 'icon-catalog',
d18b535d   elena   catalog draft + c...
40
    		title       : 'Manage catalogs',
f792a3de   elena   catalog ihm
41
42
43
    		source      : 'amdaDesktop.CatalogModule',
    		useLauncher : true
    	},
16035364   Benjamin Renard   First commit
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
    	param : {
    		id          : 'param-win',
    		icon        : 'icon-parameters',
    		title       : 'Create/modify parameters',
    		source      : 'amdaDesktop.ParameterModule',
    		useLauncher : true
    	},
    	tt : {
    		id          : 'timetab-win',
    		icon        : 'icon-manage-tt',
    		title       : 'Manage Time Tables',
    		source      : 'amdaDesktop.TimeTableModule',
    		useLauncher : true
    	},
    	tt_op : {
    		id          : 'ttsOpe-win',
    		icon        : 'icon-tts',
    		title       : 'Operations on Time Tables',
    		source      : 'amdaDesktop.TimeTableOperationModule',
    		useLauncher : true
    	},
    	plot : {
18d4a11e   Benjamin Renard   Save and load plo...
66
            id          : 'plot-win',
5cfea1f2   elena   vizu draft
67
    	    icon         : 'icon-plot',
16035364   Benjamin Renard   First commit
68
    	    title       : 'Plot Manager',
18d4a11e   Benjamin Renard   Save and load plo...
69
    	    source      : 'amdaDesktop.PlotModule',
16035364   Benjamin Renard   First commit
70
71
72
    	    useLauncher : true
    	},
    	search : {
f792a3de   elena   catalog ihm
73
	    id          : 'search-win',
16035364   Benjamin Renard   First commit
74
75
76
77
78
79
    	    icon        : 'icon-search',
    	    title       : 'Data Mining',
    	    source      : 'amdaDesktop.SearchModule',
    	    useLauncher : true
    	},
    	download : {
f792a3de   elena   catalog ihm
80
	    id          : 'down-win',
16035364   Benjamin Renard   First commit
81
82
    	    icon        : 'icon-download',
    	    title       : 'Download data',
f792a3de   elena   catalog ihm
83
	    source      : 'amdaDesktop.DownloadModule',
16035364   Benjamin Renard   First commit
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
    	    useLauncher : true
    	},
    	upload : {
    		id          : 'up-win',
    		icon        : 'icon-mydata',
    		title       : 'Upload data',
    		source      : 'amdaDesktop.UploadModule',
    		useLauncher : true
    	},
    	interop : {
    		id          : 'interop-win',
    		icon        : 'icon-interop',
    		title       : 'Interoperability',
    		source      : 'amdaDesktop.InteropModule',
    		useLauncher : true
    	},
    	info : {
    		id          : 'info-win',
    		icon        : 'icon-information',
    		title       : 'About AMDA',
    		source      : 'amdaDesktop.AboutModule',
    		useLauncher : false
    	},	
    	explorer : {
    		id          : 'explorer-win',	
    	    icon        : 'icon-elements',
    	    title       : 'Workspace Explorer',
    	    source      : 'amdaDesktop.ExplorerModule',
    	    useLauncher : false
    	},
    	my_data : {
    		id          : 'mydata-win',
    	    icon        : 'icon-mydata',
    	    title       : 'Define parameter',
    	    source      : 'amdaDesktop.MyDataModule',
    	    useLauncher : false
    	},
    	help : {
    		id          : 'help-win',
    		icon        : 'icon-help',
    		title       : 'Help',
    		source      : 'amdaDesktop.HelpModule',
    	    useLauncher : false
    	},
    	feedback : {
    		id          : 'feed-win',
    		icon        : 'icon-feedback',
    		title       : 'Feedback',
    		source      : 'amdaDesktop.FeedbackModule',
    	    useLauncher : false
    	},
    	filters : {
    		id          : 'filters-win',
    		icon        : 'icon-filter',
    		title       : 'Filters',
    		source      : 'amdaDesktop.FiltersModule',
    	    useLauncher : false
    	},
16035364   Benjamin Renard   First commit
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
    	result : {
    		id          : 'result-win',
    		contentId   : 'resultUI',
    		icon        : 'icon-results',
    		title       : 'Results',
    		source      : 'amdaDesktop.ResultModule',
    	    useLauncher : false
    	},
    	astro : {
    		id          : 'astroimages-win',
    		icon        : 'icon-interop',
    		title       : 'Astronomical Images',
    		source      : 'amdaDesktop.AstroImagesModule',
    	    useLauncher : false
    	}
    },
    
// IDs of Modules working with  parameters; used in Alias Node 
    paramModulesID : ['plot-win', 'param-win', 'search-win', 'down-win'],
   
// Important system constants
    MAX_UPLOADED_FILE_SIZE : 30000000, // 30MB
    
    listeners : {
		scope : this,
		beforeunload : function ()
		{
aa94fd24   elena   Merge with last svn
169

16035364   Benjamin Renard   First commit
170
171
172
173
174
175
176
177
			var interopModule = myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.interop.id);
			if (interopModule)
				interopModule.forceSampDisconnect();
			return true;
		},
		ready : function () 
                {
				  //AKKA - Clean user WS
aa94fd24   elena   Merge with last svn
178
179
	          AmdaAction.cleanUserWS(function(res,e){},this);
		}
16035364   Benjamin Renard   First commit
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
        },
    
    init: function() {
        // custom logic before getXYZ methods get called...

        this.callParent();

        // now ready...      
        //override createWindow method of desktop
        Ext.override(Ext.ux.desktop.Desktop, {
            createWindow: function (config, cls) {
                var me = this;
                var win = this.callParent([config,cls]);
                win.on({
                    boxready: function (w) {
                        w.dd.xTickSize = me.xTickSize;
                        w.dd.yTickSize = me.yTickSize;

                        if (w.resizer) {
                            w.resizer.widthIncrement = me.xTickSize;
                            w.resizer.heightIncrement = me.yTickSize;
                        }
                        
                        if (w.y < 0)
                            w.el.setY(0);
                        
                        if (w.x + w.width > me.el.getWidth())
                            w.el.setX(me.el.getWidth()-w.width);
                        
                        if (w.y + w.height > me.el.getHeight())
                            w.el.setY((me.el.getHeight()-w.height > 0) ? me.el.getHeight()-w.height : 0);
                        
                    },
                    single: true
                });
                return win;
            }
        });

    },
//create InfoBox 
      infoMsg : function(msg) {
	  Ext.Msg.show({
	      title: 'AMDA Info',
	      cls: 'infoMsg',
	      msg: msg,	 
	      modal: false,
	      autoScroll: true,
	      resizable: true,
	      icon: Ext.Msg.INFO,
	      buttons: Ext.Msg.OK
	  });
	},
	
//create WarningBox 
      warningMsg : function(msg) {
	  Ext.Msg.show({
	      title: 'Attention',
	      msg: msg,	 
	      icon: Ext.Msg.WARNING,
	      buttons: Ext.Msg.OK
	  });
	},
	
//create ErrorBox 
      errorMsg : function(msg) {
	  Ext.Msg.show({
	      title: 'Failure',
	      msg: msg,	 
	      icon: Ext.Msg.ERROR,
	      buttons: Ext.Msg.OK
	  });
	},	   
				  
    getModules : function(){
    	var allModules = [];
    	
    	//Add dynamic modules
    	Ext.Object.each(this.dynamicModules, function(key, def) {
    		allModules.push(new amdaDesktop.DynamicModule(def.id, def.icon, def.title, def.source, def.useLauncher));
    	});
    	
        return allModules;
    },

    getDesktopConfig: function () {
        var me = this, ret = me.callParent();

        var desktopId = 'AmdaDesktop';
        var wallpaper = Ext.state.Manager.getProvider().get(desktopId+'_wallpaper');
        if (!wallpaper)
        	wallpaper = 'js/resources/images/desktop/wallpapers/Cdpp2.jpg';
        return Ext.apply(ret, {
aa94fd24   elena   Merge with last svn
273
            id       : desktopId,
16035364   Benjamin Renard   First commit
274
275
276
277
278
279
280
281
282
            contextMenuItems: [
                { text: 'Change Settings', handler: me.onSettings, scope: me }
            ],

            shortcuts: Ext.create('Ext.data.Store', {
                model: 'Ext.ux.desktop.ShortcutModel',
                data: [  
                   { name: 'Help',  iconCls: 'help', module: 'help-win' },  
                   { name: 'Create/Modify parameter',  iconCls: 'edit', module: 'param-win' },                     
18d4a11e   Benjamin Renard   Save and load plo...
283
                   { name: 'Plot data',  iconCls: 'plot', module: 'plot-win'},
16035364   Benjamin Renard   First commit
284
                   { name: 'Data mining',  iconCls: 'search', module: 'search-win'},
d18b535d   elena   catalog draft + c...
285
		   { name: 'Statistics',  iconCls: 'statistics', module: 'statistics-win'},
16035364   Benjamin Renard   First commit
286
287
                   { name: 'Download data',  iconCls: 'download_manager', module: 'down-win'},
                   { name: 'Upload data',  iconCls: 'mydata', module: 'up-win'},
aa94fd24   elena   Merge with last svn
288
289
                   { name: 'Manage TimeTables',    iconCls: 'timeTable', module: 'timetab-win' },
                   { name: 'TimeTables operations',   iconCls: 'operations', module: 'ttsOpe-win' },
d18b535d   elena   catalog draft + c...
290
                   { name: 'Manage catalogs',  iconCls: 'catalog', module: 'catalog-win'},
5cfea1f2   elena   vizu draft
291
                   { name: 'Visualize catalogs',  iconCls: 'visu_catalog', module: 'visu-win'},
16035364   Benjamin Renard   First commit
292
293
294
295
296
297
298
299
300
301
302
303
                   { name: 'Interoperability',   iconCls: 'interop', module: 'interop-win' }
               ]
            }),

            wallpaper: wallpaper,
            wallpaperStretch: false
        });
    },

    // config for the start menu
    getStartConfig : function() {
        var me = this, ret = me.callParent();
16035364   Benjamin Renard   First commit
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
        return Ext.apply(ret, {
            title: sessionID, 
            iconCls: 'icon-user',
            height: 270,
            toolConfig: {
                width: 130,
                items: [
                    {
                        text:'Settings',
                        iconCls:'settings',
                        handler: me.onSettings,
                        scope: me
                    },
                    '-',                    
     /*               {
                        text : 'Manage Workspaces',
                        iconCls : 'icon-manage-ws',
                        id : 'mngws-win-tool',
                        scope : this,
                        disabled: true,
                        handler : function(obj, e) {
                            e.stopEvent();
                            var moduleId = obj.el.id;
                            var module = this.getModule(moduleId.replace('-tool', ''));
                            if (module) {
                                module.createWindow();
                            }
                        }
                    }, {
                        text : 'Manage Resources',
                        iconCls : 'icon-manage-resrc',
                        id : 'resrc-win-tool',
                        disabled : true,
                        handler : function(obj, e) {
                            e.stopEvent();
                            var moduleId = obj.el.id;
                            var module = this.getModule(moduleId.replace('-tool', ''));
                            if (module) {
                                module.createWindow();
                            }
                        },
                        scope : this
                    },
    */
                    {
                        text : 'Profile',
                        iconCls : 'icon-user',
                        id : 'profile-win-tool',
                        handler : function(obj, e) {
                            e.stopEvent();
                            AmdaAction.getUserInfo(this.onGetUserInfo,this);
                        },
                        scope : this
                    },{
                        text : 'Feedback',
                        iconCls : 'icon-feedback',
                        id : 'feed-win-tool',
                        handler : function(obj, e) {
                            e.stopEvent();
                            var moduleId = obj.el.id;
                            this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) {
                            	module.createWindow();
                            });
                            
                        },
                        scope : this  
                    }, {
                        text : 'Help',
                        iconCls : 'icon-help',
                        id : 'help-win-tool',
                        scope : this,
                        handler : function(obj, e) {
                            e.stopEvent();
                            var moduleId = obj.el.id;
                            this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) {
                            	module.createWindow();
                            });
                        }
                    }, {
                        text : 'About AMDA',
                        iconCls : 'icon-information',
                        id : 'info-win-tool',
                        scope : this,
                        handler : function(obj, e) {
                            e.stopEvent();
                            var moduleId = obj.el.id;
                            this.getLoadedModule(moduleId.replace('-tool', ''), true, function(module) {
                            	module.createWindow();
                            });
                        }
                    }, '-', {
                        text : 'Workspaces',
                        iconCls : 'icon-ws',
                        disabled: true,
                        scope : this
                    }, '-', {
                        text : 'Logout',
                        iconCls : 'logout',
                        scope : this,                     
                        handler : me.onLogout
                    }
                ]
            }
        });
    },
    
    getModuleDefinition: function(id) {
    	return this.getModule(id);
    },
    
    getLoadedModule: function(id, forceLoad, onReady) {
    	var moduleDef = this.getModuleDefinition(id);
    	if (!moduleDef)
    		return null;
    	if (!moduleDef.isReady())
    	{	
    		if (forceLoad)
    		{
    			//loadMask.show();
    			moduleDef.get(function (module) {
    				//loadMask.hide();
    				if (onReady)
    					onReady(module);
    			});
    		}
    		return null;
    	}
    	if (onReady)
			onReady(moduleDef.get());
    	return moduleDef.get();
    },
    
    getTaskbarConfig: function () {
        var ret = this.callParent();
16035364   Benjamin Renard   First commit
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
        return Ext.apply(ret, {
            quickStart: [],
            trayItems: [
                {
                	name: this.dynamicModules.feedback.title, iconCls: 'icon-feedback', 
                	tooltip: { text: this.dynamicModules.feedback.title, align: 'bl-tl' },
                	overflowText: this.dynamicModules.feedback.title,
                	iconCls: this.dynamicModules.feedback.icon,
                	scope: this,
                	handler : function(obj, e) {
                		e.stopEvent();
                		this.getLoadedModule(this.dynamicModules.feedback.id, true, function(module) {
                        	module.createWindow();
                        });
                	}
                },
                {
                    name: this.dynamicModules.info.title, iconCls: 'icon-information', 
                	tooltip: { text: this.dynamicModules.info.title, align: 'bl-tl' },
                	overflowText: this.dynamicModules.info.title,
                	iconCls: this.dynamicModules.info.icon,
                	scope: this,
                	handler : function(obj, e) {
                		e.stopEvent();
                		this.getLoadedModule(this.dynamicModules.info.id, true, function(module) {
                        	module.createWindow();
                        });
                    }
                },
                {
                    name: 'Logout', iconCls : 'logout',
                    tooltip: { text: 'Logout', align: 'bl-tl' },
                    overflowText: 'Logout',
                    scope : this,                     
                    handler : this.onLogout
                },
                '-',
                { xtype: 'trayclock', flex: 1 }
            ]
        });
    },

    onLogout: function (obj,e) {
    	e.stopEvent();	
    //	var interopModule = this.getModule(amdaDesktop.InteropModule.id);       
    	if (isGuest) { 
           this.guestLogout();             
        }
        else {
            this.saveSessionState();
        }       
    },
    
    onGetUserInfo : function (result, e){
    	var t = e.getTransaction();
		if (e.status) 
		{	
			if (result && result.success)
			{
				// SUCCESS  
				var msg = '<b>Login :</b> '+result['login']+'<br/>';
				msg += ('<b>Last Name :</b> '+result['name']+'<br/>');
				msg += ('<b>First Name :</b> '+result['first_name']+'<br/>');
				msg += ('<b>Groups :</b> '+result['group']+'<br/>');
				msg += ('<b>Email :</b> '+result['email']+'<br/>');
				msg += ('<b>Registration date :</b> '+result['date']+'<br/>');
fdf1413b   Elena.Budnik   TT download
504
							
16035364   Benjamin Renard   First commit
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
				this.infoMsg(msg);
			}
			else
			{
				//ERROR
				this.errorMsg('Cannot get user info');
			}
		}
		else
		{
			// FAILURE
			this.errorMsg('Cannot get user info : '+e.message);
		} 
	},
        
        
    guestLogout: function()
    {
        Ext.Msg.show({
                        title : 'Logout', 
                        msg   :'Your guest workspace is to be deleted. Continue logout ?',
                        buttons : Ext.Msg.YESNO,
                        iconCls : 'logout', 
                        fn : function(btn) {
                          if (btn == 'yes')
                          {
                            AmdaAction.logout(true, function(){
                                sessionID = '';
                                window.location.href ='index.html';  
                            });                                                                                      
                          }                           
                        }
                    });               
    },
    
    forceLogout: function()
    {
      //  myDesktopApp.warningMsg('Your guest session is finished');
        AmdaAction.logout(true, function(){
                                sessionID = '';
                                window.location.href ='index.html';  
                            });  
    },
        
    saveSessionState : function()
    {
        var me = this;
        Ext.Msg.show({
                        title : 'Logout', 
                        msg   :'Do you want to keep current windows sizes and locations<br/> for the next sessions?',
                        buttons : Ext.Msg.YESNOCANCEL,
                        iconCls : 'logout', 
                        fn : function(btn) {
	                  if (btn == 'yes')
	                  {
                            //set wallpaper
                            Ext.state.Manager.getProvider().set(me.desktop.id+'_wallpaper',me.desktop.getWallpaper());
                            //
                            Ext.state.Manager.getProvider().on({
                                    scope : this,
                                    aftersave : function(provider)
                                    {
                                            sessionID = '';
                                            window.location.href ='index.html';
                                    }
                            });
                            Ext.state.Manager.getProvider().saveState();   
                            AmdaAction.logout();         
	                  }
	                  else if (btn == 'no')
	                  {
                              Ext.state.Manager.getProvider().on({
                                    scope : this,
                                    aftersave : function(provider)
                                    {
                                            sessionID = '';
                                            window.location.href ='index.html';
                                    }
                            });
                            Ext.state.Manager.getProvider().set(me.desktop.id+'_wallpaper',me.desktop.getWallpaper()); 
                            Ext.state.Manager.getProvider().saveLastTime(); 
                            AmdaAction.logout(); 
	                  }
                        }
    			});
    },

    onSettings: function () {
        var dlg = new MyDesktop.Settings({
            desktop: this.desktop
        });
        dlg.show();
    },
    
    /**
     * initialization at the start of AMDA-NG webApplication
     */
    initProject : function() {
        moduleIds = new Ext.util.MixedCollection();
        // Adding Workspace Explorer Id
        moduleIds.add(this.dynamicModules.explorer.id);
                           
        moduleIds.each(function(item) {
            this.getLoadedModule(item, true, function (module) {
            	module.createWindow();
            });
        }, this);
aa94fd24   elena   Merge with last svn
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
                
        if (freeSpace < diskQuota / 20) {
            myDesktopApp.warningMsg('Think of cleaning up your work space.<br/>Only ' + 
            Math.round(freeSpace/1024/1024)+ 'MB of '+Math.round(diskQuota/1024/1024) +
            'MB rests');
        }
                    
        if (isFirstVisit && !isGuest) {
            if (isSpecialInfo) {                    
                myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) {
			module.createWindow(isSpecialInfo, 'Welcome to AMDA', true);
		});
            } else {
	
                myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.help.id, true, function(module) {
			module.createWindow();
		});
            }
        } 
        else {
            if (isSpecialInfo && !isNewInfo) {
		myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) {                    
                	module.createWindow(isSpecialInfo, 'Welcome to AMDA', true);
               	});
            }
        }
16035364   Benjamin Renard   First commit
638
        
aa94fd24   elena   Merge with last svn
639
640
641
642
643
644
645
646
647
648
649
650
651
         if (isNewInfo) {
            myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.info.id, true, function(module) {
		//  module.createWindow('releaseNotes.' + AMDAVERSION, 'New Release V'+ AMDAVERSION);              
		module.createWindow(news, 'Amda Latest News');
	    });
        }
        
        if (isGuest) {
            myDesktopApp.warningMsg("Welcome to Guest Session<br/>Guest session lasts for "+
                                    guestSessionDuration/3600+" h maximum<br/>"+
                                    "For extended use time and functionalities (saved sessions)<br/> please register at amda@irap.omp.eu");
            Ext.Function.defer(myDesktopApp.warningMsg,(guestSessionDuration-300)*1000, this, ["Your session will be closed in 5 min!"]);
            Ext.Function.defer(myDesktopApp.forceLogout, guestSessionDuration*1000); 
16035364   Benjamin Renard   First commit
652
        }
aa94fd24   elena   Merge with last svn
653

16035364   Benjamin Renard   First commit
654
655
656
657
658
659
660
661
662
663
664
665
        
        
        this.desktop.taskbar.tray.width = 130;
        this.desktop.taskbar.insert(4,new amdaUI.SampToolBarUI({id : 'samptb', onSwitchConnect : function ()
      	  {
        	myDesktopApp.getLoadedModule(myDesktopApp.dynamicModules.interop.id, true, function(module) {
        		module.switchSampConnect();
        	});
        	
    	  }}));
    }
});
aa94fd24   elena   Merge with last svn