Bugzilla – Attachment 125020 Details for
Bug 28847
Branch limits while searching should be expanded in query building and not in CGI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28847: Only apply JS to branch/multibranch selection if there are search groups
Bug-28847-Only-apply-JS-to-branchmultibranch-selec.patch (text/plain), 2.21 KB, created by
Joonas Kylmälä
on 2021-09-18 08:16:11 UTC
(
hide
)
Description:
Bug 28847: Only apply JS to branch/multibranch selection if there are search groups
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-09-18 08:16:11 UTC
Size:
2.21 KB
patch
obsolete
>From b40f3404fc1589c819610e53dc6ca85c6d5caee9 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 13 Aug 2021 19:48:48 +0000 >Subject: [PATCH] Bug 28847: Only apply JS to branch/multibranch selection if > there are search groups >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > .../bootstrap/en/modules/opac-advsearch.tt | 32 ++++++++++--------- > 1 file changed, 17 insertions(+), 15 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >index 7735d38b48..e13a918c4a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >@@ -455,23 +455,25 @@ > [% Asset.js("lib/jquery/plugins/jquery.deserialize.min.js") | $raw %] > [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") | $raw %] > <script> >- function branch_limit() { >- if( $("#branchloop").val() != "" ){ >- $("#categoryloop").val("").prop('disabled',true); >- } else { >- $("#categoryloop").prop('disabled',false); >- } >- if ( $("#categoryloop").val() != "" ){ >- $("#branchloop").val("").prop('disabled',true); >- } else { >- $("#branchloop").prop('disabled',false); >- } >- } > $(document).ready(function() { >- branch_limit(); >- $("#branchloop,#categoryloop").on("change",function(){ >+ [% IF search_groups %] >+ function branch_limit() { >+ if( $("#branchloop").val() != "" ){ >+ $("#categoryloop").val("").prop('disabled',true); >+ } else { >+ $("#categoryloop").prop('disabled',false); >+ } >+ if ( $("#categoryloop").val() != "" ){ >+ $("#branchloop").val("").prop('disabled',true); >+ } else { >+ $("#branchloop").prop('disabled',false); >+ } >+ } > branch_limit(); >- }); >+ $("#branchloop,#categoryloop").on("change",function(){ >+ branch_limit(); >+ }); >+ [% END %] > > $('#advsearches').tabs(); > jQuery.cookie.json = true; >-- >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 28847
:
123807
|
123808
|
123809
|
123830
|
123832
|
123833
|
123835
|
123836
|
123837
|
123841
|
124574
|
124575
|
124576
|
124577
|
124797
|
124831
|
125017
|
125018
|
125019
| 125020 |
125021
|
125022
|
126827