Flattener grid defines override args in constructor
authorBill Erickson <berick@esilibrary.com>
Tue, 19 Jun 2012 14:18:44 +0000 (10:18 -0400)
committerDan Scott <dan@coffeecode.net>
Wed, 11 Jul 2012 22:15:30 +0000 (18:15 -0400)
...instead of the seconday load handler.  Otherwise, the
grid.overrideEditWidget, etc. containers may be undefined at page load
time.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
Open-ILS/web/js/dojo/openils/widget/FlattenerGrid.js

index 0b1914e..7691789 100644 (file)
@@ -379,6 +379,10 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) {
 
                 this.fmIdentifier = this.fmIdentifier ||
                     fieldmapper.IDL.fmclasses[this.fmClass].pkey;
+
+                this.overrideEditWidgets = {};
+                this.overrideEditWidgetClass = {};
+                this.overrideWidgetArgs = {};
             },
 
             "startup": function() {
@@ -459,10 +463,6 @@ if (!dojo._hasResource["openils.widget.FlattenerGrid"]) {
 
                 this._showing_create_pane = false;
 
-                this.overrideEditWidgets = {};
-                this.overrideEditWidgetClass = {};
-                this.overrideWidgetArgs = {};
-
                 if (this.editOnEnter)
                     this._applyEditOnEnter();
                 else if (this.singleEditStyle)