From ebd51ce3310e6f710d4ac831bbf0d329aed761f8 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Thu, 26 Jan 2012 10:44:37 -0500 Subject: [PATCH] JSPAC: Only dojo.require() the autosuggest stuff if we need it Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/web/opac/skin/default/js/search_bar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/web/opac/skin/default/js/search_bar.js b/Open-ILS/web/opac/skin/default/js/search_bar.js index be5e41f5d4..026c183a8f 100644 --- a/Open-ILS/web/opac/skin/default/js/search_bar.js +++ b/Open-ILS/web/opac/skin/default/js/search_bar.js @@ -13,8 +13,6 @@ G.evt.common.init.push(searchBarInit); var newSearchLocation; var newSearchDepth = null; -dojo.require("openils.widget.AutoSuggest"); - function autoSuggestInit() { var org_unit_getter = null; var global_flag = fieldmapper.standardRequest( @@ -29,6 +27,8 @@ function autoSuggestInit() { else if (global_flag.value && global_flag.value.match(/opac_visible/)) org_unit_getter = depthSelGetNewLoc; + dojo.require("openils.widget.AutoSuggest"); + /* See comments in openils.AutoSuggestStore, esp. near the constructor, * to find out what you can control with the storeArgs object. */ var widg = new openils.widget.AutoSuggest( -- 2.11.0