diff --git a/src/webui/www/public/confirmdeletion.html b/src/webui/www/public/confirmdeletion.html index b31869ea6..828f1d54b 100644 --- a/src/webui/www/public/confirmdeletion.html +++ b/src/webui/www/public/confirmdeletion.html @@ -15,6 +15,7 @@ window.parent.closeWindows(); }); $('confirmBtn').addEvent('click', function(e){ + parent.torrentsTable.deselectAll(); new Event(e).stop(); var cmd = 'command/delete'; if($('deleteFromDiskCB').get('checked')) diff --git a/src/webui/www/public/scripts/dynamicTable.js b/src/webui/www/public/scripts/dynamicTable.js index aa1aa9cea..739f71bb8 100644 --- a/src/webui/www/public/scripts/dynamicTable.js +++ b/src/webui/www/public/scripts/dynamicTable.js @@ -194,6 +194,10 @@ var DynamicTable = new Class({ } }, + deselectAll : function () { + this.cur.empty(); + }, + selectRow : function (rowId) { this.cur.empty(); this.cur.push(rowId); @@ -423,7 +427,7 @@ var DynamicTable = new Class({ }, selectedRowsIds : function () { - return this.cur; + return this.cur.slice(); }, getRowIds : function () {