When redirecting from workout overview(modal) to person list filter view dont refresh page on modal close

This commit is contained in:
Peter Stockings
2023-08-07 10:29:41 +10:00
parent 465bb74b87
commit 25718970b6
3 changed files with 9 additions and 3 deletions

View File

@@ -3,7 +3,8 @@
{% if is_edit|default(false, true) == false %}
<span class="cursor-pointer" hx-get="{{ url_for('goto_tag') }}"
hx-vals='{"filter": "?exercise_id={{ exercise_id }}", "person_id" : "{{ person_id }}" }'
hx-target="#container" hx-push-url="true" _='on click trigger closeModal'>{{ exercise_name }}</span>
hx-target="#container" hx-push-url="true" _='on click trigger closeModalWithoutRefresh'>{{ exercise_name
}}</span>
{% else %}
<div class="w-full">
<select id="topset-exercise-select-{{ topset_id }}" data-te-select-init data-te-select-filter="true"

View File

@@ -3,7 +3,12 @@
then wait for animationend
then remove me
then toggle .hide-scrollbar on document.body
then send refreshView to #refreshViewElement'>
then send refreshView to #refreshViewElement
on closeModalWithoutRefresh
add .closing
then wait for animationend
then remove me
then toggle .hide-scrollbar on document.body'>
<div class='modal-underlay' _='on click trigger closeModal'></div>
<div class='modal-content m-4 sm:mt-24 max-h-[95%]' _='init toggle .hide-scrollbar on document.body'>
<div class="relative w-full h-full max-w-2xl md:h-auto overflow-auto">

View File

@@ -2,7 +2,7 @@
<span
class="text-xs font-semibold inline-block py-1 px-2 uppercase rounded text-pink-600 bg-pink-200 uppercase last:mr-0 mr-1 max-h-fit cursor-pointer"
hx-get="{{ url_for('goto_tag') }}" hx-vals='{"filter": "{{ tag.tag_filter }}", "person_id": "{{ tag.person_id }}"}'
hx-target="#container" hx-push-url="true" _='on click trigger closeModal'>{{
hx-target="#container" hx-push-url="true" _='on click trigger closeModalWithoutRefresh'>{{
tag.tag_name }}
</span>
{% endfor%}