From 34a3c3b8f69ac859758dfa0e1b732e8021e549c1 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 15 Mar 2024 11:33:42 +0000 Subject: [PATCH] Bug 36302: Get rid of defer_loading in patron-search Same test plan as the other patch, behavior is expected to be the same on both But this alternative removes technical debt, whereas the other patch adds. Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/includes/patron-search.inc | 9 ++------- members/member.pl | 3 --- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index cd992e21c2..5ce0e123d9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -293,11 +293,6 @@ let Sticky; let singleBranchMode = '[% singleBranchMode | html %]'; let logged_in_library_id = "[% Branches.GetLoggedInBranchcode | html %]"; - [% IF do_not_defer_loading %] - let defer_loading = 0; - [% ELSE %] - let defer_loading = 1; - [% END %] [% IF adjust_history %] /* popstate event triggered by forward and back button. Need to refresh search */ @@ -439,7 +434,6 @@ [% END %] }, [% END %] - "deferLoading": defer_loading, "columns": [ [% FOR column IN columns %] [% IF default_sort_column == column %] @@ -729,7 +723,8 @@ patron_search_form.find(".searchpattern").parent().hide(); }); - if ( !defer_loading ) { + let urlParams = new URLSearchParams(window.location.search); + if(urlParams.size > 0){ patron_search_form.submit(); } diff --git a/members/member.pl b/members/member.pl index 6f63ec5166..1f5bd5693a 100755 --- a/members/member.pl +++ b/members/member.pl @@ -69,8 +69,6 @@ my $searchtype = $input->param('searchtype'); $template->param( 'alphabet' => C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' ); -my $defer_loading = $input->request_method() eq "GET" && !$circsearch ? 1 : 0; - $template->param( patron_lists => [ GetPatronLists() ], searchmember => $searchmember, @@ -79,7 +77,6 @@ $template->param( searchtype => $searchtype, searchfieldstype => $searchfieldstype, PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, - do_not_defer_loading => !$defer_loading, circsearch => $circsearch, ); -- 2.39.5