From: Lebbeous Fogle-Weekley Date: Thu, 26 Jan 2012 15:44:37 +0000 (-0500) Subject: JSPAC: Only dojo.require() the autosuggest stuff if we need it X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ebd51ce3310e6f710d4ac831bbf0d329aed761f8;p=evergreen%2Fequinox.git JSPAC: Only dojo.require() the autosuggest stuff if we need it Signed-off-by: Lebbeous Fogle-Weekley --- 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(