From 085ae05f198ff30c5477955c732326aa9be5d752 Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Thu, 8 Aug 2019 05:20:51 -0700 Subject: [PATCH] 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