summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/js
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-01-18 14:09:22 +0100
committerBjörn Schießle <schiessle@owncloud.com>2013-01-22 15:33:53 +0100
commita3da82261bf03ff4b54b0ebf3836d339fe2d4177 (patch)
tree1f07edcb756ac35d0592e0ee87387e730b6533d2 /apps/files_trashbin/js
parentd60522893713df7359d0e02c841f35a65d2186aa (diff)
downloadnextcloud-server-a3da82261bf03ff4b54b0ebf3836d339fe2d4177.tar.gz
nextcloud-server-a3da82261bf03ff4b54b0ebf3836d339fe2d4177.zip
remove item in the trash bin view after successful undelete
Diffstat (limited to 'apps/files_trashbin/js')
-rw-r--r--apps/files_trashbin/js/trash.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js
index 37e9a4bf10d..b9088944fd4 100644
--- a/apps/files_trashbin/js/trash.js
+++ b/apps/files_trashbin/js/trash.js
@@ -12,20 +12,12 @@ $(document).ready(function() {
if (typeof FileActions !== 'undefined') {
FileActions.register('all', 'Undelete', OC.PERMISSION_READ, '', function(filename) {
var tr=$('tr').filterAttr('data-file', filename);
- console.log("tr: " + tr.attr('data-timestamp') + " name: " + name);
$.post(OC.filePath('files_trashbin','ajax','undelete.php'),
{timestamp:tr.attr('data-timestamp'),filename:tr.attr('data-filename')},
function(result){
if (result.status == 'success') {
- return;
- var date=new Date();
- FileList.addFile(name,0,date,false,hidden);
- var tr=$('tr').filterAttr('data-file',name);
- tr.data('mime','text/plain').data('id',result.data.id);
- tr.attr('data-id', result.data.id);
- getMimeIcon('text/plain',function(path){
- tr.find('td.filename').attr('style','background-image:url('+path+')');
- });
+ var row = document.getElementById(result.data.filename+'.d'+result.data.timestamp);
+ row.parentNode.removeChild(row);
} else {
OC.dialogs.alert(result.data.message, 'Error');
}