Permalink
Browse files

Misc fixes

  • Loading branch information...
1 parent 39c4081 commit aa74d13cc1ad04d15fef064019b24c44ae43d12b @dpp dpp committed Jun 28, 2012
@@ -845,7 +845,6 @@ final case class ToCssBindPromoter(stringSelector: Box[String], css: Box[CssSele
def #>[T](it: => T)(implicit computer: ComputeTransformRules[T]): CssSel = css match {
case Full(EnclosedSelector(a, b)) => null
(ToCssBindPromoter(stringSelector, Full(a))).#>(nsFunc(ns =>{
- println("nesting "+ns+" for "+b)
ToCssBindPromoter(stringSelector, Full(b)).#>(it)(computer)(ns)})) // (ComputeTransformRules.nodeSeqFuncTransform)
case _ =>
new CssBindImpl(stringSelector, css) {
@@ -113,7 +113,7 @@ trait StatefulSnippet extends DispatchSnippet {
if (formElem.isDefined) {
import util.Helpers._
- ("form *" #> ((kids: NodeSeq) => toMerge ++ kids))(res)
+ ("form *" #> ((kids: NodeSeq) => toMerge ++ kids)).apply(res)
} else if (isForm) {
toMerge ++ res
} else {
@@ -613,15 +613,15 @@ trait HtmlFixer {
import scala.collection.mutable.ListBuffer
val lb = new ListBuffer[JsCmd]
- val revised = ("script" #> ((ns: NodeSeq) => {
+ val revised = ("script" #> nsFunc(ns => {
ns match {
case FindScript(e) => {
lb += JE.JsRaw(ns.text).cmd
NodeSeq.Empty
}
case x => x
}
- }))(xhtml)
+ })).apply(xhtml)
S.htmlProperties.htmlWriter(Group(revised), w)
@@ -26,6 +26,7 @@ object SHtmlSpec extends Specification {
"NamedCometPerTabSpec Specification".title
val html1= <span><input id="number"></input></span>
+
val inputField1= testS("/")( ("#number" #> SHtml.number(0, println(_), 0, 100))(html1) )
val inputField2= testS("/")( ("#number" #> SHtml.number(0, println(_: Double), 0, 100, 0.1))(html1) )
val inputField3= testS("/")( ("#number" #> SHtml.number(0, println(_: Double), 0, 100, 1))(html1) )

0 comments on commit aa74d13

Please sign in to comment.