Bugzilla – Attachment 124790 Details for
Bug 28821
OPAC Advanced search: Improve operation of button plus/less
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28821: (follow-up) Improve operation of button plus/less
Bug-28821-follow-up-Improve-operation-of-button-pl.patch (text/plain), 4.34 KB, created by
Fridolin Somers
on 2021-09-11 07:43:25 UTC
(
hide
)
Description:
Bug 28821: (follow-up) Improve operation of button plus/less
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2021-09-11 07:43:25 UTC
Size:
4.34 KB
patch
obsolete
>From 74c05cf138fba2aac9e5b524b34d5cecdd0e27f8 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 6 Aug 2021 07:28:12 +0000 >Subject: [PATCH] Bug 28821: (follow-up) Improve operation of button plus/less > >Follow-up for bug 28784. > >Do not remove the op select on the first row. >Allow plus/less on all lines. Allow less until we have one line left. >Make sure that first op is disabled and hidden with plus/less. > >Test plan: >Search on multiple indexes on advanced search. >Verify that plus/minus works as expected. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> >--- > .../opac-tmpl/bootstrap/en/modules/opac-advsearch.tt | 11 +++++------ > 1 file changed, 5 insertions(+), 6 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 273f19e070..fe86be2db4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-advsearch.tt >@@ -40,13 +40,11 @@ > <div class="search-term-row"> > <div class="search-term-input"> > [% IF ( expanded_options ) %] >- [% IF ( !loop.first ) %] > <select name="op" class="form-control"> > <option value="and" selected="selected">and</option> > <option value="or">or</option> > <option value="not">not</option> > </select> >- [% END %] > [% ELSE %] > <label for="search-field_[% loop.index | html %]"> > [% IF loop.index == 0 %] >@@ -118,14 +116,12 @@ > </div> <!-- .search-term-input --> > [% IF ( expanded_options ) %] > <div class="search-term-input"> >- [% IF ( !loop.first ) %] > <a class="ButtonPlus" title="Add another field" href="#"> > <i class="fa fa-plus-square" aria-hidden="true"></i> > </a> > <a class="ButtonLess" title="Remove field" href="#"> > <i class="fa fa-minus-square" aria-hidden="true"></i> > </a> >- [% END %] > </div> <!-- .search-term-input --> > [% END %] > </div> <!-- /.search-term-row --> >@@ -458,7 +454,8 @@ > $(document).ready(function() { > $('#advsearches').tabs(); > jQuery.cookie.json = true; >- //$('#advsearches > ul').tabs(); >+ >+ $('.search-term-row .search-term-input select[name="op"]').first().prop("disabled",true).hide(); > > [% IF ( ReturnToSearch ) %] > if (form_serialized = jQuery.cookie("form_serialized")) { >@@ -521,16 +518,18 @@ $(document).ready(function() { > $('.ButtonLess').show(); > var thisLine = $(this).parent().parent(); > var newLine = thisLine.clone(); >+ $(newLine).find('.search-term-input select[name="op"]').first().prop("disabled",false).show(); > newLine.find('input').val(''); > thisLine.after(newLine); > }); > > $(document).on("click", '.ButtonLess', function(e) { > e.preventDefault(); >- if($(this).parent().parent().siblings().length <= 3 ) { >+ if($(this).parent().parent().siblings().length < 2 ) { > $('.ButtonLess').hide(); > } > $(this).parent().parent().remove(); >+ $('.search-term-row .search-term-input select[name="op"]').first().prop("disabled",true).hide(); > }); > > </script> >-- >2.32.0
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 28821
:
123563
|
124790
|
125331
|
125452