Blame view

js/app/views/UploadUI.js 1.48 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
59
60
61
62
63
64
/**
 * Project   : AMDA-NG
 * Name      : UploadUI.js
 * @class    amdaUI.UploadUI
 * @extends  Ext.container.Container 
 * @brief    Upload Module UI definition (View)
 * @author 	 Elena
 * @version  $Id: UploadUI.js 2831 2015-03-26 10:33:42Z elena $	            
 */
 
 
Ext.define('amdaUI.UploadUI', {
	extend: 'Ext.container.Container',
	alias: 'widget.panelTabUpload',

	requires: [
        'amdaUI.UploadPanelUI' 
	],
	
	constructor: function(config) {	  
		this.init(config);
		this.callParent(arguments);			        
	},
	   	
	init : function(config) { 
	  
	  var myConf = {
		layout: 'border',		 
		items: [ {
			xtype: 'tabpanel',
			region: 'center',  
			activeTab : 0,   
			items : 
			[ 
			  { xtype: 'panelUpload', panelType : 'file'},
			  { xtype: 'panelUpload',  panelType : 'timetable'}
			]
		      },
		      {
			xtype: 'panel', 
			region: 'south',
			title: 'Information',
			collapsible: true,
			height: 100,
			autoHide: false,
			iconCls: 'icon-information',
			html: 'Select local or remote file (time table) to upload<br/>File size is limited to <b><i>'
				+ myDesktopApp.MAX_UPLOADED_FILE_SIZE/1000000+'MB</i></b><br/>Milliseconds are ignored for the moment',
		        autoScroll : true,
			loader: {}
		      }
		]
	  	};
        
	  Ext.apply (this, Ext.apply(arguments, myConf));
    },
    
    forceUpload : function(url,format) {
    	//this.setDisabled(true);
    	this.items.items[0].items.items[0].forceUpload(url,format);
    	//this.setDisabled(false);
    }
	
});