mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
Fix drag and drop multiple files into a subdirectory didn't get all files to the right path
This commit is contained in:
parent
237d1d809e
commit
652cec5463
@ -452,9 +452,9 @@ var et2_file = et2_inputWidget.extend(
|
||||
var file_count = this.resumable.files.length;
|
||||
|
||||
// Remove files from list
|
||||
for(var i = 0; i < this.resumable.files.length; i++)
|
||||
while(this.resumable.files.length > 0)
|
||||
{
|
||||
this.resumable.removeFile(this.resumable.files[i]);
|
||||
this.resumable.removeFile(this.resumable.files[this.resumable.files.length -1]);
|
||||
}
|
||||
|
||||
var event = jQuery.Event('upload');
|
||||
|
@ -830,12 +830,17 @@ app.classes.filemanager = AppJS.extend(
|
||||
var widget = this.et2.getWidgetById('upload');
|
||||
|
||||
// Override finish to specify a potentially different path
|
||||
var old_onfinish = widget.options.onFinishOne;
|
||||
var old_onfinishone = widget.options.onFinishOne;
|
||||
var old_onfinish = widget.options.onFinish;
|
||||
|
||||
widget.options.onFinishOne = function(_event, _file_count) {
|
||||
widget.options.onFinishOne = old_onfinish;
|
||||
self.upload(_event, _file_count, path);
|
||||
};
|
||||
|
||||
widget.options.onFinish = function() {
|
||||
widget.options.onFinish = old_onfinish;
|
||||
widget.options.onFinishOne = old_onfinishone;
|
||||
}
|
||||
// This triggers the upload
|
||||
widget.set_value(files);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user