mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-11 07:01:41 +00:00
Replace dash-separated config & API properties with underscore-separated versions. #127
This commit is contained in:
+7
-7
@@ -55,7 +55,7 @@ function startSSEConnection() {
|
||||
// Add spot to internal data store
|
||||
spots.unshift(newSpot);
|
||||
// Work out if we need to remove an old spot
|
||||
if (spots.length > $("#spots-to-fetch option:selected").val()) {
|
||||
if (spots.length > $("#spots_to_fetch option:selected").val()) {
|
||||
spots = spots.slice(0, -1);
|
||||
// Drop oldest spot off the end of the table. This is two rows because of the mobile view extra rows
|
||||
$("#table tbody tr").last().remove();
|
||||
@@ -93,7 +93,7 @@ function buildQueryString() {
|
||||
str = str + getQueryStringFor(fn) + "&";
|
||||
}
|
||||
});
|
||||
str = str + "limit=" + $("#spots-to-fetch option:selected").val();
|
||||
str = str + "limit=" + $("#spots_to_fetch option:selected").val();
|
||||
if ($("#search").val() !== "") {
|
||||
str = str + "&text_includes=" + encodeURIComponent($("#search").val());
|
||||
}
|
||||
@@ -421,8 +421,8 @@ function loadOptions() {
|
||||
|
||||
// First pass loading settings, so we can load the band colour scheme before the filters that need to use it
|
||||
loadSettings();
|
||||
setColorScheme($("#color-scheme option:selected").val());
|
||||
setBandColorScheme($("#band-color-scheme option:selected").val());
|
||||
setColorScheme($("#color_scheme option:selected").val());
|
||||
setBandColorScheme($("#band_color_scheme option:selected").val());
|
||||
|
||||
// Add CSS for band toggle buttons
|
||||
addBandToggleColourCSS(options["bands"]);
|
||||
@@ -430,10 +430,10 @@ function loadOptions() {
|
||||
// Populate the filters panel
|
||||
generateBandsMultiToggleFilterCard(options["bands"]);
|
||||
generateSIGsMultiToggleFilterCard(options["sigs"]);
|
||||
generateMultiToggleFilterCard("#dx-continent-options", "dx_continent", options["continents"]);
|
||||
generateMultiToggleFilterCard("#de-continent-options", "de_continent", options["continents"]);
|
||||
generateMultiToggleFilterCard("#dx_continent_options", "dx_continent", options["continents"]);
|
||||
generateMultiToggleFilterCard("#de_continent_options", "de_continent", options["continents"]);
|
||||
generateModesMultiToggleFilterCard(options["modes"]);
|
||||
generateSourcesMultiToggleFilterCard(options["spot_providers"], options["spot-providers-enabled-by-default"]);
|
||||
generateSourcesMultiToggleFilterCard(options["spot_providers"], options["spot_providers_enabled_by_default"]);
|
||||
|
||||
// Load URL params. These may select things from the various filter & display options, so the function needs
|
||||
// to be called after these are set up, but if the URL params ask for "embedded mode", this will suppress
|
||||
|
||||
Reference in New Issue
Block a user