Skip to content

Commit

Permalink
Renamed LiftRules.includeFixedEventAttributesAsDataAttributes_? and a…
Browse files Browse the repository at this point in the history
…dded configurable attribute-name for "data-lift-removed-attributes", set in LiftRules.removedEventAttributesAttributeName
  • Loading branch information
andreak committed Jun 24, 2015
1 parent ec5ed51 commit 33c772c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/webkit/src/main/scala/net/liftweb/http/LiftMerge.scala
Expand Up @@ -203,8 +203,8 @@ private[http] trait LiftMerge {
def fixElementAndAttributes(element: Elem, attributeToFix: String, fixURL: Boolean, fixedChildren: NodeSeq) = {
val (id, fixedAttributes, eventAttributes) = fixAttrs(attributeToFix, element.attributes, fixURL)

val attributesIncludingEventsAsData = if (LiftRules.includeFixedEventAttributesAsDataAttributes_? && eventAttributes.nonEmpty) {
new UnprefixedAttribute(s"data-lift-removed-attributes", eventAttributes.map(ea => s"on${ea.eventName}").join(" "), fixedAttributes)
val attributesIncludingEventsAsData = if (LiftRules.includeRemovedEventAttributesAsDataAttributes_? && eventAttributes.nonEmpty) {
new UnprefixedAttribute(LiftRules.removedEventAttributesAttributeName, eventAttributes.map(ea => s"on${ea.eventName}").join(" "), fixedAttributes)
} else {
fixedAttributes
}
Expand Down
4 changes: 3 additions & 1 deletion web/webkit/src/main/scala/net/liftweb/http/LiftRules.scala
Expand Up @@ -597,7 +597,9 @@ class LiftRules() extends Factory with FormVendor with LazyLoggable {
* }
* </pre>
*/
@volatile var includeFixedEventAttributesAsDataAttributes_? = false
@volatile var includeRemovedEventAttributesAsDataAttributes_? = false

@volatile var removedEventAttributesAttributeName = "data-lift-removed-attributes"

/**
* The default location to send people if SiteMap access control fails. The path is
Expand Down

0 comments on commit 33c772c

Please sign in to comment.