provide three rows of search input by default
authorsenator <lebbeous@esilibrary.com>
Fri, 25 Feb 2011 16:53:58 +0000 (11:53 -0500)
committersenator <lebbeous@esilibrary.com>
Fri, 25 Feb 2011 16:53:58 +0000 (11:53 -0500)
this better accommodates users with no JS

Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2

index beb9ee9..e4b0741 100644 (file)
@@ -21,6 +21,7 @@ sub _prepare_biblio_search_basics {
     for (my $i = 0; $i < scalar @{$parts{'qtype'}}; $i++) {
         my ($qtype, $contains, $query) = map { $parts{$_}->[$i] } @part_names;
 
+        next unless $query =~ /\S/;
         push(@chunks, $qtype . ':') unless $qtype eq 'keyword' and $i == 0;
 
         # This stuff probably will need refined or rethought to better handle
index afa97ff..2f874c9 100644 (file)
@@ -1,7 +1,7 @@
 [%
     contains = CGI.param('contains');
     queries = CGI.param('query');
-    qtypes = CGI.param('qtype') || ['keyword'];
+    qtypes = CGI.param('qtype') || ['keyword' x 3];
     FOR qtype IN qtypes;
         c = contains.shift;
         q = queries.shift; %]