Only autofocus the basic search on the home page when you first arrive
to the online public catalog. This allows users to use the up/down arrows
to navigate the catalog search results.
Retain original functionality for the staff client for now.
Signed-off-by: Ben Shum <bshum@biblio.org>
INCLUDE "opac/parts/topnav.tt2";
ctx.page_title = l("Home") %]
<h2 class="sr-only">[% l('Catalog Home') %]</h2>
- [% INCLUDE "opac/parts/searchbar.tt2" %]
+ [% INCLUDE "opac/parts/searchbar.tt2" autofocus_on='t' %]
<div id="content-wrapper">
<div id="main-content-home">
<div class="common-full-pad"></div>
store_args='{"org_unit_getter": function() { return [% ctx.search_ou %]; }}'
[%- END # opac_visible -%]
[%- ELSE -%]
- [% IF basic_search != "f" %] autofocus [% END %] x-webkit-speech
+ [% IF (basic_search != "f" AND ctx.is_staff) OR autofocus_on == "t" %] autofocus [% END %] x-webkit-speech
[%- END # autosuggest enabled %] />
</label>
</span>