Bug #21880 » 13093.diff
typo3/js/flashupload.js (working copy) | ||
---|---|---|
}
|
||
},
|
||
/**
|
||
* actions which have to be done, when the uploader window should be closed (hidden in truth)
|
||
*/
|
||
closeWindow: function() {
|
||
this.cleanup();
|
||
this.hide();
|
||
},
|
||
// component constructor
|
||
// private
|
||
initComponent: function() {
|
||
... | ... | |
modal: true,
|
||
tools: [],
|
||
id: 't3-upload-window',
|
||
closeAction: 'hide',
|
||
title: String.format(TYPO3.LLL.fileUpload.windowTitle),
|
||
shadow: false,
|
||
hideBorders: true,
|
||
... | ... | |
}, {
|
||
id: 't3-file-upload-window-button-cancel',
|
||
text: String.format(TYPO3.LLL.fileUpload.buttonCancelAll),
|
||
handler: function() {
|
||
this.cleanup();
|
||
this.hide();
|
||
},
|
||
handler: this.closeWindow,
|
||
scope: this,
|
||
iconCls: 't3icon-ext-cancel'
|
||
}
|
||
... | ... | |
// set default options that cannot be overriden from outside
|
||
var staticConfig = {
|
||
closable: false,
|
||
closable: true,
|
||
closeAction: 'closeWindow',
|
||
resizable: false
|
||
};
|
||
Ext.apply(this, staticConfig);
|
||
... | ... | |
this.swf = new SWFUpload(swfConfig);
|
||
this.swf.fileUploadWindow = this;
|
||
// disable the "Cancel all uploads" button
|
||
Ext.getCmp('t3-file-upload-window-button-cancel').disable();
|
||
// add some info to the dialog
|
||
// you can replace this by adding your own component with this ID in the constructor
|
||
if (!this.getComponent('t3-upload-window-infopanel')) {
|
||
... | ... | |
this.setupFlash();
|
||
this.doLayout();
|
||
}.bind(this));
|
||
|
||
// show the window, and disable the cancel button (only gets enabled when files are selected)
|
||
this.show();
|
||
},
|
||
... | ... | |
// they also provide basic functionality for the file upload process
|
||
// private
|
||
uploadSelectFiles: function(numFilesSelected, numFilesQueued, numFilesInQueue) {
|
||
if (numFilesSelected > 0) {
|
||
// enable the "Cancel all uploads" button
|
||
Ext.getCmp('t3-file-upload-window-button-cancel').enable();
|
||
}
|
||
this.swf.startUpload();
|
||
this.fireEvent('uploadSelectFiles', this, [numFilesSelected, numFilesQueued, numFilesInQueue]);
|
||
},
|
||
... | ... | |
// private
|
||
totalComplete: function() {
|
||
// disable the "Cancel all uploads" button (for the next use)
|
||
Ext.getCmp('t3-file-upload-window-button-cancel').disable();
|
||
if (this.completedUploads > 0) {
|
||
this.fireEvent('totalComplete', this);
|
||
}
|
- « Previous
- 1
- 2
- 3
- Next »