Bugzilla – Attachment 163917 Details for
Bug 36302
Patron search from search bar broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36302: Reinstate defer_loading
Bug-36302-Reinstate-deferloading.patch (text/plain), 3.33 KB, created by
Pedro Amorim
on 2024-03-26 12:30:59 UTC
(
hide
)
Description:
Bug 36302: Reinstate defer_loading
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-03-26 12:30:59 UTC
Size:
3.33 KB
patch
obsolete
>From 7b181b5fcafc3ae0aec014ae479e8b8e62e069d1 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Mon, 25 Mar 2024 17:14:01 +0000 >Subject: [PATCH] Bug 36302: Reinstate defer_loading > >defer_loading is now a patron_search_js BLOCK param - default on >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 6 +++--- > koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 2 +- > 2 files changed, 4 insertions(+), 4 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 5ce0e123d9d..5692cca66b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -226,6 +226,7 @@ > [%# callback: name of the JS function that will be called when a patron is selected. Only work with action=select %] > [%# display_search_description: boolean, default off. Display the description of the search %] > [%# adjust_history: boolean, default off. Change the current url when a first letter is selected %] >+[%# defer_loading: boolean, default on. If true, it will not load the table until a search is triggered %] > [% BLOCK patron_search_js %] > > [% IF redirect_if_one_result && !redirect_url %] >@@ -293,7 +294,7 @@ > let Sticky; > let singleBranchMode = '[% singleBranchMode | html %]'; > let logged_in_library_id = "[% Branches.GetLoggedInBranchcode | html %]"; >- >+ let defer_loading = Number( '[% defer_loading | html %]' || 1 ); > [% IF adjust_history %] > /* popstate event triggered by forward and back button. Need to refresh search */ > window.addEventListener('popstate', (event) => { >@@ -723,8 +724,7 @@ > patron_search_form.find(".searchpattern").parent().hide(); > }); > >- let urlParams = new URLSearchParams(window.location.search); >- if(urlParams.size > 0){ >+ if ( !defer_loading ) { > patron_search_form.submit(); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index 31f849ee78f..7bc63c9e729 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -347,7 +347,7 @@ > [% ELSE %] > [% SET redirect_url = '/cgi-bin/koha/members/moremember.pl' %] > [% END %] >- [% PROCESS patron_search_js table_id => 'memberresultst', categories => categories, libraries => libraries, columns => columns,actions => ['edit', 'checkout'], redirect_if_one_result => 1, redirect_url => redirect_url, sticky_header => "searchheader", sticky_to => "searchresults", default_sort_column => 'name-address', display_search_description => 1, remember_selections => 1, adjust_history => 1 %] >+ [% PROCESS patron_search_js defer_loading => defer_loading, table_id => 'memberresultst', categories => categories, libraries => libraries, columns => columns,actions => ['edit', 'checkout'], redirect_if_one_result => 1, redirect_url => redirect_url, sticky_header => "searchheader", sticky_to => "searchresults", default_sort_column => 'name-address', display_search_description => 1, remember_selections => 1, adjust_history => 1 %] > > [% END %] > [% INCLUDE 'intranet-bottom.inc' %] >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36302
:
163096
|
163099
|
163105
|
163106
|
163108
|
163109
|
163113
|
163121
|
163122
|
163207
|
163226
|
163487
|
163917
|
163918
|
163974
|
164002
|
164003
|
164004
|
164005