mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-19 12:44:17 +08:00
[Fixes #6812] Add shape attributes to "CreateElementTagBuilder"
This commit is contained in:
parent
94ddb257e1
commit
01fa02bd90
@ -17,6 +17,7 @@ namespace Orchard.Layouts.Helpers {
|
|||||||
|
|
||||||
public static OrchardTagBuilder AddCommonElementAttributes(this OrchardTagBuilder tagBuilder, dynamic shape) {
|
public static OrchardTagBuilder AddCommonElementAttributes(this OrchardTagBuilder tagBuilder, dynamic shape) {
|
||||||
var attributes = GetCommonElementAttributes(shape);
|
var attributes = GetCommonElementAttributes(shape);
|
||||||
|
tagBuilder.MergeAttributes(shape.Attributes);
|
||||||
tagBuilder.MergeAttributes(attributes);
|
tagBuilder.MergeAttributes(attributes);
|
||||||
return tagBuilder;
|
return tagBuilder;
|
||||||
}
|
}
|
||||||
@ -46,7 +47,7 @@ namespace Orchard.Layouts.Helpers {
|
|||||||
classes.Add(cssClass);
|
classes.Add(cssClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(classes.Any())
|
if (classes.Any())
|
||||||
attributes["class"] = String.Join(" ", classes);
|
attributes["class"] = String.Join(" ", classes);
|
||||||
|
|
||||||
return attributes;
|
return attributes;
|
||||||
|
Loading…
Reference in New Issue
Block a user