summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-01-30 15:35:24 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-01-30 15:35:24 +0100
commitc62a38fcb1b1445d107ac4096e89b134d7654920 (patch)
tree2cdc86f4959c1cf3793076ae09f3c41004b612b6 /apps
parent1592764a60263a8ecfe691e25f522514eae5022c (diff)
downloadnextcloud-server-c62a38fcb1b1445d107ac4096e89b134d7654920.tar.gz
nextcloud-server-c62a38fcb1b1445d107ac4096e89b134d7654920.zip
add spinner for undelete operation for visualisation
Diffstat (limited to 'apps')
-rw-r--r--apps/files_trashbin/js/trash.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js
index 31d16436b2c..0aa9f8dade2 100644
--- a/apps/files_trashbin/js/trash.js
+++ b/apps/files_trashbin/js/trash.js
@@ -4,6 +4,9 @@ $(document).ready(function() {
if (typeof FileActions !== 'undefined') {
FileActions.register('all', 'Undelete', OC.PERMISSION_READ, OC.imagePath('core', 'actions/undelete.png'), function(filename) {
var tr=$('tr').filterAttr('data-file', filename);
+ var spinner = '<img class="move2trash" title="restore file" src="'+ OC.imagePath('core', 'loader.gif') +'"></a>';
+ var undeleteAction = $('tr').filterAttr('data-file',filename).children("td.date");
+ undeleteAction[0].innerHTML = undeleteAction[0].innerHTML+spinner;
$.post(OC.filePath('files_trashbin','ajax','undelete.php'),
{files:tr.attr('data-file'), dirlisting:tr.attr('data-dirlisting') },
function(result){
@@ -63,8 +66,16 @@ $(document).ready(function() {
});
$('.undelete').click('click',function(event) {
- var fileslist=getSelectedFiles('file').join(';');
+ var spinner = '<img class="move2trash" title="restore file" src="'+ OC.imagePath('core', 'loader.gif') +'"></a>';
+ var files=getSelectedFiles('file');
+ var fileslist=files.join(';');
var dirlisting=getSelectedFiles('dirlisting')[0];
+
+ for (var i in files) {
+ 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){