From: Dan Scott Date: Thu, 12 Jul 2012 23:12:06 +0000 (-0400) Subject: TPAC: Set autofocus appropriately for different contexts X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e382960d71558c9453f008160b684aa00d6f7210;p=evergreen%2Fpines.git TPAC: Set autofocus appropriately for different contexts At login, the basic search bar was fighting (and winning) for the default focus rather than the username field. Additionally, in the advanced search pages, no field was getting focus. Therefore, check to see if we expect to be in a context where it makes sense to set the default focus to the basic search input field; otherwise, set the focus to the login username field or the appropriate advanced search field. Signed-off-by: Dan Scott Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/templates/opac/login.tt2 b/Open-ILS/src/templates/opac/login.tt2 index 29994adbf3..f6892bb7a9 100644 --- a/Open-ILS/src/templates/opac/login.tt2 +++ b/Open-ILS/src/templates/opac/login.tt2 @@ -1,6 +1,7 @@ [% PROCESS "opac/parts/header.tt2"; WRAPPER "opac/parts/base.tt2"; INCLUDE "opac/parts/topnav.tt2"; + basic_search = "f"; ctx.page_title = l("Account Login") %]
[% INCLUDE "opac/parts/searchbar.tt2" %] @@ -9,18 +10,6 @@
[% INCLUDE "opac/parts/login/form.tt2" %]
-
[% END %] diff --git a/Open-ILS/src/templates/opac/parts/advanced/expert.tt2 b/Open-ILS/src/templates/opac/parts/advanced/expert.tt2 index da8bba6c5b..7d1ffa1fb2 100644 --- a/Open-ILS/src/templates/opac/parts/advanced/expert.tt2 +++ b/Open-ILS/src/templates/opac/parts/advanced/expert.tt2 @@ -6,7 +6,7 @@ [% l("Tag:") %] - + [% l("Subfield:") %] [% l("Value:") %] diff --git a/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2 b/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2 index 02aa5d17b2..5171c35ac7 100644 --- a/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2 +++ b/Open-ILS/src/templates/opac/parts/advanced/global_row.tt2 @@ -42,7 +42,7 @@ [% END %] - + diff --git a/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2 b/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2 index 7262801ecf..32bf56eb3c 100644 --- a/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2 +++ b/Open-ILS/src/templates/opac/parts/advanced/numeric.tt2 @@ -18,7 +18,7 @@ - + diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2 index 7029554d02..e4aabb3498 100644 --- a/Open-ILS/src/templates/opac/parts/js.tt2 +++ b/Open-ILS/src/templates/opac/parts/js.tt2 @@ -59,7 +59,7 @@ -[% IF use_autosuggest.enabled == "t"; %] +[% IF use_autosuggest.enabled == "t" AND basic_search != "f"; %]