From e231892a246285dec9a594dd112c94746d197364 Mon Sep 17 00:00:00 2001 From: Horilla Date: Wed, 13 Nov 2024 11:49:04 +0530 Subject: [PATCH] [UPDT] HORILLA VIEWS: Add hx-on:click attritbute for pagination buttons to Horilla tables --- horilla_views/templates/generic/horilla_list_table.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/horilla_views/templates/generic/horilla_list_table.html b/horilla_views/templates/generic/horilla_list_table.html index 68bbf8512..805562d36 100644 --- a/horilla_views/templates/generic/horilla_list_table.html +++ b/horilla_views/templates/generic/horilla_list_table.html @@ -15,7 +15,7 @@ $("#reloadMessagesButton").click() } - {% if show_filter_tags %} {% include "generic/filter_tags.html" %} {% endif %} {% if queryset|length %} @@ -226,6 +226,7 @@ hx-get="{{search_url}}?{{saved_filters.urlencode}}&filter_applied=on" hx-swap="outerHTML" hx-target="#{{view_id|safe}}" + hx-on:click="htmxLoadIndicator(this);" /> {% trans "of" %} {{queryset.paginator.num_pages}}{% trans "First" %} @@ -248,6 +250,7 @@ hx-get="{{search_url}}?{{saved_filters.urlencode}}&page={{ queryset.previous_page_number }}&filter_applied=on" hx-swap="outerHTML" hx-target="#{{view_id|safe}}" + hx-on:click="htmxLoadIndicator(this);" class="oh-pagination__link" >{% trans "Previous" %} @@ -258,6 +261,7 @@ hx-get="{{search_url}}?{{saved_filters.urlencode}}&page={{ queryset.next_page_number }}&filter_applied=on" hx-swap="outerHTML" hx-target="#{{view_id|safe}}" + hx-on:click="htmxLoadIndicator(this);" class="oh-pagination__link" >{% trans "Next" %} @@ -267,6 +271,7 @@ hx-get="{{search_url}}?{{saved_filters.urlencode}}&page={{ queryset.paginator.num_pages }}&filter_applied=on" hx-swap="outerHTML" hx-target="#{{view_id|safe}}" + hx-on:click="htmxLoadIndicator(this);" class="oh-pagination__link" >{% trans "Last" %}