[open-ils-commits] r17556 - 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 17:29:22 EDT 2010


Author: senator
Date: 2010-09-09 17:29:17 -0400 (Thu, 09 Sep 2010)
New Revision: 17556

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 r17555 from trunk, better autogrid overrideEditWidget value shoving


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 21:28:20 UTC (rev 17555)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2010-09-09 21:29:17 UTC (rev 17556)
@@ -177,7 +177,10 @@
                 if(this.parentNode) // may already be in the "right" place
                     this.parentNode.appendChild(this.widget.domNode);
                 if (this.shove) {
-                    this.widget.attr("value", this.widgetValue);
+                    if (this.shove.mode == "update")
+                        this.widget.attr("value", this.widgetValue);
+                    else
+                        this.widgetValue = this.shove.create;
                     this._widgetLoaded();
                 } else if (this.widget.attr("value") == null) {
                     this._widgetLoaded();

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 21:28:20 UTC (rev 17555)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/EditPane.js	2010-09-09 21:29:17 UTC (rev 17556)
@@ -126,9 +126,11 @@
                     );
 
                     if (this.overrideWidgets[field.name]) {
-                        if (this.overrideWidgets[field.name].shove &&
-                            this.mode == "update") {
-                            args.shove = true;
+                        if (this.overrideWidgets[field.name].shove) {
+                            args.shove = dojo.mixin(
+                                {"mode": this.mode},
+                                this.overrideWidgets[field.name].shove
+                            );
                         }
                     }
 



More information about the open-ils-commits mailing list