mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Fix band switch colour bug
This commit is contained in:
@@ -240,10 +240,10 @@ function generateBandsMultiToggleFilterCard(band_options) {
|
|||||||
// CSS doesn't like IDs with decimal points in, so we need to replace that in the same way as when we originally
|
// CSS doesn't like IDs with decimal points in, so we need to replace that in the same way as when we originally
|
||||||
// queried the options endpoint and set our CSS.
|
// queried the options endpoint and set our CSS.
|
||||||
var cssFormattedBandName = o['name'] ? o['name'].replace('.', 'p') : "unknown";
|
var cssFormattedBandName = o['name'] ? o['name'].replace('.', 'p') : "unknown";
|
||||||
$p.append(`<input type="checkbox" class="btn-check filter-button-bands storeable-checkbox" name="options" id="filter-button-bands-${cssFormattedBandName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="btn btn-outline" id="filter-button-label-bands-${cssFormattedBandName}" for="filter-button-bands-${cssFormattedBandName}">${o['name']}</label> `);
|
$p.append(`<input type="checkbox" class="btn-check filter-button-band storeable-checkbox" name="options" id="filter-button-band-${cssFormattedBandName}" value="${o['name']}" autocomplete="off" onClick="filtersUpdated()" checked><label class="btn btn-outline" id="filter-button-label-band-${cssFormattedBandName}" for="filter-button-band-${cssFormattedBandName}">${o['name']}</label> `);
|
||||||
});
|
});
|
||||||
// Create All/None buttons
|
// Create All/None buttons
|
||||||
$p.append(` <span style="display: inline-block"><button id="filter-button-bands-all" type="button" class="btn btn-outline-secondary" onclick="toggleFilterButtons('bands', true);">All</button> <button id="filter-button-bands-none" type="button" class="btn btn-outline-secondary" onclick="toggleFilterButtons('bands', false);">None</button></span>`);
|
$p.append(` <span style="display: inline-block"><button id="filter-button-band-all" type="button" class="btn btn-outline-secondary" onclick="toggleFilterButtons('band', true);">All</button> <button id="filter-button-band-none" type="button" class="btn btn-outline-secondary" onclick="toggleFilterButtons('band', false);">None</button></span>`);
|
||||||
// Compile HTML elements to return
|
// Compile HTML elements to return
|
||||||
$card_body.append($p);
|
$card_body.append($p);
|
||||||
$card.append($card_body);
|
$card.append($card_body);
|
||||||
|
|||||||
Reference in New Issue
Block a user