Make overrideEditWidgets to an AutoGrid able to accept shoved in values from
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Sep 2010 18:53:14 +0000 (18:53 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Sep 2010 18:53:14 +0000 (18:53 +0000)
the fields of the object they're editing.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17547 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
Open-ILS/web/js/dojo/openils/widget/EditPane.js

index 8c3a3cf..013a2ed 100644 (file)
@@ -176,8 +176,12 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) {
                 // 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;
             }
             
index 800eb0b..5d1f71f 100644 (file)
@@ -125,6 +125,13 @@ if(!dojo._hasResource['openils.widget.EditPane']) {
                         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');