Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Closes #722. Allow mutation of ProtoUser instances. CLoses #736. Can …

…append attributes via CSS Selector Transforms. CLoses #735. Add convenience methods to make templating easier. Closes #720. Add a JavaScript accumulator

Conflicts:

	framework/lift-base/lift-webkit/src/main/scala/net/liftweb/http/LiftSession.scala
  • Loading branch information...
commit d48407646f46ee1b8e74227a2381914a3147ac58 1 parent f5773e1
@dpp dpp authored
View
6 lift-archetype-basic/src/main/resources/archetype-resources/src/main/scala/snippet/HelloWorld.scala
@@ -11,13 +11,13 @@ import Helpers._
class HelloWorld {
lazy val date: Box[Date] = DependencyFactory.inject[Date] // inject the date
- def howdy(in: NodeSeq): NodeSeq =
- Helpers.bind("b", in, "time" -> date.map(d => Text(d.toString)))
+ // bind the date into the element with id "time"
+ def howdy = "#time *" #> date.map(_.toString)
/*
lazy val date: Date = DependencyFactory.time.vend // create the date via factory
- def howdy(in: NodeSeq): NodeSeq = Helpers.bind("b", in, "time" -> date.toString)
+ def howdy = "#time *" #> date.toString
*/
}
View
14 lift-archetype-basic/src/main/resources/archetype-resources/src/main/webapp/index.html
@@ -1,9 +1,9 @@
-<lift:surround with="default" at="content">
+<div class="lift:surround?with=default;at=content">
<h2>Welcome to your project!</h2>
- <p>
- <lift:helloWorld.howdy>
- <span>Welcome to $artifactId at <b:time/></span>
- </lift:helloWorld.howdy>
- </p>
-</lift:surround>
+ <p>
+ <div class="lift:helloWorld.howdy">
+ Welcome to $artifactId at <span id="time">The current time</span>
+ </div>
+ </p>
+</div>
View
4 lift-archetype-basic/src/main/resources/archetype-resources/src/main/webapp/static/index.html
@@ -1,5 +1,5 @@
-<lift:surround with="default" at="content">
+<div class="lift:surround?with=default;at=content">
Static content... everything you put in the /static
directory will be served without additions to SiteMap
-</lift:surround>
+</div>
View
12 lift-archetype-basic/src/main/resources/archetype-resources/src/main/webapp/templates-hidden/default.html
@@ -5,8 +5,8 @@
<meta name="keywords" content="" />
<title>$groupId:$artifactId:$version</title>
- <lift:CSS.blueprint />
- <lift:CSS.fancyType />
+ <style class="lift:CSS.blueprint" />
+ <style class="lift:CSS.fancyType" />
<script id="jquery" src="/classpath/jquery.js" type="text/javascript"/>
<script id="json" src="/classpath/json.js" type="text/javascript"/>
<style type="text/css">
@@ -74,15 +74,17 @@ <h1 class="alt">$artifactId<img alt="" id="ajax-loader" style="display:none; mar
<div class="column span-6 colborder sidebar">
<hr class="space" />
- <lift:Menu.builder />
+ <span class="lift:Menu.builder" />
<div>
- <lift:Msgs showAll="true"/>
+ <span class="lift:Msgs?showAll=true"/>
<hr class="space" />
</div>
</div>
<div class="column span-17 last">
- <lift:bind name="content" />
+ <div id="content" >
+ <!-- The HTML content will go here -->
+ </div>
</div>
<hr />
View
2  lift-archetype-basic/src/main/resources/archetype-resources/src/test/scala/snippet/HelloWorldTest.scala
@@ -34,7 +34,7 @@ object HelloWorldTestSpecs extends Specification {
val hello = new HelloWorld
Thread.sleep(1000) // make sure the time changes
- val str = hello.howdy(<span>Hello at <b:time/></span>).toString
+ val str = hello.howdy(<span>Hello at <span id="time">Foo</span></span>).toString
str.indexOf(stableTime.toString) must be >= 0
str.indexOf("Hello at") must be >= 0
Please sign in to comment.
Something went wrong with that request. Please try again.