[open-ils-commits] r17547 - trunk/Open-ILS/web/js/dojo/openils/widget (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Sep 9 14:53:19 EDT 2010


Author: senator
Date: 2010-09-09 14:53:14 -0400 (Thu, 09 Sep 2010)
New Revision: 17547

Modified:
   trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
   trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js
Log:
Make overrideEditWidgets to an AutoGrid able to accept shoved in values from
the fields of the object they're editing.


Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-09-09 16:30:38 UTC (rev 17546)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-09-09 18:53:14 UTC (rev 17547)
@@ -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: trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js	2010-09-09 16:30:38 UTC (rev 17546)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js	2010-09-09 18:53:14 UTC (rev 17547)
@@ -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