[open-ils-commits] r16518 - trunk/Open-ILS/web/js/dojo/openils/widget (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu May 27 12:04:47 EDT 2010
Author: erickson
Date: 2010-05-27 12:04:44 -0400 (Thu, 27 May 2010)
New Revision: 16518
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js
Log:
repaired bug in dojo.mixin usage for applying overrides. support for stying fields marked readOnly via override
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js 2010-05-27 13:18:46 UTC (rev 16517)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/EditPane.js 2010-05-27 16:04:44 UTC (rev 16518)
@@ -91,12 +91,6 @@
dojo.addClass(nameTd, 'openils-widget-editpane-name-cell');
dojo.addClass(valTd, 'openils-widget-editpane-value-cell');
- if(this.readOnly) {
- dojo.addClass(nameTd, 'openils-widget-editpane-ro-name-cell');
- dojo.addClass(valTd, 'openils-widget-editpane-ro-value-cell');
- }
-
-
/*
if(this.fieldDocs[field]) {
var helpLink = dojo.create('a');
@@ -117,7 +111,7 @@
this.overrideWidgetArgs[field.name] = {};
var args = dojo.mixin(
- this.overrideWidgetArgs[field.name], {
+ { // defaults
idlField : field,
fmObject : this.fmObject,
fmClass : this.fmClass,
@@ -127,9 +121,15 @@
widget : this.overrideWidgets[field.name],
widgetClass : this.overrideWidgetClass[field.name],
disableWidgetTest : this.disableWidgetTest
- }
+ },
+ this.overrideWidgetArgs[field.name] // per-field overrides
);
+ if(args.readOnly) {
+ dojo.addClass(nameTd, 'openils-widget-editpane-ro-name-cell');
+ dojo.addClass(valTd, 'openils-widget-editpane-ro-value-cell');
+ }
+
if(this.requiredFields && this.requiredFields.indexOf(field.name) >= 0) {
if(!args.dijitArgs) args.dijitArgs = {};
args.dijitArgs.required = true;
More information about the open-ils-commits
mailing list