Index: ssts-web/src/main/webapp/ext/UploadDialog/Ext.ux.UploadDialog.js =================================================================== diff -u -r12331 -r40987 --- ssts-web/src/main/webapp/ext/UploadDialog/Ext.ux.UploadDialog.js (.../Ext.ux.UploadDialog.js) (revision 12331) +++ ssts-web/src/main/webapp/ext/UploadDialog/Ext.ux.UploadDialog.js (.../Ext.ux.UploadDialog.js) (revision 40987) @@ -3,56 +3,53 @@ */ Ext.namespace('Ext.ux.Utils'); + /** * This class implements event queue behaviour. * * @class Ext.ux.Utils.EventQueue * @param function handler Event handler. * @param object scope Handler scope. */ -Ext.ux.Utils.EventQueue = function(handler, scope) -{ +Ext.ux.Utils.EventQueue = function (handler, scope) { if (!handler) { throw 'Handler is required.'; } this.handler = handler; this.scope = scope || window; this.queue = []; this.is_processing = false; - + /** * Posts event into the queue. - * + * * @access public * @param mixed event Event identificator. * @param mixed data Event data. */ - this.postEvent = function(event, data) - { + this.postEvent = function (event, data) { data = data || null; - this.queue.push({event: event, data: data}); + this.queue.push({ event: event, data: data }); if (!this.is_processing) { this.process(); } } - - this.flushEventQueue = function() - { + + this.flushEventQueue = function () { this.queue = []; }, - - /** - * @access private - */ - this.process = function() - { - while (this.queue.length > 0) { - this.is_processing = true; - var event_data = this.queue.shift(); - this.handler.call(this.scope, event_data.event, event_data.data); + + /** + * @access private + */ + this.process = function () { + while (this.queue.length > 0) { + this.is_processing = true; + var event_data = this.queue.shift(); + this.handler.call(this.scope, event_data.event, event_data.data); + } + this.is_processing = false; } - this.is_processing = false; - } } /** @@ -87,8 +84,7 @@ * @param object trans_table Transition / output table. * @param trans_table_scope Transition / output table's methods scope. */ -Ext.ux.Utils.FSA = function(initial_state, trans_table, trans_table_scope) -{ +Ext.ux.Utils.FSA = function (initial_state, trans_table, trans_table_scope) { this.current_state = initial_state; this.trans_table = trans_table || {}; this.trans_table_scope = trans_table_scope || window; @@ -97,26 +93,24 @@ Ext.extend(Ext.ux.Utils.FSA, Ext.ux.Utils.EventQueue, { - current_state : null, - trans_table : null, - trans_table_scope : null, - + current_state: null, + trans_table: null, + trans_table_scope: null, + /** * Returns current state * * @access public * @return mixed Current state. */ - state : function() - { + state: function () { return this.current_state; }, - + /** * @access public */ - processEvent : function(event, data) - { + processEvent: function (event, data) { var transitions = this.currentStateEventTransitions(event); if (!transitions) { throw "State '" + this.current_state + "' has no transition for event '" + event + "'."; @@ -128,108 +122,105 @@ var action = transition.action || transition.a || Ext.emptyFn; var new_state = transition.state || transition.s || this.current_state; var scope = transition.scope || this.trans_table_scope; - + if (this.computePredicate(predicate, scope, data, event)) { this.callAction(action, scope, data, event); - this.current_state = new_state; + this.current_state = new_state; return; } } - + throw "State '" + this.current_state + "' has no transition for event '" + event + "' in current context"; }, - + /** * @access private */ - currentStateEventTransitions : function(event) - { - return this.trans_table[this.current_state] ? + currentStateEventTransitions: function (event) { + return this.trans_table[this.current_state] ? this.trans_table[this.current_state][event] || false : false; }, - + /** * @access private */ - computePredicate : function(predicate, scope, data, event) - { - var result = false; - + computePredicate: function (predicate, scope, data, event) { + var result = false; + switch (Ext.type(predicate)) { - case 'function': - result = predicate.call(scope, data, event, this); - break; - case 'array': - result = true; - for (var i = 0, len = predicate.length; result && (i < len); i++) { - if (Ext.type(predicate[i]) == 'function') { - result = predicate[i].call(scope, data, event, this); - } - else { - throw [ - 'Predicate: ', - predicate[i], - ' is not callable in "', - this.current_state, - '" state for event "', - event - ].join(''); - } - } - break; - case 'boolean': - result = predicate; - break; - default: - throw [ - 'Predicate: ', - predicate, - ' is not callable in "', - this.current_state, - '" state for event "', - event - ].join(''); + case 'function': + result = predicate.call(scope, data, event, this); + break; + case 'array': + result = true; + for (var i = 0, len = predicate.length; result && (i < len); i++) { + if (Ext.type(predicate[i]) == 'function') { + result = predicate[i].call(scope, data, event, this); + } + else { + throw [ + 'Predicate: ', + predicate[i], + ' is not callable in "', + this.current_state, + '" state for event "', + event + ].join(''); + } + } + break; + case 'boolean': + result = predicate; + break; + default: + throw [ + 'Predicate: ', + predicate, + ' is not callable in "', + this.current_state, + '" state for event "', + event + ].join(''); } return result; }, - + /** * @access private */ - callAction : function(action, scope, data, event) - { + callAction: function (action, scope, data, event) { switch (Ext.type(action)) { - case 'array': - for (var i = 0, len = action.length; i < len; i++) { - if (Ext.type(action[i]) == 'function') { - action[i].call(scope, data, event, this); - } - else { - throw [ - 'Action: ', - action[i], - ' is not callable in "', - this.current_state, - '" state for event "', - event - ].join(''); - } - } - break; - case 'function': - action.call(scope, data, event, this); - break; - default: - throw [ - 'Action: ', - action, - ' is not callable in "', - this.current_state, - '" state for event "', - event - ].join(''); + case 'array': + for (var i = 0, len = action.length; i < len; i++) { + if (Ext.type(action[i]) == 'function') { + action[i].call(scope, data, event, this); + } + else { + throw [ + 'Action: ', + action[i], + ' is not callable in "', + this.current_state, + '" state for event "', + event + ].join(''); + } + } + break; + case 'function': + action.call(scope, data, event, this); + break; + default: + throw [ + 'Action: ', + action, + ' is not callable in "', + this.current_state, + '" state for event "', + event + ].join(''); } } }); @@ -245,209 +236,198 @@ * File upload browse button. * * @class Ext.ux.UploadDialog.BrowseButton - */ -Ext.ux.UploadDialog.BrowseButton = Ext.extend(Ext.Button, -{ - input_name : 'file', - - input_file : null, - - original_handler : null, - - original_scope : null, - - /** - * @access private - */ - initComponent : function() + */ +Ext.ux.UploadDialog.BrowseButton = Ext.extend(Ext.Button, { - Ext.ux.UploadDialog.BrowseButton.superclass.initComponent.call(this); - this.original_handler = this.handler || null; - this.original_scope = this.scope || window; - this.handler = null; - this.scope = null; - }, - - /** - * @access private - */ - onRender : function(ct, position) - { - Ext.ux.UploadDialog.BrowseButton.superclass.onRender.call(this, ct, position); - this.createInputFile(); - }, - - /** - * @access private - */ - createInputFile : function() - { - var button_container = this.el.child('.x-btn-center'); - button_container.position('relative'); - this.input_file = Ext.DomHelper.append( - button_container, - { - tag: 'input', - type: 'file', - size: 1, - name: this.input_name || Ext.id(this.el), - style: 'position: absolute; display: block; border: none; cursor: pointer' - }, - true - ); - - this.input_file.setOpacity(0.0); - this.adjustInputFileBox(); - - if (this.handleMouseEvents) { - this.input_file.on('mouseover', this.onMouseOver, this); + input_name: 'file', + + input_file: null, + + original_handler: null, + + original_scope: null, + + /** + * @access private + */ + initComponent: function () { + Ext.ux.UploadDialog.BrowseButton.superclass.initComponent.call(this); + this.original_handler = this.handler || null; + this.original_scope = this.scope || window; + this.handler = null; + this.scope = null; + }, + + /** + * @access private + */ + onRender: function (ct, position) { + Ext.ux.UploadDialog.BrowseButton.superclass.onRender.call(this, ct, position); + this.createInputFile(); + }, + + /** + * @access private + */ + createInputFile: function () { + var button_container = this.el.child('.x-btn-center'); + button_container.position('relative'); + this.input_file = Ext.DomHelper.append( + button_container, + { + tag: 'input', + type: 'file', + size: 1, + name: this.input_name || Ext.id(this.el), + style: 'position: absolute; display: block; border: none; cursor: pointer' + }, + true + ); + + this.input_file.setOpacity(0.0); + this.adjustInputFileBox(); + + if (this.handleMouseEvents) { + this.input_file.on('mouseover', this.onMouseOver, this); this.input_file.on('mousedown', this.onMouseDown, this); - } - - if(this.tooltip){ - if(typeof this.tooltip == 'object'){ - Ext.QuickTips.register(Ext.apply({target: this.input_file}, this.tooltip)); - } - else { - this.input_file.dom[this.tooltipType] = this.tooltip; + } + + if (this.tooltip) { + if (typeof this.tooltip == 'object') { + Ext.QuickTips.register(Ext.apply({ target: this.input_file }, this.tooltip)); } + else { + this.input_file.dom[this.tooltipType] = this.tooltip; + } } - - this.input_file.on('change', this.onInputFileChange, this); - this.input_file.on('click', function(e) { e.stopPropagation(); }); - }, - /** - * @access private - */ - autoWidth : function() - { - Ext.ux.UploadDialog.BrowseButton.superclass.autoWidth.call(this); - this.adjustInputFileBox(); - }, + this.input_file.on('change', this.onInputFileChange, this); + this.input_file.on('click', function (e) { e.stopPropagation(); }); + }, - /** - * @access private - */ - adjustInputFileBox : function() - { - var btn_cont, btn_box, inp_box, adj; + /** + * @access private + */ + autoWidth: function () { + Ext.ux.UploadDialog.BrowseButton.superclass.autoWidth.call(this); + this.adjustInputFileBox(); + }, - if (this.el && this.input_file) { - btn_cont = this.el.child('.x-btn-center'); - btn_box = btn_cont.getBox(); - this.input_file.setStyle('font-size', (btn_box.width * 0.5) + 'px'); - inp_box = this.input_file.getBox(); - adj = {x: 3, y: 3} - if (Ext.isIE) { - adj = {x: -3, y: 3} - } - this.input_file.setLeft(btn_box.width - inp_box.width + adj.x + 'px'); - this.input_file.setTop(btn_box.height - inp_box.height + adj.y + 'px'); - } - }, - - /** - * @access public - */ - detachInputFile : function(no_create) - { - var result = this.input_file; - - no_create = no_create || false; - - if (typeof this.tooltip == 'object') { - Ext.QuickTips.unregister(this.input_file); + /** + * @access private + */ + adjustInputFileBox: function () { + var btn_cont, btn_box, inp_box, adj; + + if (this.el && this.input_file) { + btn_cont = this.el.child('.x-btn-center'); + btn_box = btn_cont.getBox(); + this.input_file.setStyle('font-size', (btn_box.width * 0.5) + 'px'); + inp_box = this.input_file.getBox(); + adj = { x: 3, y: 3 } + if (Ext.isIE) { + adj = { x: -3, y: 3 } + } + this.input_file.setLeft(btn_box.width - inp_box.width + adj.x + 'px'); + this.input_file.setTop(btn_box.height - inp_box.height + adj.y + 'px'); + } + }, + + /** + * @access public + */ + detachInputFile: function (no_create) { + var result = this.input_file; + + no_create = no_create || false; + + if (typeof this.tooltip == 'object') { + Ext.QuickTips.unregister(this.input_file); + } + else { + this.input_file.dom[this.tooltipType] = null; + } + this.input_file.removeAllListeners(); + this.input_file = null; + + if (!no_create) { + this.createInputFile(); + } + return result; + }, + + /** + * @access public + */ + getInputFile: function () { + return this.input_file; + }, + + /** + * @access public + */ + disable: function () { + Ext.ux.UploadDialog.BrowseButton.superclass.disable.call(this); + this.input_file.dom.disabled = true; + }, + + /** + * @access public + */ + enable: function () { + Ext.ux.UploadDialog.BrowseButton.superclass.enable.call(this); + this.input_file.dom.disabled = false; + }, + + /** + * @access public + */ + destroy: function () { + var input_file = this.detachInputFile(true); + input_file.remove(); + input_file = null; + Ext.ux.UploadDialog.BrowseButton.superclass.destroy.call(this); + }, + + /** + * @access private + */ + onInputFileChange: function () { + if (this.original_handler) { + this.original_handler.call(this.original_scope, this); + } } - else { - this.input_file.dom[this.tooltipType] = null; - } - this.input_file.removeAllListeners(); - this.input_file = null; - - if (!no_create) { - this.createInputFile(); - } - return result; - }, - - /** - * @access public - */ - getInputFile : function() - { - return this.input_file; - }, - - /** - * @access public - */ - disable : function() - { - Ext.ux.UploadDialog.BrowseButton.superclass.disable.call(this); - this.input_file.dom.disabled = true; - }, - - /** - * @access public - */ - enable : function() - { - Ext.ux.UploadDialog.BrowseButton.superclass.enable.call(this); - this.input_file.dom.disabled = false; - }, - - /** - * @access public - */ - destroy : function() - { - var input_file = this.detachInputFile(true); - input_file.remove(); - input_file = null; - Ext.ux.UploadDialog.BrowseButton.superclass.destroy.call(this); - }, - - /** - * @access private - */ - onInputFileChange : function() - { - if (this.original_handler) { - this.original_handler.call(this.original_scope, this); - } - } -}); + }); /** * Toolbar file upload browse button. * * @class Ext.ux.UploadDialog.TBBrowseButton */ -Ext.ux.UploadDialog.TBBrowseButton = Ext.extend(Ext.ux.UploadDialog.BrowseButton, -{ - hideParent : true, - - onDestroy : function() +Ext.ux.UploadDialog.TBBrowseButton = Ext.extend(Ext.ux.UploadDialog.BrowseButton, { - Ext.ux.UploadDialog.TBBrowseButton.superclass.onDestroy.call(this); - if(this.container) { - this.container.remove(); + hideParent: true, + + onDestroy: function () { + Ext.ux.UploadDialog.TBBrowseButton.superclass.onDestroy.call(this); + if (this.container) { + this.container.remove(); } - } -}); + } + }); /** * Record type for dialogs grid. * * @class Ext.ux.UploadDialog.FileRecord */ Ext.ux.UploadDialog.FileRecord = Ext.data.Record.create([ - {name: 'filename'}, - {name: 'state', type: 'int'}, - {name: 'note'}, - {name: 'input_element'}, - {name: 'params'} + { name: 'filename' }, + { name: 'state', type: 'int' }, + { name: 'note' }, + { name: 'blobs' }, + { name: 'input_element' }, + { name: 'params' } ]); Ext.ux.UploadDialog.FileRecord.STATE_QUEUE = 0; @@ -460,8 +440,7 @@ * * @class Ext.ux.UploadDialog.Dialog */ -Ext.ux.UploadDialog.Dialog = function(config) -{ +Ext.ux.UploadDialog.Dialog = function (config) { var default_config = { border: false, width: 450, @@ -484,80 +463,80 @@ base_params: {}, permitted_extensions: [], reset_on_hide: true, + params: {}, allow_close_on_upload: false, upload_autostart: false, post_var_name: 'file' } config = Ext.applyIf(config || {}, default_config); config.layout = 'absolute'; - + Ext.ux.UploadDialog.Dialog.superclass.constructor.call(this, config); } Ext.extend(Ext.ux.UploadDialog.Dialog, Ext.Window, { - fsa : null, - - state_tpl : null, - - form : null, - - grid_panel : null, - - progress_bar : null, - - is_uploading : false, - - initial_queued_count : 0, - - upload_frame : null, - + fsa: null, + + state_tpl: null, + + form: null, + + grid_panel: null, + + progress_bar: null, + + is_uploading: false, + + initial_queued_count: 0, + + upload_frame: null, + /** * @access private */ //--------------------------------------------------------------------------------------------- // - initComponent : function() - { + initComponent: function () { Ext.ux.UploadDialog.Dialog.superclass.initComponent.call(this); - + // Setting automata protocol var tt = { // -------------- - 'created' : { - // -------------- - 'window-render' : [ + 'created': { + // -------------- + 'window-render': [ { action: [this.createForm, this.createProgressBar, this.createGrid], state: 'rendering' } ], - 'destroy' : [ + 'destroy': [ { action: this.flushEventQueue, state: 'destroyed' } ] }, // -------------- - 'rendering' : { - // -------------- - 'grid-render' : [ + 'rendering': { + // -------------- + 'grid-render': [ { action: [this.fillToolbar, this.updateToolbar], state: 'ready' } ], - 'destroy' : [ + 'destroy': [ { action: this.flushEventQueue, state: 'destroyed' } ] }, // -------------- - 'ready' : { - // -------------- - 'file-selected' : [ + 'ready': { + // -------------- + 'file-selected': [ { predicate: [this.fireFileTestEvent, this.isPermittedFile], action: this.addFileToUploadQueue, @@ -568,26 +547,26 @@ action: this.resetAddButton } ], - 'grid-selection-change' : [ + 'grid-selection-change': [ { action: this.updateToolbar } ], - 'remove-files' : [ + 'remove-files': [ { action: [this.removeFiles, this.fireFileRemoveEvent] } ], - 'reset-queue' : [ + 'reset-queue': [ { action: [this.resetQueue, this.fireResetQueueEvent] } ], - 'start-upload' : [ + 'start-upload': [ { predicate: this.hasUnuploadedFiles, action: [ - this.setUploadingFlag, this.saveInitialQueuedCount, this.updateToolbar, + this.setUploadingFlag, this.saveInitialQueuedCount, this.updateToolbar, this.updateProgressBar, this.prepareNextUploadTask, this.fireUploadStartEvent ], state: 'uploading' @@ -596,12 +575,12 @@ // Has nothing to upload, do nothing. } ], - 'stop-upload' : [ + 'stop-upload': [ { // We are not uploading, do nothing. Can be posted by user only at this state. } ], - 'hide' : [ + 'hide': [ { predicate: [this.isNotEmptyQueue, this.getResetOnHide], action: [this.resetQueue, this.fireResetQueueEvent] @@ -610,21 +589,21 @@ // Do nothing } ], - 'destroy' : [ + 'destroy': [ { action: this.flushEventQueue, state: 'destroyed' } ] }, // -------------- - 'adding-file' : { - // -------------- - 'file-added' : [ + 'adding-file': { + // -------------- + 'file-added': [ { predicate: this.isUploading, action: [this.incInitialQueuedCount, this.updateProgressBar, this.fireFileAddEvent], - state: 'uploading' + state: 'uploading' }, { predicate: this.getUploadAutostart, @@ -638,9 +617,9 @@ ] }, // -------------- - 'uploading' : { - // -------------- - 'file-selected' : [ + 'uploading': { + // -------------- + 'file-selected': [ { predicate: [this.fireFileTestEvent, this.isPermittedFile], action: this.addFileToUploadQueue, @@ -651,111 +630,111 @@ action: this.resetAddButton } ], - 'grid-selection-change' : [ + 'grid-selection-change': [ { // Do nothing. } ], - 'start-upload' : [ + 'start-upload': [ { // Can be posted only by user in this state. } ], - 'stop-upload' : [ + 'stop-upload': [ { predicate: this.hasUnuploadedFiles, action: [ - this.resetUploadingFlag, this.abortUpload, this.updateToolbar, + this.resetUploadingFlag, this.abortUpload, this.updateToolbar, this.updateProgressBar, this.fireUploadStopEvent ], state: 'ready' }, { action: [ - this.resetUploadingFlag, this.abortUpload, this.updateToolbar, + this.resetUploadingFlag, this.abortUpload, this.updateToolbar, this.updateProgressBar, this.fireUploadStopEvent, this.fireUploadCompleteEvent ], state: 'ready' } ], - 'file-upload-start' : [ - { - predicate: this.fireBeforeFileUploadStartEvent, - action: [this.uploadFile, this.findUploadFrame, this.fireFileUploadStartEvent] - }, + 'file-upload-start': [ { - action: this.postFileUploadCancelEvent + predicate: this.fireBeforeFileUploadStartEvent, + action: [this.uploadFile, this.findUploadFrame, this.fireFileUploadStartEvent] + }, + { + action: this.postFileUploadCancelEvent } ], - 'file-upload-success' : [ + 'file-upload-success': [ { predicate: this.hasUnuploadedFiles, action: [ - this.resetUploadFrame, this.updateRecordState, this.updateProgressBar, + this.resetUploadFrame, this.updateRecordState, this.updateProgressBar, this.prepareNextUploadTask, this.fireUploadSuccessEvent ] }, { action: [ - this.resetUploadFrame, this.resetUploadingFlag, this.updateRecordState, - this.updateToolbar, this.updateProgressBar, this.fireUploadSuccessEvent, + this.resetUploadFrame, this.resetUploadingFlag, this.updateRecordState, + this.updateToolbar, this.updateProgressBar, this.fireUploadSuccessEvent, this.fireUploadCompleteEvent ], state: 'ready' } ], - 'file-upload-error' : [ + 'file-upload-error': [ { predicate: this.hasUnuploadedFiles, action: [ - this.resetUploadFrame, this.updateRecordState, this.updateProgressBar, + this.resetUploadFrame, this.updateRecordState, this.updateProgressBar, this.prepareNextUploadTask, this.fireUploadErrorEvent ] }, { action: [ - this.resetUploadFrame, this.resetUploadingFlag, this.updateRecordState, - this.updateToolbar, this.updateProgressBar, this.fireUploadErrorEvent, + this.resetUploadFrame, this.resetUploadingFlag, this.updateRecordState, + this.updateToolbar, this.updateProgressBar, this.fireUploadErrorEvent, this.fireUploadCompleteEvent ], state: 'ready' } ], - 'file-upload-failed' : [ + 'file-upload-failed': [ { predicate: this.hasUnuploadedFiles, action: [ - this.resetUploadFrame, this.updateRecordState, this.updateProgressBar, + this.resetUploadFrame, this.updateRecordState, this.updateProgressBar, this.prepareNextUploadTask, this.fireUploadFailedEvent ] }, { action: [ - this.resetUploadFrame, this.resetUploadingFlag, this.updateRecordState, - this.updateToolbar, this.updateProgressBar, this.fireUploadFailedEvent, + this.resetUploadFrame, this.resetUploadingFlag, this.updateRecordState, + this.updateToolbar, this.updateProgressBar, this.fireUploadFailedEvent, this.fireUploadCompleteEvent ], state: 'ready' } ], - 'file-upload-canceled' : [ - { - predicate: this.hasUnuploadedFiles, - action: [ - this.setRecordCanceledState, this.updateProgressBar, this.prepareNextUploadTask, - this.fireUploadCanceledEvent - ] - }, - { - action: [ - this.resetUploadingFlag, this.setRecordCanceledState, - this.updateToolbar, this.updateProgressBar, - this.fireUploadCanceledEvent, this.fireUploadCompleteEvent - ], - state: 'ready' - } + 'file-upload-canceled': [ + { + predicate: this.hasUnuploadedFiles, + action: [ + this.setRecordCanceledState, this.updateProgressBar, this.prepareNextUploadTask, + this.fireUploadCanceledEvent + ] + }, + { + action: [ + this.resetUploadingFlag, this.setRecordCanceledState, + this.updateToolbar, this.updateProgressBar, + this.fireUploadCanceledEvent, this.fireUploadCompleteEvent + ], + state: 'ready' + } ], - 'hide' : [ + 'hide': [ { predicate: this.getResetOnHide, action: [this.stopUpload, this.repostHide] @@ -764,7 +743,7 @@ // Do nothing. } ], - 'destroy' : [ + 'destroy': [ { predicate: this.hasUnuploadedFiles, action: [ @@ -777,59 +756,57 @@ action: [ this.resetUploadingFlag, this.abortUpload, this.fireUploadStopEvent, this.fireUploadCompleteEvent, this.flushEventQueue - ], + ], state: 'destroyed' } ] }, // -------------- - 'destroyed' : { - // -------------- + 'destroyed': { + // -------------- } } this.fsa = new top.Ext.ux.Utils.FSA('created', tt, this); - + // Registering dialog events. this.addEvents({ 'filetest': true, - 'fileadd' : true, - 'fileremove' : true, - 'resetqueue' : true, - 'uploadsuccess' : true, - 'uploaderror' : true, - 'uploadfailed' : true, - 'uploadcanceled' : true, - 'uploadstart' : true, - 'uploadstop' : true, - 'uploadcomplete' : true, - 'beforefileuploadstart' : true, - 'fileuploadstart' : true + 'fileadd': true, + 'fileremove': true, + 'resetqueue': true, + 'uploadsuccess': true, + 'uploaderror': true, + 'uploadfailed': true, + 'uploadcanceled': true, + 'uploadstart': true, + 'uploadstop': true, + 'uploadcomplete': true, + 'beforefileuploadstart': true, + 'fileuploadstart': true }); - + // Attaching to window events. this.on('render', this.onWindowRender, this); this.on('beforehide', this.onWindowBeforeHide, this); this.on('hide', this.onWindowHide, this); this.on('destroy', this.onWindowDestroy, this); - + // Compiling state template. this.state_tpl = new top.Ext.Template( "