From 3f8f9a396286af2b26929ae61d9074e7a9dfcee6 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Thu, 8 Aug 2019 05:12:48 -0700 Subject: [PATCH 1/4] Remove html tags from inline page This page's content is inserted into the existing page, so the presence of an tag is incorrect. --- src/webui/www/private/preferences.html | 99 +++++++++++--------------- 1 file changed, 41 insertions(+), 58 deletions(-) diff --git a/src/webui/www/private/preferences.html b/src/webui/www/private/preferences.html index e24a57162..9308e71c2 100644 --- a/src/webui/www/private/preferences.html +++ b/src/webui/www/private/preferences.html @@ -1,61 +1,44 @@ - - + +
+ +
+
- - - QBT_TR(Download from URLs)QBT_TR[CONTEXT=downloadFromURL] - - - - - - + - - - + $('PrefDownloadsLink').addEvent('click', function(e) { + $$('.PrefTab').addClass('invisible'); + $('DownloadsTab').removeClass('invisible'); + }); + $('PrefConnectionLink').addEvent('click', function(e) { + $$('.PrefTab').addClass('invisible'); + $('ConnectionTab').removeClass('invisible'); + }); + $('PrefSpeedLink').addEvent('click', function(e) { + $$('.PrefTab').addClass('invisible'); + $('SpeedTab').removeClass('invisible'); + }); + $('PrefBittorrentLink').addEvent('click', function(e) { + $$('.PrefTab').addClass('invisible'); + $('BittorrentTab').removeClass('invisible'); + }); + $('PrefWebUILink').addEvent('click', function(e) { + $$('.PrefTab').addClass('invisible'); + $('WebUITab').removeClass('invisible'); + }); + $('PrefAdvancedLink').addEvent('click', function(e) { + $$('.PrefTab').addClass('invisible'); + $('AdvancedTab').removeClass('invisible'); + }); + From b3f9b9e9b2d3a33acef79fa9622bce40081ccb3c Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Thu, 8 Aug 2019 05:15:28 -0700 Subject: [PATCH 2/4] Rename WebUI toolbar files --- .../www/private/{preferences.html => preferencesToolbar.html} | 0 .../www/private/{properties.html => propertiesToolbar.html} | 0 src/webui/www/private/scripts/client.js | 2 +- src/webui/www/private/scripts/mocha-init.js | 2 +- src/webui/www/webui.qrc | 4 ++-- 5 files changed, 4 insertions(+), 4 deletions(-) rename src/webui/www/private/{preferences.html => preferencesToolbar.html} (100%) rename src/webui/www/private/{properties.html => propertiesToolbar.html} (100%) diff --git a/src/webui/www/private/preferences.html b/src/webui/www/private/preferencesToolbar.html similarity index 100% rename from src/webui/www/private/preferences.html rename to src/webui/www/private/preferencesToolbar.html diff --git a/src/webui/www/private/properties.html b/src/webui/www/private/propertiesToolbar.html similarity index 100% rename from src/webui/www/private/properties.html rename to src/webui/www/private/propertiesToolbar.html diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index 15a1365a2..aeaf33f28 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -873,7 +873,7 @@ window.addEvent('load', function() { css: ['css/Tabs.css', 'css/dynamicTable.css'], js: ['scripts/prop-general.js', 'scripts/prop-trackers.js', 'scripts/prop-peers.js', 'scripts/prop-webseeds.js', 'scripts/prop-files.js'], }, - tabsURL: 'properties.html', + tabsURL: 'propertiesToolbar.html', tabsOnload: function() { MochaUI.initializeTabs('propertiesTabs'); diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index 788b79f47..3388e4d11 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -173,7 +173,7 @@ const initializeWindows = function() { require: { css: ['css/Tabs.css'] }, - toolbarURL: 'preferences.html', + toolbarURL: 'preferencesToolbar.html', maximizable: false, closable: true, paddingVertical: 0, diff --git a/src/webui/www/webui.qrc b/src/webui/www/webui.qrc index b6605e306..25b402f6b 100644 --- a/src/webui/www/webui.qrc +++ b/src/webui/www/webui.qrc @@ -20,9 +20,9 @@ private/installsearchplugin.html private/newcategory.html private/newtag.html - private/preferences.html + private/preferencesToolbar.html private/preferences_content.html - private/properties.html + private/propertiesToolbar.html private/properties_content.html private/rename.html private/search.html From f214dd233b629db39a5f1502908e932721ede4ff Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Thu, 8 Aug 2019 05:16:47 -0700 Subject: [PATCH 3/4] Rename WebUI content files --- .../private/{preferences_content.html => preferences.html} | 0 .../www/private/{properties_content.html => properties.html} | 0 src/webui/www/private/scripts/client.js | 2 +- src/webui/www/private/scripts/mocha-init.js | 2 +- src/webui/www/webui.qrc | 4 ++-- 5 files changed, 4 insertions(+), 4 deletions(-) rename src/webui/www/private/{preferences_content.html => preferences.html} (100%) rename src/webui/www/private/{properties_content.html => properties.html} (100%) diff --git a/src/webui/www/private/preferences_content.html b/src/webui/www/private/preferences.html similarity index 100% rename from src/webui/www/private/preferences_content.html rename to src/webui/www/private/preferences.html diff --git a/src/webui/www/private/properties_content.html b/src/webui/www/private/properties.html similarity index 100% rename from src/webui/www/private/properties_content.html rename to src/webui/www/private/properties.html diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index aeaf33f28..23b40ea4d 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -868,7 +868,7 @@ window.addEvent('load', function() { bottom: 0, left: 0 }, - contentURL: 'properties_content.html', + contentURL: 'properties.html', require: { css: ['css/Tabs.css', 'css/dynamicTable.css'], js: ['scripts/prop-general.js', 'scripts/prop-trackers.js', 'scripts/prop-peers.js', 'scripts/prop-webseeds.js', 'scripts/prop-files.js'], diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index 3388e4d11..491fb3178 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -169,7 +169,7 @@ const initializeWindows = function() { title: "QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog]", loadMethod: 'xhr', toolbar: true, - contentURL: 'preferences_content.html', + contentURL: 'preferences.html', require: { css: ['css/Tabs.css'] }, diff --git a/src/webui/www/webui.qrc b/src/webui/www/webui.qrc index 25b402f6b..d7a377efb 100644 --- a/src/webui/www/webui.qrc +++ b/src/webui/www/webui.qrc @@ -21,9 +21,9 @@ private/newcategory.html private/newtag.html private/preferencesToolbar.html - private/preferences_content.html + private/preferences.html private/propertiesToolbar.html - private/properties_content.html + private/properties.html private/rename.html private/search.html private/searchplugins.html From 085ae05f198ff30c5477955c732326aa9be5d752 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Thu, 8 Aug 2019 05:20:51 -0700 Subject: [PATCH 4/4] Move WebUI views into separate folder --- src/webui/www/private/scripts/client.js | 10 ++++---- src/webui/www/private/scripts/mocha-init.js | 10 ++++---- src/webui/www/private/{ => views}/about.html | 0 .../www/private/{ => views}/aboutToolbar.html | 0 .../www/private/{ => views}/filters.html | 0 .../{ => views}/installsearchplugin.html | 0 .../www/private/{ => views}/preferences.html | 0 .../{ => views}/preferencesToolbar.html | 0 .../www/private/{ => views}/properties.html | 0 .../{ => views}/propertiesToolbar.html | 0 src/webui/www/private/{ => views}/search.html | 2 +- .../private/{ => views}/searchplugins.html | 2 +- .../www/private/{ => views}/statistics.html | 0 .../www/private/{ => views}/transferlist.html | 0 src/webui/www/webui.qrc | 24 +++++++++---------- 15 files changed, 24 insertions(+), 24 deletions(-) rename src/webui/www/private/{ => views}/about.html (100%) rename src/webui/www/private/{ => views}/aboutToolbar.html (100%) rename src/webui/www/private/{ => views}/filters.html (100%) rename src/webui/www/private/{ => views}/installsearchplugin.html (100%) rename src/webui/www/private/{ => views}/preferences.html (100%) rename src/webui/www/private/{ => views}/preferencesToolbar.html (100%) rename src/webui/www/private/{ => views}/properties.html (100%) rename src/webui/www/private/{ => views}/propertiesToolbar.html (100%) rename src/webui/www/private/{ => views}/search.html (99%) rename src/webui/www/private/{ => views}/searchplugins.html (99%) rename src/webui/www/private/{ => views}/statistics.html (100%) rename src/webui/www/private/{ => views}/transferlist.html (100%) diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index 23b40ea4d..6b9455d28 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -223,7 +223,7 @@ window.addEvent('load', function() { left: 0 }, loadMethod: 'xhr', - contentURL: 'filters.html', + contentURL: 'views/filters.html', onContentLoaded: function() { setFilter(selected_filter); }, @@ -826,7 +826,7 @@ window.addEvent('load', function() { left: 0 }, loadMethod: 'xhr', - contentURL: 'search.html', + contentURL: 'views/search.html', content: '', column: 'searchTabColumn', height: null @@ -844,7 +844,7 @@ window.addEvent('load', function() { left: 0 }, loadMethod: 'xhr', - contentURL: 'transferlist.html', + contentURL: 'views/transferlist.html', onContentLoaded: function() { handleDownloadParam(); updateMainData(); @@ -868,12 +868,12 @@ window.addEvent('load', function() { bottom: 0, left: 0 }, - contentURL: 'properties.html', + contentURL: 'views/properties.html', require: { css: ['css/Tabs.css', 'css/dynamicTable.css'], js: ['scripts/prop-general.js', 'scripts/prop-trackers.js', 'scripts/prop-peers.js', 'scripts/prop-webseeds.js', 'scripts/prop-files.js'], }, - tabsURL: 'propertiesToolbar.html', + tabsURL: 'views/propertiesToolbar.html', tabsOnload: function() { MochaUI.initializeTabs('propertiesTabs'); diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index 491fb3178..023a1befb 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -169,11 +169,11 @@ const initializeWindows = function() { title: "QBT_TR(Options)QBT_TR[CONTEXT=OptionsDialog]", loadMethod: 'xhr', toolbar: true, - contentURL: 'preferences.html', + contentURL: 'views/preferences.html', require: { css: ['css/Tabs.css'] }, - toolbarURL: 'preferencesToolbar.html', + toolbarURL: 'views/preferencesToolbar.html', maximizable: false, closable: true, paddingVertical: 0, @@ -362,7 +362,7 @@ const initializeWindows = function() { id: id, title: 'QBT_TR(Statistics)QBT_TR[CONTEXT=StatsDialog]', loadMethod: 'xhr', - contentURL: 'statistics.html', + contentURL: 'views/statistics.html', maximizable: false, padding: 10, width: loadWindowWidth(id, 275), @@ -920,12 +920,12 @@ const initializeWindows = function() { id: id, title: 'QBT_TR(About qBittorrent)QBT_TR[CONTEXT=AboutDialog]', loadMethod: 'xhr', - contentURL: 'about.html', + contentURL: 'views/about.html', require: { css: ['css/Tabs.css'] }, toolbar: true, - toolbarURL: 'aboutToolbar.html', + toolbarURL: 'views/aboutToolbar.html', padding: 10, width: loadWindowWidth(id, 550), height: loadWindowHeight(id, 360), diff --git a/src/webui/www/private/about.html b/src/webui/www/private/views/about.html similarity index 100% rename from src/webui/www/private/about.html rename to src/webui/www/private/views/about.html diff --git a/src/webui/www/private/aboutToolbar.html b/src/webui/www/private/views/aboutToolbar.html similarity index 100% rename from src/webui/www/private/aboutToolbar.html rename to src/webui/www/private/views/aboutToolbar.html diff --git a/src/webui/www/private/filters.html b/src/webui/www/private/views/filters.html similarity index 100% rename from src/webui/www/private/filters.html rename to src/webui/www/private/views/filters.html diff --git a/src/webui/www/private/installsearchplugin.html b/src/webui/www/private/views/installsearchplugin.html similarity index 100% rename from src/webui/www/private/installsearchplugin.html rename to src/webui/www/private/views/installsearchplugin.html diff --git a/src/webui/www/private/preferences.html b/src/webui/www/private/views/preferences.html similarity index 100% rename from src/webui/www/private/preferences.html rename to src/webui/www/private/views/preferences.html diff --git a/src/webui/www/private/preferencesToolbar.html b/src/webui/www/private/views/preferencesToolbar.html similarity index 100% rename from src/webui/www/private/preferencesToolbar.html rename to src/webui/www/private/views/preferencesToolbar.html diff --git a/src/webui/www/private/properties.html b/src/webui/www/private/views/properties.html similarity index 100% rename from src/webui/www/private/properties.html rename to src/webui/www/private/views/properties.html diff --git a/src/webui/www/private/propertiesToolbar.html b/src/webui/www/private/views/propertiesToolbar.html similarity index 100% rename from src/webui/www/private/propertiesToolbar.html rename to src/webui/www/private/views/propertiesToolbar.html diff --git a/src/webui/www/private/search.html b/src/webui/www/private/views/search.html similarity index 99% rename from src/webui/www/private/search.html rename to src/webui/www/private/views/search.html index d1c986cd0..65df12129 100644 --- a/src/webui/www/private/search.html +++ b/src/webui/www/private/views/search.html @@ -350,7 +350,7 @@ id: id, title: "QBT_TR(Search plugins)QBT_TR[CONTEXT=PluginSelectDlg]", loadMethod: 'xhr', - contentURL: 'searchplugins.html', + contentURL: 'views/searchplugins.html', scrollbars: false, maximizable: false, paddingVertical: 0, diff --git a/src/webui/www/private/searchplugins.html b/src/webui/www/private/views/searchplugins.html similarity index 99% rename from src/webui/www/private/searchplugins.html rename to src/webui/www/private/views/searchplugins.html index a757ff652..782beacbf 100644 --- a/src/webui/www/private/searchplugins.html +++ b/src/webui/www/private/views/searchplugins.html @@ -106,7 +106,7 @@ id: 'installSearchPlugin', title: "QBT_TR(Install plugin)QBT_TR[CONTEXT=PluginSourceDlg]", loadMethod: 'xhr', - contentURL: 'installsearchplugin.html', + contentURL: 'views/installsearchplugin.html', scrollbars: false, resizable: false, maximizable: false, diff --git a/src/webui/www/private/statistics.html b/src/webui/www/private/views/statistics.html similarity index 100% rename from src/webui/www/private/statistics.html rename to src/webui/www/private/views/statistics.html diff --git a/src/webui/www/private/transferlist.html b/src/webui/www/private/views/transferlist.html similarity index 100% rename from src/webui/www/private/transferlist.html rename to src/webui/www/private/views/transferlist.html diff --git a/src/webui/www/webui.qrc b/src/webui/www/webui.qrc index d7a377efb..8b8a241f8 100644 --- a/src/webui/www/webui.qrc +++ b/src/webui/www/webui.qrc @@ -1,7 +1,5 @@ - private/about.html - private/aboutToolbar.html private/addpeers.html private/addtrackers.html private/confirmdeletion.html @@ -15,18 +13,10 @@ private/download.html private/downloadlimit.html private/edittracker.html - private/filters.html private/index.html - private/installsearchplugin.html private/newcategory.html private/newtag.html - private/preferencesToolbar.html - private/preferences.html - private/propertiesToolbar.html - private/properties.html private/rename.html - private/search.html - private/searchplugins.html private/scripts/client.js private/scripts/contextmenu.js private/scripts/download.js @@ -48,10 +38,20 @@ private/scripts/speedslider.js private/setlocation.html private/shareratio.html - private/statistics.html - private/transferlist.html private/upload.html private/uploadlimit.html + private/views/about.html + private/views/aboutToolbar.html + private/views/filters.html + private/views/installsearchplugin.html + private/views/preferences.html + private/views/preferencesToolbar.html + private/views/properties.html + private/views/propertiesToolbar.html + private/views/search.html + private/views/searchplugins.html + private/views/statistics.html + private/views/transferlist.html public/css/login.css public/css/noscript.css public/index.html