Blame view

js/app/views/UploadUI.js 1.8 KB
16035364   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
 * 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: [
901ba3f3   Elena.Budnik   upload catalog
17
		'amdaUI.UploadPanelUI' 
16035364   Benjamin Renard   First commit
18
19
20
21
22
23
24
	],
	
	constructor: function(config) {	  
		this.init(config);
		this.callParent(arguments);			        
	},
	   	
901ba3f3   Elena.Budnik   upload catalog
25
26
27
28
29
30
31
32
33
34
35
	init : function(config) 
	{ 	  
		var myConf = 
		{
			layout: 'border',		 
			items: [ 
			{
				xtype: 'tabpanel',
				region: 'center',  
				activeTab : 0,   
				items : [ 
73625886   Elena.Budnik   added auto, manua...
36
37
38
				{ xtype: 'panelUpload',  panelType : 'file', title : 'File', localUploadName : 'localFileName', remoteUploadName : 'remoteFile'},
				{ xtype: 'panelUpload',  panelType : 'timetable', title : 'Time Table', localUploadName : 'localTTName', remoteUploadName : 'remoteTT'},
				{ xtype: 'panelUpload',  panelType : 'catalog', title : 'Catalog', localUploadName : 'localCatName', remoteUploadName :'remoteCat'}]
901ba3f3   Elena.Budnik   upload catalog
39
40
41
42
43
44
			},
			{
				xtype: 'panel', 
				region: 'south',
				title: 'Information',
				collapsible: true,
42863f42   Elena.Budnik   collapseMode: "he...
45
				collapseMode: 'header',
901ba3f3   Elena.Budnik   upload catalog
46
47
48
49
50
51
52
53
54
				height: 100,
				autoHide: false,
				iconCls: 'icon-information',
				html: 'Select local or remote file (time table, catalog) 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: {}
			}]
		};
16035364   Benjamin Renard   First commit
55
        
901ba3f3   Elena.Budnik   upload catalog
56
57
		Ext.apply (this, Ext.apply(arguments, myConf));
	},
16035364   Benjamin Renard   First commit
58
    
f60f0bd9   Benjamin Renard   Fix upload from s...
59
	forceUpload : function(url,format,onFinish) 
901ba3f3   Elena.Budnik   upload catalog
60
61
	{
		//this.setDisabled(true);
f60f0bd9   Benjamin Renard   Fix upload from s...
62
		this.items.items[0].items.items[0].forceUpload(url,format,onFinish);
901ba3f3   Elena.Budnik   upload catalog
63
64
		//this.setDisabled(false);
	}	
16035364   Benjamin Renard   First commit
65
});