Rename solo and attribute to value and metadata in grid filter
This commit is contained in:
parent
2c90afb644
commit
4278e088a4
@ -63,15 +63,15 @@ class BrickGridFilter {
|
|||||||
// Multi-attribute filter
|
// Multi-attribute filter
|
||||||
switch (select.dataset.filter) {
|
switch (select.dataset.filter) {
|
||||||
// List contains values
|
// List contains values
|
||||||
case "solo":
|
case "value":
|
||||||
options.filters.push({
|
options.filters.push({
|
||||||
attribute: select.dataset.filterAttribute,
|
attribute: select.dataset.filterAttribute,
|
||||||
value: select.value,
|
value: select.value,
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// List contains attribute name, looking for true/false
|
// List contains metadata attribute name, looking for true/false
|
||||||
case "status":
|
case "metadata":
|
||||||
if (select.value.startsWith("-")) {
|
if (select.value.startsWith("-")) {
|
||||||
options.filters.push({
|
options.filters.push({
|
||||||
attribute: select.value.substring(1),
|
attribute: select.value.substring(1),
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text"><i class="ri-checkbox-line"></i><span class="ms-1 d-none d-xl-inline"> Status</span></span>
|
<span class="input-group-text"><i class="ri-checkbox-line"></i><span class="ms-1 d-none d-xl-inline"> Status</span></span>
|
||||||
<select id="grid-status" class="form-select form-select-sm"
|
<select id="grid-status" class="form-select form-select-sm"
|
||||||
data-filter="status"
|
data-filter="metadata"
|
||||||
autocomplete="off">
|
autocomplete="off">
|
||||||
<option value="" selected>All</option>
|
<option value="" selected>All</option>
|
||||||
<option value="-has-missing">Set is complete</option>
|
<option value="-has-missing">Set is complete</option>
|
||||||
@ -59,7 +59,7 @@
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text"><i class="ri-price-tag-3-line"></i><span class="ms-1 d-none d-xl-inline"> Theme</span></span>
|
<span class="input-group-text"><i class="ri-price-tag-3-line"></i><span class="ms-1 d-none d-xl-inline"> Theme</span></span>
|
||||||
<select id="grid-theme" class="form-select form-select-sm"
|
<select id="grid-theme" class="form-select form-select-sm"
|
||||||
data-filter="solo" data-filter-attribute="theme"
|
data-filter="value" data-filter-attribute="theme"
|
||||||
autocomplete="off">
|
autocomplete="off">
|
||||||
<option value="" selected>All</option>
|
<option value="" selected>All</option>
|
||||||
{% for theme in collection.themes %}
|
{% for theme in collection.themes %}
|
||||||
|
Loading…
Reference in New Issue
Block a user