Browse Source

Fixed issue with drag and drop not in the root directory, for folders and files

remotes/origin/ldap_group_count
Luke Policinski 12 years ago
parent
commit
089052b13a
  1. 13
      apps/files/js/filelist.js

13
apps/files/js/filelist.js

@ -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;
}

Loading…
Cancel
Save