UploadUI.js 1.52 KB
/**
 * 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: 'panelUpload',  panelType : 'catalog'}]
			},
			{
				xtype: 'panel', 
				region: 'south',
				title: 'Information',
				collapsible: true,
				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: {}
			}]
		};
        
		Ext.apply (this, Ext.apply(arguments, myConf));
	},
    
	forceUpload : function(url,format,onFinish) 
	{
		//this.setDisabled(true);
		this.items.items[0].items.items[0].forceUpload(url,format,onFinish);
		//this.setDisabled(false);
	}	
});