SWF-703 - Spring.ElementDecoration should properly copy any style class or inline style from the decorated node.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -25,7 +25,7 @@ dojo.declare("Spring.DefaultEquals", null, {
|
||||
|
||||
dojo.declare("Spring.ElementDecoration", [Spring.AbstractElementDecoration, Spring.DefaultEquals], {
|
||||
constructor : function(config) {
|
||||
this.copyFields = new Array('name', 'value', 'type', 'checked', 'selected', 'readOnly', 'disabled', 'alt', 'maxLength');
|
||||
this.copyFields = new Array('name', 'value', 'type', 'checked', 'selected', 'readOnly', 'disabled', 'alt', 'maxLength', 'class');
|
||||
dojo.mixin(this, config);
|
||||
if(this.widgetModule == "") {
|
||||
this.widgetModule = this.widgetType;
|
||||
@@ -49,6 +49,9 @@ dojo.declare("Spring.ElementDecoration", [Spring.AbstractElementDecoration, Spri
|
||||
this.widgetAttrs[copyField] = element[copyField];
|
||||
}
|
||||
}
|
||||
if(element['style'] && element['style'].cssText){
|
||||
this.widgetAttrs['style'] = element['style'].cssText;
|
||||
}
|
||||
dojo.require(this.widgetModule);
|
||||
var widgetConstructor = dojo.eval(this.widgetType);
|
||||
this.widget = new widgetConstructor(this.widgetAttrs, element);
|
||||
|
||||
Reference in New Issue
Block a user