Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

Commit

Permalink
Upgrade demos to 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Starzu committed Jul 11, 2016
1 parent d745c2a commit b6026ba
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rest-spray-io/project/Dependencies.scala
Expand Up @@ -2,7 +2,7 @@ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import sbt._

object Dependencies extends Build {
val udashVersion = "0.3.0-SNAPSHOT"
val udashVersion = "0.3.0-rc.2"
val udashJQueryVersion = "1.0.0"

val logbackVersion = "1.1.3"
Expand Down
1 change: 1 addition & 0 deletions test.sh
Expand Up @@ -10,6 +10,7 @@ for subproject in `ls */build.sbt`; do
echo -e "Test \e[32msucceed\e[39m!"
else
echo -e "Test \e[31mfailed\e[39m!"
cat compilation.log
((ERRORS++))
fi
cd ..
Expand Down
Expand Up @@ -10,7 +10,7 @@ import scalatags.JsDom.all._
object HeaderComponent {
def apply(name: Property[String], addCallback: (Property[String]) => Any): JsDom.TypedTag[html.Element] =
header(cls := "header")(
TextInput(name)(
TextInput.debounced(name)(
cls := "new-todo",
placeholder := "What needs to be done?",
autofocus := true,
Expand Down
Expand Up @@ -40,7 +40,7 @@ object TodoElementComponent {
onclick :+= ((ev: Event) => { deleteItem(); true })
)
),
TextInput(item.subProp(_.editName))(
TextInput.debounced(item.subProp(_.editName))(
cls := "edit",
onkeydown :+= ((ev: KeyboardEvent) => {
if (ev.keyCode == KeyCode.Enter) {
Expand Down
Expand Up @@ -3,7 +3,7 @@ package io.udash.todo.views.todo
import io.udash._
import io.udash.todo._
import io.udash.todo.storage.RemoteTodoStorage
import io.udash.utils.Logger
import io.udash.utils.StrictLogging
import io.udash.wrappers.jquery._
import org.scalajs.dom.Element

Expand All @@ -19,7 +19,7 @@ object TodoViewPresenter extends ViewPresenter[TodoState] {
}
}

class TodoPresenter(model: ModelProperty[TodoViewModel]) extends Presenter[TodoState] {
class TodoPresenter(model: ModelProperty[TodoViewModel]) extends Presenter[TodoState] with StrictLogging {
import Context._
import io.udash.todo.rpc.model.{Todo => STodo}

Expand All @@ -44,7 +44,7 @@ class TodoPresenter(model: ModelProperty[TodoViewModel]) extends Presenter[TodoS
RemoteTodoStorage.store(v.map(todo => STodo(todo.name, todo.completed)))
)
case Failure(ex) =>
Logger.error("Can not load todos from server!")
logger.error("Can not load todos from server!")
}

RemoteTodoStorage.listen((todos: Seq[STodo]) => {
Expand Down
2 changes: 1 addition & 1 deletion todo-rpc/project/Dependencies.scala
Expand Up @@ -2,7 +2,7 @@ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import sbt._

object Dependencies extends Build {
val udashVersion = "0.2.0"
val udashVersion = "0.3.0-rc.2"
val udashJQueryVersion = "1.0.0"
val uPickleVersion = "0.4.0"

Expand Down
2 changes: 1 addition & 1 deletion todo/project/Dependencies.scala
Expand Up @@ -2,7 +2,7 @@ import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import sbt._

object Dependencies extends Build {
val udashCoreVersion = "0.2.0"
val udashCoreVersion = "0.3.0-rc.2"
val udashJQueryVersion = "1.0.0"
val uPickleVersion = "0.4.0"

Expand Down
Expand Up @@ -10,7 +10,7 @@ import scalatags.JsDom.all._
object HeaderComponent {
def apply(name: Property[String], addCallback: (Property[String]) => Any): JsDom.TypedTag[html.Element] =
header(cls := "header")(
TextInput(name)(
TextInput.debounced(name)(
cls := "new-todo",
placeholder := "What needs to be done?",
autofocus := true,
Expand Down
Expand Up @@ -40,7 +40,7 @@ object TodoElementComponent {
onclick :+= ((ev: Event) => { deleteItem(); true })
)
),
TextInput(item.subProp(_.editName))(
TextInput.debounced(item.subProp(_.editName))(
cls := "edit",
onkeydown :+= ((ev: KeyboardEvent) => {
if (ev.keyCode == KeyCode.Enter) {
Expand Down

0 comments on commit b6026ba

Please sign in to comment.