[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. 5028ea7345b88e191d5b00fbef9d4d3edc3ddac7

Evergreen Git git at git.evergreen-ils.org
Wed Nov 2 17:20:19 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_1 has been updated
       via  5028ea7345b88e191d5b00fbef9d4d3edc3ddac7 (commit)
      from  ffd3b0f1b6cb5b1ec129f9d0d0541f1c27c549df (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5028ea7345b88e191d5b00fbef9d4d3edc3ddac7
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Thu Oct 6 12:06:09 2011 -0400

    Acq: fix a bug that sometimes prevents the general search page from loading
    
    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 at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/web/js/ui/default/acq/common/li_table.js b/Open-ILS/web/js/ui/default/acq/common/li_table.js
index d8a2489..2bf6bd8 100644
--- a/Open-ILS/web/js/ui/default/acq/common/li_table.js
+++ b/Open-ILS/web/js/ui/default/acq/common/li_table.js
@@ -15,8 +15,10 @@ dojo.require('openils.widget.ProgressDialog');
 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"];
 
diff --git a/Open-ILS/web/js/ui/default/acq/search/unified.js b/Open-ILS/web/js/ui/default/acq/search/unified.js
index 8ff340e..02e1d68 100644
--- a/Open-ILS/web/js/ui/default/acq/search/unified.js
+++ b/Open-ILS/web/js/ui/default/acq/search/unified.js
@@ -5,6 +5,12 @@ dojo.require("openils.widget.AutoWidget");
 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;

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/js/ui/default/acq/common/li_table.js |    6 ++++--
 Open-ILS/web/js/ui/default/acq/search/unified.js  |    6 ++++++
 2 files changed, 10 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list