From b80f2acdadfb5ffb2006a304681c33eaccc514b1 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 13 Aug 2012 15:51:35 -0400 Subject: [PATCH] TPAC: AutoSuggest throws a JS error on login form searchbar.tt2 includes a reference to the AutoSuggest widget that results in an error if the dojo code has not been required, which is par for the course. However, on the login form we disabled the AutoSuggest inline code because we didn't want it to override the autofocus for the login user name; unfortunately, the searchbar exists on the login form, and a JS error is thrown. On most browsers, not a problem, but on IE it throws up a nasty dialog if you have the right/wrong settings. The simplest way to resolve this is to not set autofocus if we're not on the basic_search page, but keep the rest of the AutoSuggest code around. In addition, we can avoid some other undefined var warnings by stepping carefully through the search for the dijit value. Signed-off-by: Dan Scott --- Open-ILS/src/templates/opac/advanced.tt2 | 1 + Open-ILS/src/templates/opac/parts/js.tt2 | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/opac/advanced.tt2 b/Open-ILS/src/templates/opac/advanced.tt2 index 220c56fd20..452cd8cee0 100644 --- a/Open-ILS/src/templates/opac/advanced.tt2 +++ b/Open-ILS/src/templates/opac/advanced.tt2 @@ -4,6 +4,7 @@ ctx.page_title = l("Advanced Search"); pane = CGI.param("pane") || "advanced"; loc = ctx.search_ou; + basic_search = 'f'; -%]