Blame view

js/app/controllers/AstroImagesModule.js 2.51 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
/**
  * Project      :  AMDA-NG
  * Name         : AstroImagesModule.js
  * @plugin 	  amdaDesktop.AstroImagesModule.js
  * @extends 	  amdaDesktop.AmdaModule
  * @brief		 AstroImages controller
  * @author Benjamin
  * @version $Id: AstroImagesModule.js 1664 2013-07-03 11:37:37Z benjamin $
  ********************************************************************************
  *    FT Id     :   Date   : Name - Description
  *******************************************************************************
  *  :          
  */

Ext.define('amdaDesktop.AstroImagesModule', {
		
    extend: 'amdaDesktop.AmdaModule',
    
    requires : [
721edeef   Myriam Bouchemit   delete MAST Archive
20
//      'amdaUI.HstUI',
16035364   Benjamin Renard   First commit
21
22
23
24
25
26
27
28
29
30
31
32
33
34
      'amdaUI.APISImagesUI'
    ],
    
	contentId : 'astroimagesUI',
    
	createWindow : function(startDate,stopDate){
	    var desktop = this.app.getDesktop();
	    var win = desktop.getWindow(this.id);
	    
	    if(!win){
	        win = desktop.createWindow({		  
	            id: this.id,
	            title:this.title, 
		        layout: 'fit',
b7796276   Benjamin Renard   Migration to supp...
35
		        width:650,
e72f367a   Benjamin Renard   Fix some bugs wit...
36
37
	            height:600,
		    minHeight: 600,  
16035364   Benjamin Renard   First commit
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
	            modal: true,
	            iconCls: this.icon,
	            animCollapse:false,
	            constrainHeader:true,
	            bodyPadding : 5,
                stateful : true,
                stateId  : this.id,
                stateEvents: ['move','show','resize'],
	            items : [
	              {
	            	  xtype : 'tabpanel',
	            	  id    : 'astrotabs',
	            	  items : [
	            	           {
	            	        	   title: 'APIS Archive',
	            	        	   xtype: 'panelAPIS',
	            	        	   id   : 'apisPanel'
721edeef   Myriam Bouchemit   delete MAST Archive
55
56
57
58
59
//	            	           },
//	            	           {
//	            	        	   title: 'MAST Archive',
//	            	        	   xtype: 'panelHst',
//	            	        	   id   : 'hstPanel'
16035364   Benjamin Renard   First commit
60
61
62
63
64
65
66
	            	           }
	            	          ]
	              }
	            ]
	        });
	    } 
	    
721edeef   Myriam Bouchemit   delete MAST Archive
67
//	    var hstPanel = win.queryById('hstPanel');
16035364   Benjamin Renard   First commit
68
69
70
		var apisPanel = win.queryById('apisPanel');

		
721edeef   Myriam Bouchemit   delete MAST Archive
71
//		hstPanel.setInterval(startDate,stopDate);
16035364   Benjamin Renard   First commit
72
73
74
75
76
77
78
		apisPanel.setInterval(startDate,stopDate);
	    
	    win.on({
        	show : 
        	{
        		fn : function(o)
        		{
e72f367a   Benjamin Renard   Fix some bugs wit...
79
			win.doLayout();
16035364   Benjamin Renard   First commit
80
	    			var astrotabsUI = win.queryById('astrotabs');
721edeef   Myriam Bouchemit   delete MAST Archive
81
82
//	    	        astrotabsUI.setActiveTab(apisPanel);
//	    	        hstPanel.forceRefresh();
16035364   Benjamin Renard   First commit
83
84
85
86
87
88
89
90
91
	    			apisPanel.forceRefresh();
        		},
        		scope : this
        	}
        });
	    
	    win.show();
	    return win;
	}
e72f367a   Benjamin Renard   Fix some bugs wit...
92
});