summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/js/trash.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/js/trash.js')
-rw-r--r--apps/files_trashbin/js/trash.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js
index 208cc88f0fd..7769def535e 100644
--- a/apps/files_trashbin/js/trash.js
+++ b/apps/files_trashbin/js/trash.js
@@ -19,22 +19,22 @@ $(document).ready(function() {
OC.dialogs.alert(result.data.message, 'Error');
}
});
-
+
});
};
-
+
FileActions.register('all', 'Delete', OC.PERMISSION_READ, function () {
return OC.imagePath('core', 'actions/delete');
}, function (filename) {
$('.tipsy').remove();
-
+
var tr=$('tr').filterAttr('data-file', filename);
var deleteAction = $('tr').filterAttr('data-file',filename).children("td.date").children(".action.delete");
var oldHTML = deleteAction[0].outerHTML;
var newHTML = '<img class="move2trash" data-action="Delete" title="'+t('files', 'delete file permanently')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>';
var files = tr.attr('data-file');
deleteAction[0].outerHTML = newHTML;
-
+
$.post(OC.filePath('files_trashbin','ajax','delete.php'),
{files:JSON.stringify([files]), dirlisting:tr.attr('data-dirlisting') },
function(result){
@@ -46,9 +46,9 @@ $(document).ready(function() {
OC.dialogs.alert(result.data.message, 'Error');
}
});
-
+
});
-
+
// Sets the select_all checkbox behaviour :
$('#select_all').click(function() {
if($(this).attr('checked')){
@@ -91,18 +91,18 @@ $(document).ready(function() {
}
processSelection();
});
-
+
$('.undelete').click('click',function(event) {
var spinner = '<img class="move2trash" title="'+t('files_trashbin', 'perform restore operation')+'" src="'+ OC.imagePath('core', 'loader.gif') +'"></a>';
var files=getSelectedFiles('file');
var fileslist = JSON.stringify(files);
var dirlisting=getSelectedFiles('dirlisting')[0];
-
+
for (var i=0; i<files.length; i++) {
var undeleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date");
undeleteAction[0].innerHTML = undeleteAction[0].innerHTML+spinner;
}
-
+
$.post(OC.filePath('files_trashbin','ajax','undelete.php'),
{files:fileslist, dirlisting:dirlisting},
function(result){
@@ -115,19 +115,19 @@ $(document).ready(function() {
}
});
});
-
+
$('.delete').click('click',function(event) {
console.log("delete selected");
var spinner = '<img class="move2trash" title="'+t('files_trashbin', 'Delete permanently')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>';
var files=getSelectedFiles('file');
var fileslist = JSON.stringify(files);
var dirlisting=getSelectedFiles('dirlisting')[0];
-
+
for (var i=0; i<files.length; i++) {
var deleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date");
deleteAction[0].innerHTML = deleteAction[0].innerHTML+spinner;
}
-
+
$.post(OC.filePath('files_trashbin','ajax','delete.php'),
{files:fileslist, dirlisting:dirlisting},
function(result){