Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add prompt expression to JsCommands

  • Loading branch information...
commit 440e1be3697940bf46bcb19ec0579bbaacfcfa2f 1 parent 1b7c328
Marko Elezovic authored
View
4 contributors.md
@@ -50,7 +50,7 @@ an [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) license.
### Name: ###
+Marko Elezović
### Email: ###
-
-
+marko at element dot hr
View
4 web/webkit/src/main/scala/net/liftweb/http/js/JsCommands.scala
@@ -822,6 +822,10 @@ object JsCmds {
def toJsCmd = "alert(" + text.encJs + ");"
}
+ case class Prompt(text: String, default: String = "") extends JsExp {
+ def toJsCmd = "prompt(" + text.encJs + "," + default.encJs + ")"
+ }
+
case class Confirm(text: String, yes: JsCmd) extends JsCmd {
def toJsCmd = "if (confirm(" + text.encJs + ")) {" + yes.toJsCmd + "}"
}
Please sign in to comment.
Something went wrong with that request. Please try again.