[open-ils-commits] r17548 - branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Sep 9 14:58:35 EDT 2010


Author: senator
Date: 2010-09-09 14:58:30 -0400 (Thu, 09 Sep 2010)
New Revision: 17548

Modified:
   branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
   branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/EditPane.js
Log:
Backport r17547 from trunk: overrideEditWidgets in AutoGrid improvement


Modified: branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-09-09 18:53:14 UTC (rev 17547)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-09-09 18:58:30 UTC (rev 17548)
@@ -176,8 +176,12 @@
                 // core widget provided for us, attach and move on
                 if(this.parentNode) // may already be in the "right" place
                     this.parentNode.appendChild(this.widget.domNode);
-                if(this.widget.attr('value') == null)
+                if (this.shove) {
+                    this.widget.attr("value", this.widgetValue);
                     this._widgetLoaded();
+                } else if (this.widget.attr("value") == null) {
+                    this._widgetLoaded();
+                }
                 return;
             }
             

Modified: branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/EditPane.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/EditPane.js	2010-09-09 18:53:14 UTC (rev 17547)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/EditPane.js	2010-09-09 18:58:30 UTC (rev 17548)
@@ -125,6 +125,13 @@
                         this.overrideWidgetArgs[field.name] // per-field overrides
                     );
 
+                    if (this.overrideWidgets[field.name]) {
+                        if (this.overrideWidgets[field.name].shove &&
+                            this.mode == "update") {
+                            args.shove = true;
+                        }
+                    }
+
                     if(args.readOnly) {
                         dojo.addClass(nameTd, 'openils-widget-editpane-ro-name-cell');
                         dojo.addClass(valTd, 'openils-widget-editpane-ro-value-cell');



More information about the open-ils-commits mailing list