summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/js
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-02-19 12:38:00 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-02-19 12:38:00 +0100
commit211e651d7222085b528cc6e9dc8d060d8ea6a60e (patch)
treed61ad68a0ab2d34c9a785b9dbce93596153d4cfe /apps/files_trashbin/js
parent7bfbfe6562a7dbcecdc05b60214a0da83760c4a3 (diff)
downloadnextcloud-server-211e651d7222085b528cc6e9dc8d060d8ea6a60e.tar.gz
nextcloud-server-211e651d7222085b528cc6e9dc8d060d8ea6a60e.zip
add timestamp to function call; fix trash.js to handle multiple delete operation at once
Diffstat (limited to 'apps/files_trashbin/js')
-rw-r--r--apps/files_trashbin/js/trash.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js
index 1dfe09feca0..fc38889dc37 100644
--- a/apps/files_trashbin/js/trash.js
+++ b/apps/files_trashbin/js/trash.js
@@ -36,11 +36,11 @@ $(document).ready(function() {
$.post(OC.filePath('files_trashbin','ajax','delete.php'),
{files:tr.attr('data-file'), dirlisting:tr.attr('data-dirlisting') },
function(result){
- if ( result.status == 'success' ) {
- var row = document.getElementById(result.data.filename);
+ for (var i = 0; i < result.data.success.length; i++) {
+ var row = document.getElementById(result.data.success[i].filename);
row.parentNode.removeChild(row);
- } else {
- deleteAction[0].outerHTML = oldHTML;
+ }
+ if (result.status != 'success') {
OC.dialogs.alert(result.data.message, 'Error');
}
});