src/main/scala/net/tz/lift/snippet/SnippetHelpers.scala
changeset 27 3a1eb640ff95
parent 15 995184977e9b
equal deleted inserted replaced
26:69ca7321406e 27:3a1eb640ff95
    18 import net.liftweb.http._
    18 import net.liftweb.http._
    19 import scala.xml.{NodeSeq, Text}
    19 import scala.xml.{NodeSeq, Text}
    20 
    20 
    21 trait SnippetHelpers {
    21 trait SnippetHelpers {
    22 
    22 
    23   type CssTr = (NodeSeq => NodeSeq)
       
    24 
       
    25   def mkPath(prefix: String, l: String*) =
    23   def mkPath(prefix: String, l: String*) =
    26     (prefix :: l.toList) mkString ("/", "/", "")
    24     (prefix :: l.toList) mkString ("/", "/", "")
    27 }
    25 }
    28 
       
    29 trait CssTr extends Function1[NodeSeq, NodeSeq]
       
    30 
    26 
    31 class A(href: => String) extends Function1[NodeSeq, NodeSeq] {
    27 class A(href: => String) extends Function1[NodeSeq, NodeSeq] {
    32   def apply(in: NodeSeq): NodeSeq = <a href={href}>{in}</a>
    28   def apply(in: NodeSeq): NodeSeq = <a href={href}>{in}</a>
    33 }
    29 }
    34 
    30