Allow filtering based on mode, not just mode type. #96

This commit is contained in:
Ian Renton
2026-01-17 09:03:27 +00:00
parent abdf8d3065
commit 4d344021c7
6 changed files with 51 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ function loadSpots() {
// Build a query string for the API, based on the filters that the user has selected.
function buildQueryString() {
var str = "?";
["dx_continent", "de_continent", "mode_type", "source", "band", "sig"].forEach(fn => {
["dx_continent", "de_continent", "mode", "source", "band", "sig"].forEach(fn => {
if (!allFilterOptionsSelected(fn)) {
str = str + getQueryStringFor(fn) + "&";
}
@@ -183,7 +183,7 @@ function loadOptions() {
generateSIGsMultiToggleFilterCard(options["sigs"]);
generateMultiToggleFilterCard("#dx-continent-options", "dx_continent", options["continents"]);
generateMultiToggleFilterCard("#de-continent-options", "de_continent", options["continents"]);
generateMultiToggleFilterCard("#mode-options", "mode_type", options["mode_types"]);
generateModesMultiToggleFilterCard(options["modes"]);
generateSourcesMultiToggleFilterCard(options["spot_sources"], options["web-ui-options"]["spot-providers-enabled-by-default"]);
// Load URL params. These may select things from the various filter & display options, so the function needs