Commit 25e7dc1e authored by Bart Visscher's avatar Bart Visscher
Browse files

Merge pull request #3024 from owncloud/file-delete-action

Fix #1164 and fix showing spinner on delete
parents 4ccc9d89 802a5a33
......@@ -8,7 +8,7 @@ OCP\JSON::callCheck();
// Get data
$dir = stripslashes($_POST["dir"]);
$files = isset($_POST["file"]) ? stripslashes($_POST["file"]) : stripslashes($_POST["files"]);
$files = isset($_POST["file"]) ? $_POST["file"] : $_POST["files"];
$files = json_decode($files);
$filesWithError = '';
......
......@@ -320,9 +320,9 @@ var FileList={
}
for (var i=0; i<files.length; i++) {
var deleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date").children(".action.delete");
var oldHTML = deleteAction[0].outerHTML;
var oldHTML = deleteAction.html();
var newHTML = '<img class="move2trash" data-action="Delete" title="'+t('files', 'perform delete operation')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>';
deleteAction[0].outerHTML = newHTML;
deleteAction.html(newHTML);
}
// Finish any existing actions
if (FileList.lastAction) {
......@@ -344,7 +344,7 @@ var FileList={
} else {
$.each(files,function(index,file) {
var deleteAction = $('tr').filterAttr('data-file',file).children("td.date").children(".move2trash");
deleteAction[0].outerHTML = oldHTML;
deleteAction.html(oldHTML);
});
}
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment