Bugzilla – Attachment 60804 Details for
Bug 1356
Lose original search term when select "More options"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 1356: Use JS to show more/less options in advanced search
Bug-1356-Use-JS-to-show-moreless-options-in-advanc.patch (text/plain), 4.34 KB, created by
Aleisha Amohia
on 2017-03-03 02:00:41 UTC
(
hide
)
Description:
Bug 1356: Use JS to show more/less options in advanced search
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2017-03-03 02:00:41 UTC
Size:
4.34 KB
patch
obsolete
>From 491fc96634f7c65c2d388c6bf9b9e743b36e3ff9 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 3 Mar 2017 01:59:45 +0000 >Subject: [PATCH] Bug 1356: Use JS to show more/less options in advanced search > >Patch for STAFF SIDE ONLY. Not ready for sign-off. > >Sponsored-by: Catalyst IT >--- > .../prog/en/modules/catalogue/advsearch.tt | 39 ++++++++++++---------- > 1 file changed, 21 insertions(+), 18 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 6a7e045..129744d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >@@ -19,6 +19,20 @@ > $("input[name=q]:eq(0)").focus(); > $('#advsearches').tabs(); > $('#toolbar').fixFloat(); >+ >+ $("#show_less").hide(); >+ $(".more").hide(); >+ $("#show_more").click(function(){ >+ $(".more").show(); >+ $("#show_more").hide(); >+ $("#show_less").show(); >+ }); >+ $("#show_less").click(function(){ >+ $(".more").hide(); >+ $("#show_less").hide(); >+ $("#show_more").show(); >+ }); >+ > }); > </script> > </head> >@@ -44,15 +58,11 @@ > <button class="btn btn-default btn-sm" type="submit" accesskey="s"><i class="fa fa-search"></i> Search</button> > </div> > <div class="btn-group"> >- [% IF ( expanded_options ) %] >- <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=0" class="btn btn-sm btn-link"><i class="fa fa-search-minus"></i> Fewer options</a> >- </div> >- [% ELSE %] >- <a href="/cgi-bin/koha/catalogue/search.pl?expanded_options=1" class="btn btn-sm btn-link"><i class="fa fa-search-plus"></i> More options</a> >+ <a id="show_less" class="btn btn-sm btn-link"><i class="fa fa-search-minus"></i> Fewer options</a> >+ <a id="show_more" class="btn btn-sm btn-link"><i class="fa fa-search-plus"></i> More options</a> > </div> >- [% END %] > <div class="btn-group"> >- <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear&expanded_options=[% expanded_options %]" class="btn btn-sm btn-link"><i class="fa fa-trash"></i> Clear fields</a> >+ <a href="/cgi-bin/koha/catalogue/search.pl?do=Clear" class="btn btn-sm btn-link"><i class="fa fa-trash"></i> Clear fields</a> > </div> > </fieldset> > </div> >@@ -87,25 +97,21 @@ > <legend>Search for </legend> > [% FOREACH search_box IN search_boxes_loop %] > [% IF ( search_boxes_label ) %]<div style="text-indent: 4.5em;">[% ELSE %]<div>[% END %] >- [% IF ( expanded_options ) %] > [% IF ( search_box.boolean ) %] >- <select name="op"> >+ <select name="op" class="more"> > <option value="and" selected="selected">and</option> > <option value="or">or</option> > <option value="not">not</option> > </select> > [% END %] >- [% END %] > [% INCLUDE 'search_indexes.inc' %] > <input type="text" size="30" name="q" title="Enter search terms" value="" /> >- [% IF ( expanded_options ) %] > [% IF ( search_box.add_field ) %] >- <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field">[+]</a> >+ <a href="JavaScript:add_field();" id="ButtonPlus" title="Add another field" class="more">[+]</a> > [% END %] > [% IF ( search_box.scan_index ) %] >- <label for="scan">Scan indexes:</label> <input type="checkbox" name="scan" id="scan" value="1" /> >+ <label for="scan" class="more">Scan indexes:</label> <input class="more" type="checkbox" name="scan" id="scan" value="1" /> > [% END %] >- [% END %] > </div> > [% END %] > </fieldset> >@@ -142,9 +148,8 @@ > </div> > [% END %] > <!-- /MC-TYPE LIMIT --> >-[% IF ( expanded_options ) %] > <!-- BASIC LIMITS --> >- <fieldset id="basiclimits"> >+ <fieldset id="basiclimits" class="more"> > <legend>Limits</legend> > <fieldset id="pubrange"> > <!-- PUB / COPY YEAR LIMIT --><!-- FIXME: add publication,copyright,acquisition options --> >@@ -170,8 +175,6 @@ > </fieldset> > </fieldset> > <!-- /BASIC LIMITS --> >-[% END %] >- > > [% IF ( UNIMARC ) %] > [% INCLUDE 'subtypes_unimarc.inc' %] >-- >2.1.4
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 1356
: 60804