Remove dependency on tail select component and instead role my own to minmise bundle size
This commit is contained in:
@@ -12,14 +12,21 @@
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<select name="view" hx-get="{{ url_for('calendar.get_calendar', person_id=person_id) }}"
|
||||
hx-target="#container" hx-push-url="true" _="init js(me) tail.select(me, {}) end"
|
||||
class="h-10 invisible">
|
||||
<option value="month">Month</option>
|
||||
<option value="year">Year</option>
|
||||
<option value="notes">Notes</option>
|
||||
<option value="overview" selected>Overview</option>
|
||||
</select>
|
||||
{{ render_partial('partials/custom_select.html',
|
||||
name='view',
|
||||
options=[
|
||||
{'id': 'month', 'name': 'Month'},
|
||||
{'id': 'year', 'name': 'Year'},
|
||||
{'id': 'notes', 'name': 'Notes'},
|
||||
{'id': 'overview', 'name': 'Overview', 'selected': true}
|
||||
],
|
||||
multiple=false,
|
||||
search=false,
|
||||
placeholder='View',
|
||||
hx_get=url_for('calendar.get_calendar', person_id=person_id),
|
||||
hx_target='#container',
|
||||
hx_push_url=true)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,22 +37,17 @@
|
||||
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-city">
|
||||
Exercises
|
||||
</label>
|
||||
<select data-te-select-filter="true" data-te-select-size="lg" name="exercise_id"
|
||||
class="bg-gray-50 border border-gray-300 " multiple
|
||||
hx-get="{{ url_for('person_overview', person_id=person_id) }}"
|
||||
hx-include="[name='exercise_id'],[name='min_date'],[name='max_date'],[name='graph_axis']"
|
||||
hx-target="#container" hx-push-url="true" _="init js(me)
|
||||
tail.select(me, {
|
||||
multiple: true,
|
||||
search: true,
|
||||
placeholder: 'Filter exercises',
|
||||
})
|
||||
end">
|
||||
{% for exercise in exercises %}
|
||||
<option value="{{ exercise.id }}" {% if exercise.selected %}selected{% endif %}>
|
||||
{{ exercise.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
{{ render_partial('partials/custom_select.html',
|
||||
name='exercise_id',
|
||||
options=exercises,
|
||||
multiple=true,
|
||||
search=true,
|
||||
placeholder='Filter exercises',
|
||||
hx_get=url_for('person_overview', person_id=person_id),
|
||||
hx_include="[name='exercise_id'],[name='min_date'],[name='max_date'],[name='graph_axis']",
|
||||
hx_target='#container',
|
||||
hx_push_url=true)
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full md:w-1/3 px-2 md:px-3 mb-6 md:mb-0">
|
||||
|
||||
Reference in New Issue
Block a user