|
|
|
@ -958,10 +958,9 @@ $(document).ready(function() { |
|
|
|
data.context.attr('data-size', size); |
|
|
|
data.context.find('td.filesize').text(humanFileSize(size)); |
|
|
|
} |
|
|
|
else { |
|
|
|
|
|
|
|
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('/'); |
|
|
|
|
|
|
|
@ -977,12 +976,14 @@ $(document).ready(function() { |
|
|
|
else { |
|
|
|
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; |
|
|
|
} |
|
|
|
|