UploadModule.js 1.18 KB
/** 
 * Project   : AMDA-NG
 * Name      : UploadModule.js
 * @class    amdaDesktop.UploadModule
 * @extends  amdaDesktop.AmdaModule
 * @brief    Upload Module controller definition 
 * @author   Elena
 * @version  $Id: UploadModule.js 2124 2014-02-21 14:06:14Z elena $	 
 */

Ext.define('amdaDesktop.UploadModule', {
	extend: 'amdaDesktop.AmdaModule',
	
	requires: [
        'amdaUI.UploadUI' 
    ],
    
	contentId : 'uploadUI',	

     
    /**
     * @cfg {String} window definitions
     * @required
     */

	width: 320, 
	height: 510,
 	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;
    	loadMask.show();
    	this.createWindow(function (o)
    			{
    				var desktop = myDesktopApp.getDesktop();
    				var win = desktop.getWindow(me.id);
    				if (win)
    				{
    					win.items.items[0].forceUpload(url,format);
    					win.close();
    				}
    				loadMask.hide();
    			});
    	
    }
	
});