[open-ils-commits] [GIT] Evergreen ILS branch master updated. ad3af2aca6ad7d7d7e497b477e679c762d016f5d

Evergreen Git git at git.evergreen-ils.org
Fri Jul 27 14:07:04 EDT 2012


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, master has been updated
       via  ad3af2aca6ad7d7d7e497b477e679c762d016f5d (commit)
      from  6517e6fbeb80601a8aab8478484f6dbd22e3b001 (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 ad3af2aca6ad7d7d7e497b477e679c762d016f5d
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jul 27 13:51:05 2012 -0400

    Repair PCrudFilterPane localeStrings namespace pollution
    
    Avoid using the global 'localeStrings' variable in PCrudFilterPane
    because it clobbers the variable for UIs that use the same variable
    name.
    
    Originally repaired in working =>
    collab/berick/acq-fund-rollover-repairs, but the change was lost with
    competing feature development.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>

diff --git a/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js b/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js
index 684980d..5a88701 100644
--- a/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js
+++ b/Open-ILS/web/js/dojo/openils/widget/PCrudFilterPane.js
@@ -40,8 +40,7 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
 
     dojo.requireLocalization("openils.widget", "PCrudFilterPane");
 
-    /* XXX namespace pollution! arg! Fix this whole module sometime. */
-    var localeStrings = dojo.i18n.getLocalization(
+    var pcFilterLocaleStrings = dojo.i18n.getLocalization(
         "openils.widget", "PCrudFilterPane"
     );
 
@@ -57,65 +56,65 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
                 "items": [
                     {
                         "name": "=",
-                        "label": localeStrings.OPERATOR_EQ,
+                        "label": pcFilterLocaleStrings.OPERATOR_EQ,
                         "param_count": 1,
                         "minimal": true,
                         "strict": true
                     }, {
                         "name": "!=",
-                        "label": localeStrings.OPERATOR_NE,
+                        "label": pcFilterLocaleStrings.OPERATOR_NE,
                         "param_count": 1,
                         "minimal": true,
                         "strict": true
                     }, {
                         "name": "null",
-                        "label": localeStrings.OPERATOR_IS_NULL,
+                        "label": pcFilterLocaleStrings.OPERATOR_IS_NULL,
                         "param_count": 0,
                         "minimal": true,
                         "strict": true
                     }, {
                         "name": "not null",
-                        "label": localeStrings.OPERATOR_IS_NOT_NULL,
+                        "label": pcFilterLocaleStrings.OPERATOR_IS_NOT_NULL,
                         "param_count": 0,
                         "minimal": true,
                         "strict": true
                     }, {
                         "name": ">",
-                        "label": localeStrings.OPERATOR_GT,
+                        "label": pcFilterLocaleStrings.OPERATOR_GT,
                         "param_count": 1,
                         "strict": true
                     }, {
                         "name": "<",
-                        "label": localeStrings.OPERATOR_LT,
+                        "label": pcFilterLocaleStrings.OPERATOR_LT,
                         "param_count": 1,
                         "strict": true
                     }, {
                         "name": ">=",
-                        "label": localeStrings.OPERATOR_GTE,
+                        "label": pcFilterLocaleStrings.OPERATOR_GTE,
                         "param_count": 1,
                         "strict": true
                     }, {
                         "name": "<=",
-                        "label": localeStrings.OPERATOR_LTE,
+                        "label": pcFilterLocaleStrings.OPERATOR_LTE,
                         "param_count": 1,
                         "strict": true
                     }, {
                         "name": "between",
-                        "label": localeStrings.OPERATOR_BETWEEN,
+                        "label": pcFilterLocaleStrings.OPERATOR_BETWEEN,
                         "param_count": 2,
                         "strict": true
                     }, {
                         "name": "not between",
-                        "label": localeStrings.OPERATOR_NOT_BETWEEN,
+                        "label": pcFilterLocaleStrings.OPERATOR_NOT_BETWEEN,
                         "param_count": 2,
                         "strict": true
                     }, {
                         "name": "like",
-                        "label": localeStrings.OPERATOR_LIKE,
+                        "label": pcFilterLocaleStrings.OPERATOR_LIKE,
                         "param_count": 1
                     }, {
                         "name": "not like",
-                        "label": localeStrings.OPERATOR_NOT_LIKE,
+                        "label": pcFilterLocaleStrings.OPERATOR_NOT_LIKE,
                         "param_count": 1
                     }
                 ]
@@ -202,7 +201,7 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
             dojo.create(
                 "td", {
                     "colspan": 4,
-                    "innerHTML": localeStrings[
+                    "innerHTML": pcFilterLocaleStrings[
                         this.compact ? "EMPTY_CASE_COMPACT" : "EMPTY_CASE"
                     ]
                 }, tr
@@ -604,7 +603,7 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
                 /* Meaningless in a pane, but better here than in
                  * PCrudFilterDialog so that we don't need to load i18n
                  * strings there: */
-                this.title = this.title || localeStrings.DEFAULT_DIALOG_TITLE;
+                this.title = this.title || pcFilterLocaleStrings.DEFAULT_DIALOG_TITLE;
             },
 
             "_buildButtons": function() {
@@ -618,7 +617,7 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
 
                 new dijit.form.Button(
                     {
-                        "label": localeStrings.ADD_ROW,
+                        "label": pcFilterLocaleStrings.ADD_ROW,
                         "scrollOnFocus": false, /* almost always better */
                         "onClick": function() {
                             self.filter_row_manager.add_row();
@@ -628,7 +627,7 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
 
                 this._apply_button = new dijit.form.Button(
                     {
-                        "label": localeStrings.APPLY,
+                        "label": pcFilterLocaleStrings.APPLY,
                         "scrollOnFocus": false,
                         "onClick": function() { self.doApply(); }
                     }, dojo.create("span", {}, button_holder)
@@ -637,7 +636,7 @@ if (!dojo._hasResource['openils.widget.PCrudFilterPane']) {
                 if (!this.useDiv) {
                     new dijit.form.Button(
                         {
-                            "label": localeStrings.CANCEL,
+                            "label": pcFilterLocaleStrings.CANCEL,
                             "scrollOnFocus": false,
                             "onClick": function() {
                                 if (self.onCancel)

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

Summary of changes:
 .../web/js/dojo/openils/widget/PCrudFilterPane.js  |   37 +++++++++----------
 1 files changed, 18 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list