From 35ebd9a0957bf466cb09a0b5b9fa30d8bc2a1fae Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Mon, 22 Jul 2019 23:24:58 -0700 Subject: [PATCH 1/2] Default WebUI search tab to enabled Search plugins and categories are now retrieved when the Search tab is first switched to. This prevents possible unnecessary instantiation of the SearchPluginManager. --- src/webui/www/private/scripts/client.js | 8 +++++++- src/webui/www/private/search.html | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index f1dba3980..f2531e481 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -44,6 +44,7 @@ let alternativeSpeedLimits = false; let queueing_enabled = true; let serverSyncMainDataInterval = 1500; let customSyncMainDataInterval = null; +let searchTabInitialized = false; let clipboardEvent; @@ -254,7 +255,7 @@ window.addEvent('load', function() { $('speedInBrowserTitleBarLink').firstChild.style.opacity = '0'; // After showing/hiding the toolbar + status bar - let showSearchEngine = localStorage.getItem('show_search_engine') === "true"; + let showSearchEngine = localStorage.getItem('show_search_engine') !== "false"; if (!showSearchEngine) { // uncheck menu option $('showSearchEngineLink').firstChild.style.opacity = '0'; @@ -788,6 +789,11 @@ window.addEvent('load', function() { }; const showSearchTab = function() { + if (!searchTabInitialized) { + initSearchTab(); + searchTabInitialized = true; + } + $("searchTabColumn").removeClass("invisible"); customSyncMainDataInterval = 30000; hideTransfersTab(); diff --git a/src/webui/www/private/search.html b/src/webui/www/private/search.html index 2ff92d075..bf3569fdf 100644 --- a/src/webui/www/private/search.html +++ b/src/webui/www/private/search.html @@ -639,6 +639,4 @@ clearTimeout(loadSearchResultsTimer); loadSearchResultsTimer = loadSearchResultsData.delay(500); }; - - initSearchTab(); From 6ea6e52d9920ed5c1b7c42fe5256ba6e09357407 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Fri, 26 Jul 2019 02:54:11 -0700 Subject: [PATCH 2/2] Add context menu to Web UI search table Web UI implementation of #10852. --- src/webui/www/private/scripts/client.js | 2 - src/webui/www/private/search.html | 83 ++++++++++++++++++------- 2 files changed, 60 insertions(+), 25 deletions(-) diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index f2531e481..645e165a8 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -1010,8 +1010,6 @@ function setupCopyEventHandler() { return copyMagnetLinkFN(); case "copyHash": return copyHashFN(); - case "copyDescriptionPageUrl": - return copySearchTorrentUrl(); default: return ""; } diff --git a/src/webui/www/private/search.html b/src/webui/www/private/search.html index bf3569fdf..d1c986cd0 100644 --- a/src/webui/www/private/search.html +++ b/src/webui/www/private/search.html @@ -48,10 +48,6 @@ width: 4em; } - #downloadSearchTorrent, #openSearchTorrentDescription, #copyDescriptionPageUrl { - line-height: 1.5em; - } - #manageSearchPlugins { line-height: 1.5em; float: right; @@ -143,13 +139,23 @@
- - -
+ +