Merge branch 'master' of git.evergreen-ils.org:Evergreen
authorJason Etheridge <jason@esilibrary.com>
Mon, 2 Apr 2012 15:11:35 +0000 (11:11 -0400)
committerJason Etheridge <jason@esilibrary.com>
Mon, 2 Apr 2012 15:11:35 +0000 (11:11 -0400)
Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js
Open-ILS/web/js/dojo/openils/widget/GridColumnPicker.js

index b3ea3f1..a18cd4a 100644 (file)
@@ -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 = {};
index 250bca5..9cc367d 100644 (file)
@@ -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() {