From 165ab473df86e7a80b8872543148dbcff99f940a Mon Sep 17 00:00:00 2001 From: buinsky Date: Sun, 10 Jan 2016 12:11:54 +0300 Subject: [PATCH] WebUI: Fix torrent table context menu Don't show "Limit download speed" menu item for downloaded torrents. --- src/webui/www/public/scripts/contextmenu.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webui/www/public/scripts/contextmenu.js b/src/webui/www/public/scripts/contextmenu.js index ff427a66c..066696878 100644 --- a/src/webui/www/public/scripts/contextmenu.js +++ b/src/webui/www/public/scripts/contextmenu.js @@ -181,6 +181,8 @@ var ContextMenu = new Class({ show_f_l_piece_prio = false; if (all_are_downloaded) { + this.hideItem('DownloadLimit'); + this.menu.getElement('a[href$=UploadLimit]').parentNode.addClass('separator'); this.hideItem('SequentialDownload'); this.hideItem('FirstLastPiecePrio'); this.showItem('SuperSeeding'); @@ -204,6 +206,8 @@ var ContextMenu = new Class({ this.setItemChecked('SequentialDownload', all_are_seq_dl); this.setItemChecked('FirstLastPiecePrio', all_are_f_l_piece_prio); + this.showItem('DownloadLimit'); + this.menu.getElement('a[href$=UploadLimit]').parentNode.removeClass('separator'); this.hideItem('SuperSeeding'); }