-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💄 [#2741] Added multiselect listbox mobile design
- Loading branch information
1 parent
9089716
commit 3b9653c
Showing
4 changed files
with
44 additions
and
23 deletions.
There are no files selected for viewing
51 changes: 29 additions & 22 deletions
51
src/open_inwoner/components/templates/components/FilterBar/MultiSelectListbox.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
{% load i18n l10n form_tags icon_tags button_tags %} | ||
|
||
<div class="filter-bar__multiselect-listbox multiselect-listbox" id="selectDropdownWrapper"> | ||
<button id="selectButton" type="button" class="button button__select" aria-haspopup="listbox" aria-expanded="false" aria-live="polite"> | ||
{% trans 'Status' %}: | ||
{% icon icon="expand_more" icon_position="after" icon_outlined=True %} | ||
</button> | ||
<div id="listboxDropdown" class="multiselect-listbox__content" role="listbox" aria-labelledby="selectButton"> | ||
<div class="multiselect-listbox__scroll" role="presentation"> | ||
{% for status, frequency in statusfrequencies %} | ||
<div class="checkbox" role="option"> | ||
<input type="checkbox" name="status" value="{{ status }}" id="id_status_{{ forloop.counter }}" class="checkbox__input"> | ||
<label class="checkbox__label" for="id_status_{{ forloop.counter }}"> | ||
<span class="ellipsis">{{ status }} </span><span class="frequency-counter">({{ frequency }})</span> | ||
</label> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{# Submit button appears on select #} | ||
<div class="form__actions form__actions--fullwidth" id="filterFormActions"> | ||
<button class="button button--primary" type="submit" title="{% trans 'Toon resultaten' %}" aria-label="{% trans 'Toon resultaten' %}" id="filterCases"> | ||
{% trans 'Toon' %}<span class="filter-bar__frequency-sum" id="frequencySum">0</span><span id="resultText">{% trans 'resultaten' %}</span> | ||
</button> | ||
<div class="multiselect-listbox__mobile-button"> | ||
<div class="button show-preview"> | ||
{% icon icon="filter_alt" outlined=True %} | ||
</div> | ||
</div> | ||
<div class="form__actions form__actions--fullwidth form__actions--reset"> | ||
{% button bordered=False text=_("Wis alle filters") id="resetFilters" type="button" transparent=True primary=True %} | ||
<div class="multiselect-listbox__modal"> | ||
<button id="selectButton" type="button" class="button button__select" aria-haspopup="listbox" aria-expanded="false" aria-live="polite"> | ||
{% trans 'Status' %}: | ||
{% icon icon="expand_more" icon_position="after" icon_outlined=True %} | ||
</button> | ||
<div id="listboxDropdown" class="multiselect-listbox__content" role="listbox" aria-labelledby="selectButton"> | ||
<div class="multiselect-listbox__scroll" role="presentation"> | ||
{% for status, frequency in statusfrequencies %} | ||
<div class="checkbox" role="option"> | ||
<input type="checkbox" name="status" value="{{ status }}" id="id_status_{{ forloop.counter }}" class="checkbox__input"> | ||
<label class="checkbox__label" for="id_status_{{ forloop.counter }}"> | ||
<span class="ellipsis">{{ status }} </span><span class="frequency-counter">({{ frequency }})</span> | ||
</label> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{# Submit button appears on select #} | ||
<div class="form__actions form__actions--fullwidth" id="filterFormActions"> | ||
<button class="button button--primary" type="submit" title="{% trans 'Toon resultaten' %}" aria-label="{% trans 'Toon resultaten' %}" id="filterCases"> | ||
{% trans 'Toon' %}<span class="filter-bar__frequency-sum" id="frequencySum">0</span><span id="resultText">{% trans 'resultaten' %}</span> | ||
</button> | ||
</div> | ||
</div> | ||
<div class="form__actions form__actions--fullwidth form__actions--reset"> | ||
{% button bordered=False text=_("Wis alle filters") id="resetFilters" type="button" transparent=True primary=True %} | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,4 +196,10 @@ | |
} | ||
} | ||
} | ||
|
||
.multiselect-listbox__mobile-button { | ||
@media (min-width: 768px) { | ||
display: none; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters