remove table row in trash bin view after undelete

This commit is contained in:
Björn Schießle 2013-01-22 12:13:50 +01:00
parent 81ab0affef
commit 97e69e5374
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ foreach ($list as $file) {
if ( !OCA_Trash\Trashbin::restore($file, $filename, $timestamp) ) { if ( !OCA_Trash\Trashbin::restore($file, $filename, $timestamp) ) {
$error[] = $filename; $error[] = $filename;
} else { } else {
$success[$i]['filename'] = $filename; $success[$i]['filename'] = $file;
$success[$i]['timestamp'] = $timestamp; $success[$i]['timestamp'] = $timestamp;
$i++; $i++;
} }

View File

@ -8,7 +8,7 @@ $(document).ready(function() {
{files:tr.attr('data-file'), dirlisting:tr.attr('data-dirlisting') }, {files:tr.attr('data-file'), dirlisting:tr.attr('data-dirlisting') },
function(result){ function(result){
for (var i = 0; i < result.data.success.length; i++) { 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); var row = document.getElementById(result.data.success[i].filename);
row.parentNode.removeChild(row); row.parentNode.removeChild(row);
} }
if (result.status != 'success') { if (result.status != 'success') {
@ -69,7 +69,7 @@ $(document).ready(function() {
{files:fileslist, dirlisting:dirlisting}, {files:fileslist, dirlisting:dirlisting},
function(result){ function(result){
for (var i = 0; i < result.data.success.length; i++) { 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); var row = document.getElementById(result.data.success[i].filename);
row.parentNode.removeChild(row); row.parentNode.removeChild(row);
} }
if (result.status != 'success') { if (result.status != 'success') {