From b05a443cadd757e5647d58d5669c415cba9e0240 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Wed, 22 Aug 2018 00:46:44 -0400 Subject: [PATCH 1/3] Adjust WebUI Options form alignment --- src/webui/www/private/css/style.css | 8 ++++++ .../www/private/preferences_content.html | 28 +++++++++---------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/src/webui/www/private/css/style.css b/src/webui/www/private/css/style.css index 82dde7e84..479532fa8 100644 --- a/src/webui/www/private/css/style.css +++ b/src/webui/www/private/css/style.css @@ -383,6 +383,14 @@ fieldset.settings .leftLabelSmall { display: block; } +fieldset.settings .leftLabelMedium { + width: 9em; + float: left; + text-align: right; + margin-right: 0.5em; + display: block; +} + fieldset.settings .leftLabelLarge { width: 14em; float: left; diff --git a/src/webui/www/private/preferences_content.html b/src/webui/www/private/preferences_content.html index d7dc168aa..1d605e43d 100644 --- a/src/webui/www/private/preferences_content.html +++ b/src/webui/www/private/preferences_content.html @@ -53,10 +53,10 @@
- +
- +
@@ -64,10 +64,10 @@
- +
- +
@@ -180,11 +180,11 @@
- +
- +
@@ -419,20 +419,20 @@
QBT_TR(Web User Interface (Remote control))QBT_TR[CONTEXT=OptionsDialog] - -
-
+ +
+

- +
- +
QBT_TR(Information about certificates)QBT_TR[CONTEXT=HttpServer]
@@ -478,13 +478,13 @@

- +
- +
- +
From adad883eb6e8128deaa3bce94d3dea9645d789c4 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Wed, 22 Aug 2018 00:47:00 -0400 Subject: [PATCH 2/3] Increase WebUI Options initial height --- src/webui/www/private/scripts/mocha-init.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index 49a5f893d..14d94de39 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -98,7 +98,7 @@ initializeWindows = function() { paddingVertical: 0, paddingHorizontal: 0, width: loadWindowWidth(id, 700), - height: loadWindowHeight(id, 300), + height: loadWindowHeight(id, 500), onResize: function() { saveWindowSize(id); } From fef1ad6083105b61c2e2b8bdd81821738d4e88c5 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Wed, 22 Aug 2018 01:44:25 -0400 Subject: [PATCH 3/3] Allow WebUI sidebar filters to be hidden --- src/webui/www/private/css/style.css | 13 +++++++ src/webui/www/private/filters.html | 45 ++++++++++++++++--------- src/webui/www/private/scripts/client.js | 15 +++++++-- 3 files changed, 55 insertions(+), 18 deletions(-) diff --git a/src/webui/www/private/css/style.css b/src/webui/www/private/css/style.css index 479532fa8..8526113ed 100644 --- a/src/webui/www/private/css/style.css +++ b/src/webui/www/private/css/style.css @@ -408,6 +408,19 @@ div.formRow { font-weight: bold; text-transform: uppercase; padding-left: 5px; + padding-top: 5px; + display: block; +} + +.filterTitle img { + width: 16px; + height: 16px; + margin-bottom: -3px; + padding: 0 5px; +} + +.filterTitle img.rotate { + transform: rotate(270deg); } ul.filterList { diff --git a/src/webui/www/private/filters.html b/src/webui/www/private/filters.html index 890431a4b..c49f83208 100644 --- a/src/webui/www/private/filters.html +++ b/src/webui/www/private/filters.html @@ -1,19 +1,26 @@ -QBT_TR(Status)QBT_TR[CONTEXT=TransferListFiltersWidget] - -
-QBT_TR(Categories)QBT_TR[CONTEXT=TransferListFiltersWidget] -
    -
+ +
+ + QBT_TR(Categories)QBT_TR[CONTEXT=TransferListFiltersWidget] + +
    +
+
diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index 5561c29ef..5674f4e7a 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -50,6 +50,7 @@ var setCategoryFilter = function() {}; var selected_filter = getLocalStorageItem('selected_filter', 'all'); var setFilter = function() {}; +var toggleFilterDisplay = function() {}; var loadSelectedCategory = function() { selected_category = getLocalStorageItem('selected_category', CATEGORIES_ALL); @@ -132,6 +133,16 @@ window.addEvent('load', function() { updateMainData(); }; + toggleFilterDisplay = function(filter) { + var element = filter + "FilterList"; + localStorage.setItem('filter_' + filter + "_collapsed", !$(element).hasClass("invisible")); + $(element).toggleClass("invisible") + var parent = $(element).getParent(".filterWrapper"); + var toggleIcon = $(parent).getChildren(".filterTitle img"); + if (toggleIcon) + toggleIcon[0].toggleClass("rotate"); + }; + new MochaUI.Panel({ id: 'Filters', title: 'Panel', @@ -232,7 +243,7 @@ window.addEvent('load', function() { }; var updateCategoryList = function() { - var categoryList = $('filterCategoryList'); + var categoryList = $('categoryFilterList'); if (!categoryList) return; categoryList.empty(); @@ -274,7 +285,7 @@ window.addEvent('load', function() { }; var highlightSelectedCategory = function() { - var categoryList = $('filterCategoryList'); + var categoryList = $('categoryFilterList'); if (!categoryList) return; var childrens = categoryList.childNodes;