From: senator Date: Thu, 9 Sep 2010 18:53:14 +0000 (+0000) Subject: Make overrideEditWidgets to an AutoGrid able to accept shoved in values from X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2b338c6b8e69dfddb3faa41945acfdf5dfc36379;p=evergreen%2Fbjwebb.git Make overrideEditWidgets to an AutoGrid able to accept shoved in values from the fields of the object they're editing. git-svn-id: svn://svn.open-ils.org/ILS/trunk@17547 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js index 8c3a3cf80..013a2ed54 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js @@ -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; } diff --git a/Open-ILS/web/js/dojo/openils/widget/EditPane.js b/Open-ILS/web/js/dojo/openils/widget/EditPane.js index 800eb0b33..5d1f71f6d 100644 --- a/Open-ILS/web/js/dojo/openils/widget/EditPane.js +++ b/Open-ILS/web/js/dojo/openils/widget/EditPane.js @@ -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');