diff --git a/Changelog b/Changelog index dfe919ebf..3d713b577 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ * Unreleased - Christophe Dumez - v2.6.0 - FEATURE: Use system icons (Linux, Qt >= 4.6) - FEATURE: Simplify program preferences + - COSMETIC: Same deletion confirmation dialog in the GUI and Web UI - COSMETIC: Simplified the top toolbar * Sun Dec 5 2010 - Christophe Dumez - v2.5.0 diff --git a/src/Icons/skin/delete_perm.png b/src/Icons/skin/delete_perm.png deleted file mode 100644 index a3442b9c5..000000000 Binary files a/src/Icons/skin/delete_perm.png and /dev/null differ diff --git a/src/Icons/skin/delete_perm22.png b/src/Icons/skin/delete_perm22.png deleted file mode 100644 index 288fb8c68..000000000 Binary files a/src/Icons/skin/delete_perm22.png and /dev/null differ diff --git a/src/icons.qrc b/src/icons.qrc index 41faa1a73..9fbd49eda 100644 --- a/src/icons.qrc +++ b/src/icons.qrc @@ -11,7 +11,6 @@ Icons/magnet.png Icons/slow.png Icons/L.gif - Icons/skin/delete_perm22.png Icons/skin/seeding.png Icons/skin/splash.png Icons/skin/tabs.gif @@ -23,7 +22,6 @@ Icons/skin/paused.png Icons/skin/slider-area.gif Icons/skin/stalledDL.png - Icons/skin/delete_perm.png Icons/skin/error.png Icons/skin/handle-icon-horizontal.gif Icons/skin/qbittorrent32.png diff --git a/src/webui/html/confirmdeletion.html b/src/webui/html/confirmdeletion.html new file mode 100644 index 000000000..1a4821736 --- /dev/null +++ b/src/webui/html/confirmdeletion.html @@ -0,0 +1,69 @@ + + + + + _(Deletion confirmation - qBittorrent) + + + + + + + + +
+ +

_(Are you sure you want to delete the selected torrents from the transfer list?)

+      _(Also delete the files on the hard disk)

+
+      +
+ + diff --git a/src/webui/html/index.html b/src/webui/html/index.html index 2e8730f56..f5a69f8bc 100644 --- a/src/webui/html/index.html +++ b/src/webui/html/index.html @@ -48,8 +48,7 @@
  • _(&Start)
  • _(&Pause)
  • _(Force recheck)
  • -
  • _(&Delete)
  • -
  • _(Delete from HD)
  • +
  • _(&Delete)
  • @@ -73,7 +72,6 @@ - @@ -89,8 +87,7 @@
    • _(Start)
    • _(Pause)
    • -
    • _(Delete)
    • -
    • _(Delete from HD)
    • +
    • _(Delete)
    • _(Priority)
      • _(Move to top)
      • diff --git a/src/webui/scripts/mocha-init.js b/src/webui/scripts/mocha-init.js index 490a60514..c3d5c58da 100644 --- a/src/webui/scripts/mocha-init.js +++ b/src/webui/scripts/mocha-init.js @@ -150,11 +150,25 @@ initializeWindows = function(){ deleteFN = function() { var h = myTable.selectedIds(); - if(h.length && confirm('_(Are you sure you want to delete the selected torrents from the transfer list?)')) { + /*if(h.length && confirm('_(Are you sure you want to delete the selected torrents from the transfer list?)')) { 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: "_(Deletion confirmation - qBittorrent)", + loadMethod: 'iframe', + contentURL:'confirmdeletion.html?hashes='+JSON.encode(h), + scrollbars: false, + resizable: false, + maximizable: false, + padding: 10, + width: 424, + height: 140 + }); + } }; addClickEvent('delete', function(e){ @@ -162,21 +176,6 @@ initializeWindows = function(){ deleteFN(); }); - deleteHDFN = function() { - var h = myTable.selectedIds(); - if(h.length && confirm('_(Are you sure you want to delete the selected torrents from the transfer list and hard disk?)')) { - h.each(function(item, index){ - new Request({url: '/command/deletePerm', method: 'post', data: {hash: item}}).send(); - }); - } - }; - - - addClickEvent('deletePerm', function(e){ - new Event(e).stop(); - deleteHDFN(); - }); - pauseFN = function() { var h = myTable.selectedIds(); if(h.length){ @@ -274,7 +273,8 @@ initializeWindows = function(){ loadMethod: 'iframe', contentURL: 'about.html', width: 650, - height: 400 + height: 400, + padding: 10 }); }); diff --git a/src/webui/webui.qrc b/src/webui/webui.qrc index 366c981d3..3aefdb824 100644 --- a/src/webui/webui.qrc +++ b/src/webui/webui.qrc @@ -16,6 +16,7 @@ html/downloadlimit.html html/preferences.html html/preferences_content.html + html/confirmdeletion.html css/Core.css css/Layout.css css/Window.css