/** * 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(); }); } } });