Fixed issue with drag and drop not in the root directory, for folders and files
This commit is contained in:
parent
b01492fecd
commit
089052b13a
|
@ -959,9 +959,8 @@ $(document).ready(function() {
|
|||
data.context.find('td.filesize').text(humanFileSize(size));
|
||||
}
|
||||
else {
|
||||
|
||||
// only append new file if uploaded into the current folder
|
||||
if (file.directory !== FileList.getCurrentDirectory()) {
|
||||
if (file.directory != '/' && file.directory !== FileList.getCurrentDirectory()) {
|
||||
|
||||
file_directory = file.directory.replace('/','').replace(/\/$/, "").split('/');
|
||||
|
||||
|
@ -978,11 +977,13 @@ $(document).ready(function() {
|
|||
file_directory = file_directory[0];
|
||||
}
|
||||
|
||||
file_directory = FileList.findFileEl(file_directory);
|
||||
|
||||
// update folder size
|
||||
var size = parseInt($('tr[data-file="'+file_directory+'"]').attr('data-size'));
|
||||
var size = parseInt(file_directory.attr('data-size'));
|
||||
size += parseInt(file.size);
|
||||
$('tr[data-file="'+file_directory+'"]').attr('data-size', size);
|
||||
$('tr[data-file="'+file_directory+'"]').find('td.filesize').text(humanFileSize(size));
|
||||
file_directory.attr('data-size', size);
|
||||
file_directory.find('td.filesize').text(humanFileSize(size));
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue