Bugzilla – Attachment 132773 Details for
Bug 30063
Make the main patron search use the /patrons REST API route
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30063: Restore back behaviour
Bug-30063-Restore-back-behaviour.patch (text/plain), 3.56 KB, created by
Martin Renvoize (ashimema)
on 2022-03-31 13:23:07 UTC
(
hide
)
Description:
Bug 30063: Restore back behaviour
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-03-31 13:23:07 UTC
Size:
3.56 KB
patch
obsolete
>From b4e7da7c11d77e1d613ece4cb894753dc9da82d7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 30 Mar 2022 13:02:07 +0200 >Subject: [PATCH] Bug 30063: Restore back behaviour >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Séverine Queune <severine.queune@bulac.fr> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 5 +++-- > members/member.pl | 4 ++-- > members/members-home.pl | 1 + > 3 files changed, 6 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 514ced47b1..b8d479e15d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -249,6 +249,7 @@ > var Sticky; > var singleBranchMode = '[% singleBranchMode | html %]'; > let logged_in_library_id = "[% Branches.GetLoggedInBranchcode | html %]"; >+ let defer_loading = [% defer_loading ? 1 : 0 %]; > > /* popstate event triggered by forward and back button. Need to refresh search */ > window.addEventListener('popstate', (event) => { >@@ -368,7 +369,7 @@ > [% END %] > }, > [% END %] >- "iDeferLoading": 0, >+ "iDeferLoading": defer_loading, > "columns": [ > [% FOR column IN columns %] > [% IF default_sort_column == column %] >@@ -665,7 +666,7 @@ > $("#searchpattern").parent().hide(); > }); > >- if ( $("#search_patron_filter").val().length > 0 ) { >+ if ( !defer_loading && $("#search_patron_filter").val().length > 0 ) { > $("#patron_search_form").submit(); > } > >diff --git a/members/member.pl b/members/member.pl >index bd85a3b613..2bd275cee5 100755 >--- a/members/member.pl >+++ b/members/member.pl >@@ -68,7 +68,7 @@ my $searchfieldstype = $input->param('searchfieldstype') || 'standard'; > > $template->param( 'alphabet' => C4::Context->preference('alphabet') || join ' ', 'A' .. 'Z' ); > >-my $view = $input->request_method() eq "GET" && !$circsearch ? "show_form" : "show_results"; >+my $defer_loading = $input->request_method() eq "GET" && !$circsearch ? 1 : 0; > > $template->param( > patron_lists => [ GetPatronLists() ], >@@ -78,7 +78,7 @@ $template->param( > searchtype => scalar $input->param('searchtype') || 'contain', > searchfieldstype => $searchfieldstype, > PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, >- view => $view, >+ defer_loading => $defer_loading, > circsearch => $circsearch, > attribute_type_codes => ( C4::Context->preference('ExtendedPatronAttributes') > ? [ Koha::Patron::Attribute::Types->search( { staff_searchable => 1 } )->get_column('code') ] >diff --git a/members/members-home.pl b/members/members-home.pl >index e3b903f463..b84bb47109 100755 >--- a/members/members-home.pl >+++ b/members/members-home.pl >@@ -76,6 +76,7 @@ $template->param( > attribute_type_codes => ( C4::Context->preference('ExtendedPatronAttributes') > ? [ Koha::Patron::Attribute::Types->search( { staff_searchable => 1 } )->get_column('code') ] > : [] ), >+ defer_loading => 1, > ); > > output_html_with_http_headers $query, $cookie, $template->output; >-- >2.20.1
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 30063
:
130608
|
130609
|
130610
|
130611
|
130612
|
130613
|
130614
|
130615
|
132387
|
132552
|
132731
|
132732
|
132733
|
132734
|
132735
|
132736
|
132737
|
132738
|
132739
|
132740
|
132741
|
132742
|
132743
|
132744
|
132745
|
132746
|
132747
|
132748
|
132749
|
132759
|
132760
|
132761
|
132762
|
132763
|
132764
|
132765
|
132766
|
132767
|
132768
|
132769
|
132770
|
132771
|
132772
| 132773 |
132774
|
132775
|
132776
|
132777
|
132958