Fix delete button in Web UI

This commit is contained in:
Christophe Dumez
2011-01-06 09:16:02 +00:00
parent 2955f9d82a
commit 93b295e8c4
2 changed files with 16 additions and 6 deletions

View File

@@ -48,10 +48,14 @@ window.addEvent('domready', function(){
var cmd = '/command/delete';
if($('deleteFromDiskCB').get('checked'))
cmd = '/command/deletePerm';
hashes.each(function(item, index){
new Request({url: cmd, method: 'post', data: {hash: item}}).send();
});
window.parent.document.getElementById('confirmDeletionPage').parentNode.removeChild(window.parent.document.getElementById('confirmDeletionPage'));
new Request({url: cmd,
method: 'post',
data: {hashes: hashes.join('|')},
onComplete: function() {
window.parent.document.getElementById('confirmDeletionPage').parentNode.removeChild(window.parent.document.getElementById('confirmDeletionPage'));
}
}).send();
});
});
</script>