summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-02-11 16:52:56 +0100
committerVincent Petry <pvince81@owncloud.com>2014-04-28 14:49:39 +0200
commit9f62059efa869ff677130f06bf1b46be49950515 (patch)
tree260c955913a6a8746645d816feffc933b436b343 /apps/files_trashbin/js
parentefdf0c4df0012fe03fb3de136ff596af1bb38677 (diff)
downloadnextcloud-server-9f62059efa869ff677130f06bf1b46be49950515.tar.gz
nextcloud-server-9f62059efa869ff677130f06bf1b46be49950515.zip
Fix file summary to use the whole file list
- moved the summary code into a new class FileSummary - FileSummary is calculated only once, then updated with add/remove - added new OC.Util namespace for JS utility functions
Diffstat (limited to 'apps/files_trashbin/js')
-rw-r--r--apps/files_trashbin/js/trash.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js
index f7724d07d2b..4ed5ba1c76e 100644
--- a/apps/files_trashbin/js/trash.js
+++ b/apps/files_trashbin/js/trash.js
@@ -34,10 +34,12 @@ $(document).ready(function() {
}
var files = result.data.success;
+ var $el;
for (var i = 0; i < files.length; i++) {
- FileList.remove(OC.basename(files[i].filename), {updateSummary: false});
+ $el = FileList.remove(OC.basename(files[i].filename), {updateSummary: false});
+ FileList.fileSummary.remove({type: $el.attr('data-type'), size: $el.attr('data-size')});
}
- FileList.updateFileSummary();
+ FileList.fileSummary.update();
FileList.updateEmptyContent();
enableActions();
}