From 52ff53b0b048baf1f24f33500be778f9d7303d47 Mon Sep 17 00:00:00 2001 From: ngosang Date: Thu, 17 Sep 2015 17:22:09 +0200 Subject: [PATCH 1/2] [Web UI] Reorder "Super seeding mode" option in right click menu --- src/webui/www/private/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/www/private/index.html b/src/webui/www/private/index.html index f7db8ab31..c45052037 100644 --- a/src/webui/www/private/index.html +++ b/src/webui/www/private/index.html @@ -116,9 +116,9 @@
  • QBT_TR(Limit download rate...)QBT_TR QBT_TR(Limit download rate...)QBT_TR
  • QBT_TR(Limit upload rate...)QBT_TR QBT_TR(Limit upload rate...)QBT_TR
  • +
  • QBT_TR(Super seeding mode)QBT_TR QBT_TR(Super seeding mode)QBT_TR
  • QBT_TR(Download in sequential order)QBT_TR QBT_TR(Download in sequential order)QBT_TR
  • QBT_TR(Download first and last piece first)QBT_TR QBT_TR(Download first and last piece first)QBT_TR
  • -
  • QBT_TR(Super seeding mode)QBT_TR QBT_TR(Super seeding mode)QBT_TR
  • QBT_TR(Force recheck)QBT_TR QBT_TR(Force recheck)QBT_TR
  • From e922275c72ec562053d1ada0b97d90ec2fcefbe4 Mon Sep 17 00:00:00 2001 From: ngosang Date: Thu, 17 Sep 2015 17:48:38 +0200 Subject: [PATCH 2/2] [Web UI] Clean up JavaScript code --- src/webui/www/public/addtrackers.html | 31 ++++---- src/webui/www/public/confirmdeletion.html | 88 ++++++++-------------- src/webui/www/public/scripts/mocha-init.js | 9 +-- src/webui/www/public/transferlist.html | 3 - 4 files changed, 49 insertions(+), 82 deletions(-) diff --git a/src/webui/www/public/addtrackers.html b/src/webui/www/public/addtrackers.html index 5469109bb..37c8c5341 100644 --- a/src/webui/www/public/addtrackers.html +++ b/src/webui/www/public/addtrackers.html @@ -6,20 +6,23 @@ - +
    diff --git a/src/webui/www/public/confirmdeletion.html b/src/webui/www/public/confirmdeletion.html index a92526f3e..b31869ea6 100644 --- a/src/webui/www/public/confirmdeletion.html +++ b/src/webui/www/public/confirmdeletion.html @@ -1,65 +1,37 @@ - - QBT_TR(Deletion confirmation - qBittorrent)QBT_TR - - - - - + + - + cmd = 'command/deletePerm'; + new Request({ + url: cmd, + method: 'post', + data: { + 'hashes': hashes.join('|') + }, + onComplete: function() { + window.parent.closeWindows(); + } + }).send(); + }); + }); +
    diff --git a/src/webui/www/public/scripts/mocha-init.js b/src/webui/www/public/scripts/mocha-init.js index 1fdd5e924..c4ae5b420 100644 --- a/src/webui/www/public/scripts/mocha-init.js +++ b/src/webui/www/public/scripts/mocha-init.js @@ -234,17 +234,12 @@ initializeWindows = function() { deleteFN = function() { var h = myTable.selectedIds(); - /*if(h.length && confirm('QBT_TR(Are you sure you want to delete the selected torrents from the transfer list?)QBT_TR')) { - h.each(function(item, index){ - new Request({url: 'command/delete', method: 'post', data: {hash: item}}).send(); - }); - }*/ if (h.length) { new MochaUI.Window({ id: 'confirmDeletionPage', - title: "QBT_TR(Deletion confirmation - qBittorrent)QBT_TR", + title: "QBT_TR(Deletion confirmation)QBT_TR", loadMethod: 'iframe', - contentURL: 'confirmdeletion.html?hashes=' + h.join(','), + contentURL: 'confirmdeletion.html?hashes=' + h.join("|"), scrollbars: false, resizable: false, maximizable: false, diff --git a/src/webui/www/public/transferlist.html b/src/webui/www/public/transferlist.html index 54c8105e3..dbfb707b6 100644 --- a/src/webui/www/public/transferlist.html +++ b/src/webui/www/public/transferlist.html @@ -16,9 +16,6 @@ Delete : function (element, ref) { deleteFN(); }, - DeleteHD : function (element, ref) { - deleteHDFN(); - }, Start : function (element, ref) { startFN(); },