UploadUI.js
1.8 KB
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
65
/**
* 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', 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'}]
},
{
xtype: 'panel',
region: 'south',
title: 'Information',
collapsible: true,
collapseMode: 'header',
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);
}
});