From 491fc96634f7c65c2d388c6bf9b9e743b36e3ff9 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia 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(); + }); + }); @@ -44,15 +58,11 @@
- [% IF ( expanded_options ) %] - Fewer options -
- [% ELSE %] - More options + Fewer options + More options - [% END %]
- Clear fields + Clear fields
@@ -87,25 +97,21 @@ Search for [% FOREACH search_box IN search_boxes_loop %] [% IF ( search_boxes_label ) %]
[% ELSE %]
[% END %] - [% IF ( expanded_options ) %] [% IF ( search_box.boolean ) %] - [% END %] - [% END %] [% INCLUDE 'search_indexes.inc' %] - [% IF ( expanded_options ) %] [% IF ( search_box.add_field ) %] - [+] + [+] [% END %] [% IF ( search_box.scan_index ) %] - + [% END %] - [% END %]
[% END %] @@ -142,9 +148,8 @@
[% END %] -[% IF ( expanded_options ) %] -
+
Limits
@@ -170,8 +175,6 @@
-[% END %] - [% IF ( UNIMARC ) %] [% INCLUDE 'subtypes_unimarc.inc' %] -- 2.1.4