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

Evergreen Git git at git.evergreen-ils.org
Mon Apr 2 10:40:52 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  10fbba1ea4a8c9446abc45bfc8037a02ddb9fabe (commit)
      from  a52131145f41fe3f19f5c4ae5ccf4cad392c1cf0 (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 10fbba1ea4a8c9446abc45bfc8037a02ddb9fabe
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Apr 2 10:19:02 2012 -0400

    FlattenerGrid (re)honors IDL column labels as default
    
    Linking the GridColumnPicker to FlattenerGrid killed the ability for the
    FlattenerGrid to fall back to the IDL column label when no label was
    defined in the markup.  This change adds a reloadStructure operation to
    GridColumnPicker.  FlattenerGrid uses this to pass the updated column
    labels (and any other changes) to gridcolumnpicker, which then updates
    the grid display to match.
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js b/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js
index b3ea3f1..a18cd4a 100644
--- a/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js
+++ b/Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js
@@ -298,6 +298,9 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) {
                     }), this.query
                 );
 
+                // pick up any column label changes
+                this.columnPicker.reloadStructure();
+
                 this._showing_create_pane = false;
 
                 this.overrideEditWidgets = {};
diff --git a/Open-ILS/web/js/dojo/openils/widget/GridColumnPicker.js b/Open-ILS/web/js/dojo/openils/widget/GridColumnPicker.js
index 250bca5..9cc367d 100644
--- a/Open-ILS/web/js/dojo/openils/widget/GridColumnPicker.js
+++ b/Open-ILS/web/js/dojo/openils/widget/GridColumnPicker.js
@@ -58,6 +58,16 @@ if(!dojo._hasResource["openils.widget.GridColumnPicker"]) {
             };
         },
 
+        /** Loads the current grid structure and passes the 
+         *  structure back to the grid to force a UI refresh.
+         *  This is necessary if external forces alter the structure. 
+         */
+        reloadStructure : function() {
+            this.structure = this.grid.structure;
+            this.cells = this.structure[0].cells[0].slice();
+            this.grid.setStructure(this.structure);
+        },
+
         // determine the visible sorting from the 
         // view and update our list of cells to match
         refreshCells : function() {

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

Summary of changes:
 .../web/js/dojo/openils/widget/FlattenerGrid.js    |    3 +++
 .../web/js/dojo/openils/widget/GridColumnPicker.js |   10 ++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list