Blame view

js/app/controllers/ResourcesMgrModule.js 1.56 KB
16035364   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/** 
 * Project  : AMDA-NG4
 * Name     : ResourcesMgrModule.js
 * @class   amdaDesktop.ResourcesMgrModule
 * @extends amdaDesktop.AmdaModule
 * @brief   Resources Manager Module controller definition
 * This Module allow user to manage resources of his workspace
 * @author  CDA
 * @version $Id: $
 * @todo Do we need real Module ??? 
 *******************************************************************************
 *    FT Id     :   Date   : Name - Description
 *******************************************************************************
 *  :           :07/02/2011: CDA - File creation
 */


Ext.define('amdaDesktop.ResourcesMgrModule', {
		
	extend: 'amdaDesktop.AmdaModule',
	
	requires: [
        'amdaUI.ResourcesMgrUI'
    ],
    
	contentId : 'resrcMgrUI',
			
	createWindow : function(src){
	    var desktop = this.app.getDesktop();
	    var win = desktop.getWindow(this.id);
	    if(!win){
	        win = desktop.createWindow({
	            id: this.id,
	            title:this.title,
	            width:550,
	            height:370,           
	            iconCls : this.icon,
	            border : false,
	            constrainHeader : true,
	            animCollapse: false,
	            tools: [{
	                type: 'help',
	                qtip: this.helpTitle,
	                handler: function(event, toolEl, panel){
	                    //TODO: help logic
	                }
	            }],
	            layout: 'fit',
	            items: [
                    {xtype: 'panelResrcMgr'}
                ]
	        });
	    }
	    win.show();
	    return win;
	}

});