UploadModule.js
1.12 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
/**
* Project : AMDA-NG
* Name : UploadModule.js
* @class amdaDesktop.UploadModule
* @extends amdaDesktop.AmdaModule
* @brief Upload Module controller definition
* @author Elena
*/
Ext.define('amdaDesktop.UploadModule', {
extend: 'amdaDesktop.AmdaModule',
requires: [
'amdaUI.UploadUI'
],
contentId : 'uploadUI',
/**
* @cfg {String} window definitions
* @required
*/
width: 330,
height: 520,
uiType : 'panelTabUpload',
helpTitle : 'Help on Upload Module',
helpFile : 'uploadHelp',
init : function() {
this.launcher = {
text : this.title,
iconCls : this.icon,
handler : this.createWindow,
scope : this
};
},
uploadNotification : function(url,format){
var me = this;
var desktop = myDesktopApp.getDesktop();
var win = desktop.getWindow(me.id);
if (!win) {
this.createWindow(function (o)
{
win = desktop.getWindow(me.id);
if (win){
win.items.items[0].forceUpload(url,format, function() {
win.close();
});
}
});
}
else {
win.items.items[0].forceUpload(url,format,function() {
win.close();
});
}
}
});