From 5d1c05e4340c1050a8a8896b875e245cbd16e4e6 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Thu, 12 Jul 2012 19:12:06 -0400 Subject: [PATCH] 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 --- Open-ILS/src/templates/opac/login.tt2 | 13 +------------ Open-ILS/src/templates/opac/parts/advanced/expert.tt2 | 2 +- Open-ILS/src/templates/opac/parts/advanced/global_row.tt2 | 2 +- Open-ILS/src/templates/opac/parts/advanced/numeric.tt2 | 2 +- Open-ILS/src/templates/opac/parts/js.tt2 | 2 +- Open-ILS/src/templates/opac/parts/login/form.tt2 | 2 +- Open-ILS/src/templates/opac/parts/searchbar.tt2 | 2 +- Open-ILS/src/templates/opac/record.tt2 | 4 +++- 8 files changed, 10 insertions(+), 19 deletions(-) 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 df50a03559..0060bbe717 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"; %]