mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 16:59:25 +00:00
Select/Deselect All buttons. Closes #25
This commit is contained in:
@@ -53,6 +53,11 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div id="filters-container-1" class="row row-cols-1 g-4 mb-4"></div>
|
<div id="filters-container-1" class="row row-cols-1 g-4 mb-4"></div>
|
||||||
<div id="filters-container-2" class="row row-cols-1 row-cols-md-4 g-4"></div>
|
<div id="filters-container-2" class="row row-cols-1 row-cols-md-4 g-4"></div>
|
||||||
|
|
||||||
|
<p class="text-end mt-3 mb-0">
|
||||||
|
<button id="deselect-all-button" type="button" class="btn btn-outline-primary">Deselect All</button>
|
||||||
|
<button id="select-all-button" type="button" class="btn btn-outline-primary">Select All</button>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -357,6 +357,18 @@ function setUpEventListeners() {
|
|||||||
$("#filters-button").button("toggle");
|
$("#filters-button").button("toggle");
|
||||||
$("#filters-area").hide();
|
$("#filters-area").hide();
|
||||||
});
|
});
|
||||||
|
$("#select-all-button").click(function() {
|
||||||
|
$(".storeable-checkbox").each(function() {
|
||||||
|
$(this).prop('checked', true);
|
||||||
|
});
|
||||||
|
filtersUpdated();
|
||||||
|
});
|
||||||
|
$("#deselect-all-button").click(function() {
|
||||||
|
$(".storeable-checkbox").each(function() {
|
||||||
|
$(this).prop('checked', false);
|
||||||
|
});
|
||||||
|
filtersUpdated();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Startup
|
// Startup
|
||||||
|
|||||||
Reference in New Issue
Block a user