From: senator Date: Thu, 9 Sep 2010 21:29:17 +0000 (+0000) Subject: Backport r17555 from trunk, better autogrid overrideEditWidget value shoving X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=2b4e0dea8e8c44139b3f9093a794aaadbac63785;p=contrib%2FConifer.git Backport r17555 from trunk, better autogrid overrideEditWidget value shoving git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_0@17556 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 013a2ed549..d94fd41655 100644 --- a/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js +++ b/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js @@ -177,7 +177,10 @@ if(!dojo._hasResource['openils.widget.AutoFieldWidget']) { 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(); diff --git a/Open-ILS/web/js/dojo/openils/widget/EditPane.js b/Open-ILS/web/js/dojo/openils/widget/EditPane.js index 5d1f71f6d7..4e98b04fa5 100644 --- a/Open-ILS/web/js/dojo/openils/widget/EditPane.js +++ b/Open-ILS/web/js/dojo/openils/widget/EditPane.js @@ -126,9 +126,11 @@ if(!dojo._hasResource['openils.widget.EditPane']) { ); 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 + ); } }