Remove dependency on tailwind elements and switch to using tail.select (Smaller lib, that resolves duplication of selects on back/forward)

This commit is contained in:
Peter Stockings
2023-12-08 09:26:38 +11:00
parent 2bdbda3a05
commit 304ddcb30d
10 changed files with 569 additions and 67 deletions

View File

@@ -41,11 +41,9 @@
</div>
<div class="mr-4">
<select data-te-select-init data-te-select-size="lg" name="view"
hx-get="{{ url_for('get_calendar', person_id=person['PersonId']) }}" hx-target="#container"
hx-vals='{"date": "{{ selected_date }}"}' hx-push-url="true" _="init js(me)
te.Select.getOrCreateInstance(me).setValue('{{ selected_view | safe }}')
end">
<select name="view" hx-get="{{ url_for('get_calendar', person_id=person['PersonId']) }}"
hx-target="#container" hx-vals='{"date": "{{ selected_date }}"}' hx-push-url="true"
_="init js(me) tail.select(me, {}) end">
<option value="month" {% if selected_view=='month' %}selected{% endif %}>Month</option>
<option value="year" {% if selected_view=='year' %}selected{% endif %}>Year</option>
<option value="all">All</option>