Bugzilla – Attachment 113874 Details for
Bug 7607
Advanced search: Index and search term don't match when leaving fields empty
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7607: (follow-up) Address OPAC and limits
Bug-7607-follow-up-Address-OPAC-and-limits.patch (text/plain), 3.63 KB, created by
Martin Renvoize (ashimema)
on 2020-11-20 11:15:14 UTC
(
hide
)
Description:
Bug 7607: (follow-up) Address OPAC and limits
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-11-20 11:15:14 UTC
Size:
3.63 KB
patch
obsolete
>From 96787442c1cdeae94f3653768bb6d5e0f0d45882 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 18 Nov 2020 13:15:04 +0000 >Subject: [PATCH] Bug 7607: (follow-up) Address OPAC and limits > >This patch adds the same function to the OPAC and adds support for limits > >I adjust the class on staff side to match the one already existing on OPAC > >On the OPAC when you click the back button the fields are not enabled - on the staff side they are, >I leave this problem for someone else to solve > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/en/modules/catalogue/advsearch.tt | 4 ++-- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 7 ++++++- > .../opac-tmpl/bootstrap/en/modules/opac-advsearch.tt | 12 ++++++++++++ > 3 files changed, 20 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >index 11b84e53bb..553ef59917 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >@@ -95,9 +95,9 @@ > <legend>Search for </legend> > [% FOREACH search_box IN search_boxes_loop %] > [% IF ( search_boxes_label ) %] >- <div class="search_set" style="text-indent: 4.5em;"> >+ <div class="search-term-row" style="text-indent: 4.5em;"> > [% ELSE %] >- <div class="search_set"> >+ <div class="search-term-row"> > [% END %] > [% IF ( expanded_options ) %] > [% IF ( search_box.boolean ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index 68f9e88c6b..f38b373f0b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -131,8 +131,13 @@ $.fn.selectTabByID = function (tabID) { > /* Search results browsing */ > /* forms with action leading to search */ > $("form[action*='search.pl']").submit(function(){ >+ $('[name^="limit"]').each(function(){ >+ if( $(this).val() == '' ){ >+ $(this).prop("disabled","disabled"); >+ } >+ }); > var disabledPrior = false; >- $(".search_set").each(function(){ >+ $(".search-term-row").each(function(){ > if( disabledPrior ){ > $(this).find('select[name="op"]').prop("disabled","disabled"); > disabledPrior = false; >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 1965b4d361..ada84161e9 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >@@ -481,6 +481,18 @@ $(document).ready(function() { > jQuery.removeCookie("search_path_code", { path: '/'}); > [% END %] > $('#advsearch form').submit(function() { >+ $('[name^="limit"]').each(function(){ >+ if( $(this).val() == '' ){ >+ $(this).prop("disabled","disabled"); >+ } >+ }); >+ $(".search-term-row").each(function(){ >+ if( $(this).find('input[name="q"]').val() == "" ){ >+ $(this).find('input[name="q"]').prop("disabled","disabled"); >+ $(this).find('select[name="op"]').prop("disabled","disabled"); >+ $(this).find('select[name="idx"]').prop("disabled","disabled"); >+ } >+ }); > form_serialized = $(this).serialize(); > jQuery.cookie("form_serialized", form_serialized,{ path: '/'}); > form_serialized_limits = [ >-- >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 7607
:
107963
|
110845
|
110849
|
111064
|
111065
|
112912
|
112963
|
112964
|
113133
|
113134
|
113682
|
113683
|
113691
|
113692
|
113781
|
113872
|
113873
| 113874