Change workout view picker to tailwind elements for ui consistency
This commit is contained in:
@@ -37,14 +37,22 @@
|
|||||||
person['PersonName']}}</span>
|
person['PersonName']}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<select
|
<div>
|
||||||
class="block appearance-none w-40 bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500 mr-5"
|
<select id="workout-view-picker" data-te-select-init data-te-select-filter="true"
|
||||||
name="view" hx-get="{{ url_for('get_calendar', person_id=person['PersonId']) }}" hx-target="#container"
|
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">
|
hx-vals='{"date": "{{ selected_date }}"}' hx-push-url="true">
|
||||||
<option value="month" {% if selected_view=='month' %}selected{% endif %}>Month</option>
|
<option value="month" {% if selected_view=='month' %}selected{% endif %}>Month</option>
|
||||||
<option value="year" {% if selected_view=='year' %}selected{% endif %}>Year</option>
|
<option value="year" {% if selected_view=='year' %}selected{% endif %}>Year</option>
|
||||||
<option value="all">All</option>
|
<option value="all">All</option>
|
||||||
</select>
|
</select>
|
||||||
|
<script>
|
||||||
|
te.Select.getOrCreateInstance(document.querySelector("#workout-view-picker")).setValue({{ selected_view | safe }});
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% if selected_view == 'month' %}
|
{% if selected_view == 'month' %}
|
||||||
|
|||||||
@@ -11,14 +11,19 @@
|
|||||||
<span class="text-base font-normal text-gray-500">List of workouts</span>
|
<span class="text-base font-normal text-gray-500">List of workouts</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<select
|
<div>
|
||||||
class="block appearance-none w-40 bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500 mr-5"
|
<select id="workout-view-picker" data-te-select-init data-te-select-filter="true"
|
||||||
name="view" hx-get="{{ url_for('get_calendar', person_id=person['PersonId']) }}"
|
data-te-select-size="lg" name="view"
|
||||||
hx-target="#container" hx-push-url="true">
|
hx-get="{{ url_for('get_calendar', person_id=person['PersonId']) }}" hx-target="#container"
|
||||||
|
hx-push-url="true">
|
||||||
<option value="month">Month</option>
|
<option value="month">Month</option>
|
||||||
<option value="year">Year</option>
|
<option value="year">Year</option>
|
||||||
<option value="all" selected>All</option>
|
<option value="all" selected>All</option>
|
||||||
</select>
|
</select>
|
||||||
|
<script>
|
||||||
|
te.Select.getOrCreateInstance(document.querySelector("#workout-view-picker")).setValue("all");
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user