Within Acquisitions General Search, javascript included from one file
in the <head> relies on the variable "localeStrings" being initialized
by javascript included from a file in <body>. Sometimes the wrong
javascript wins the race, you get an error about localeStrings being
undefined in the Javascript console, and the page stops loading.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
dojo.require('openils.PermaCrud');
dojo.require("openils.widget.PCrudAutocompleteBox");
-dojo.requireLocalization('openils.acq', 'acq');
-var localeStrings = dojo.i18n.getLocalization('openils.acq', 'acq');
+if (!localeStrings) { /* we can do this because javascript doesn't have block scope */
+ dojo.requireLocalization('openils.acq', 'acq');
+ var localeStrings = dojo.i18n.getLocalization('openils.acq', 'acq');
+}
const XUL_OPAC_WRAPPER = 'chrome://open_ils_staff_client/content/cat/opac.xul';
var li_exportable_attrs = ["issn", "isbn", "upc"];
dojo.require("openils.widget.XULTermLoader");
dojo.require("openils.PermaCrud");
+if (!localeStrings) { /* we can do this because javascript doesn't have block
+ scope */
+ dojo.requireLocalization('openils.acq', 'acq');
+ var localeStrings = dojo.i18n.getLocalization('openils.acq', 'acq');
+}
+
var termSelectorFactory;
var termManager;
var resultManager;