diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-01-22 12:00:04 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-01-22 15:33:54 +0100 |
commit | 81ab0affef47c99239e7bff77e5964788a61aa2a (patch) | |
tree | d126b7213459a3c837ad45db43c5c76e36c90ccf /apps/files_trashbin/js | |
parent | 1817c7895b3db5643d255ba54cf062c3f90885ed (diff) | |
download | nextcloud-server-81ab0affef47c99239e7bff77e5964788a61aa2a.tar.gz nextcloud-server-81ab0affef47c99239e7bff77e5964788a61aa2a.zip |
allow to restore single files/folder from a deleted folder
Diffstat (limited to 'apps/files_trashbin/js')
-rw-r--r-- | apps/files_trashbin/js/trash.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js index 8f3786f15e1..355e25d97dc 100644 --- a/apps/files_trashbin/js/trash.js +++ b/apps/files_trashbin/js/trash.js @@ -5,7 +5,7 @@ $(document).ready(function() { FileActions.register('all', 'Undelete', OC.PERMISSION_READ, '', function(filename) { var tr=$('tr').filterAttr('data-file', filename); $.post(OC.filePath('files_trashbin','ajax','undelete.php'), - {files:tr.attr('data-filename')+'.d'+tr.attr('data-timestamp')}, + {files:tr.attr('data-file'), dirlisting:tr.attr('data-dirlisting') }, function(result){ for (var i = 0; i < result.data.success.length; i++) { var row = document.getElementById(result.data.success[i].filename+'.d'+result.data.success[i].timestamp); @@ -64,8 +64,9 @@ $(document).ready(function() { $('.undelete').click('click',function(event) { var fileslist=getSelectedFiles('file').join(';'); + var dirlisting=getSelectedFiles('dirlisting')[0]; $.post(OC.filePath('files_trashbin','ajax','undelete.php'), - {files:fileslist}, + {files:fileslist, dirlisting:dirlisting}, function(result){ for (var i = 0; i < result.data.success.length; i++) { var row = document.getElementById(result.data.success[i].filename+'.d'+result.data.success[i].timestamp); @@ -133,7 +134,8 @@ function getSelectedFiles(property){ name:$(element).attr('data-filename'), file:$(element).attr('data-file'), timestamp:$(element).attr('data-timestamp'), - type:$(element).attr('data-type') + type:$(element).attr('data-type'), + dirlisting:$(element).attr('data-dirlisting') }; if(property){ files.push(file[property]); |