Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
be0f6695
Commit
be0f6695
authored
Aug 10, 2016
by
TasteBot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update the build files for gh-pages [ci skip]
parent
8c4053d8
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
906 additions
and
904 deletions
+906
-904
examples/binding-scala/build.sbt
examples/binding-scala/build.sbt
+2
-1
examples/binding-scala/index.html
examples/binding-scala/index.html
+2
-1
examples/binding-scala/js/js-opt.js
examples/binding-scala/js/js-opt.js
+895
-895
examples/binding-scala/js/js-opt.js.map
examples/binding-scala/js/js-opt.js.map
+3
-3
examples/binding-scala/js/src/main/scala/com/thoughtworks/todo/Main.scala
...-scala/js/src/main/scala/com/thoughtworks/todo/Main.scala
+4
-4
No files found.
examples/binding-scala/build.sbt
View file @
be0f6695
...
...
@@ -23,7 +23,8 @@ indexHtml := {
<
body
>
<
script
type
=
"text/javascript"
src
=
"node_modules/todomvc-common/base.js"
></
script
>
<
script
type
=
"text/javascript"
src
={
linkedJs
.
file
.
relativeTo
(
baseDirectory
.
value
).
get
.
toString
}></
script
>
<
script
type
=
"text/javascript"
>
com
.
thoughtworks
.
todo
.
Main
().
main
()
</
script
>
<
div
id
=
"application-container"
></
div
>
<
script
type
=
"text/javascript"
>
com
.
thoughtworks
.
todo
.
Main
().
main
(
document
.
getElementById
(
'application
-
container
'))
</
script
>
</
body
>
</
html
>
val
outputFile
=
baseDirectory
.
value
/
"index.html"
...
...
examples/binding-scala/index.html
View file @
be0f6695
...
...
@@ -9,6 +9,7 @@
<body>
<script
type=
"text/javascript"
src=
"node_modules/todomvc-common/base.js"
></script>
<script
type=
"text/javascript"
src=
"js/js-opt.js"
></script>
<script
type=
"text/javascript"
>
com
.
thoughtworks
.
todo
.
Main
().
main
()
</script>
<div
id=
"application-container"
></div>
<script
type=
"text/javascript"
>
com
.
thoughtworks
.
todo
.
Main
().
main
(
document
.
getElementById
(
'
application-container
'
))
</script>
</body>
</html>
examples/binding-scala/js/js-opt.js
View file @
be0f6695
This diff is collapsed.
Click to expand it.
examples/binding-scala/js/js-opt.js.map
View file @
be0f6695
This diff is collapsed.
Click to expand it.
examples/binding-scala/js/src/main/scala/com/thoughtworks/todo/Main.scala
View file @
be0f6695
...
...
@@ -3,7 +3,7 @@ package com.thoughtworks.todo
import
com.thoughtworks.binding.
{
Binding
,
dom
}
import
com.thoughtworks.binding.Binding.
{
BindingSeq
,
Constants
,
Var
,
Vars
}
import
scala.scalajs.js.annotation.JSExport
import
org.scalajs.dom.
{
document
,
Event
,
KeyboardEvent
,
window
}
import
org.scalajs.dom.
{
Event
,
KeyboardEvent
,
window
}
import
org.scalajs.dom.ext.
{
KeyCode
,
LocalStorage
}
import
org.scalajs.dom.raw.
{
HTMLInputElement
,
Node
}
import
upickle.default.
{
read
,
write
}
...
...
@@ -129,7 +129,7 @@ import upickle.default.{read, write}
<
ul
class
=
"filters"
>{
for
{
todoList
<-
Constants
(
todoLists
:
_
*
)
}
yield
{
<
li
>
<
a
href
={
todoList
.
hash
}
class
={
if
(
todoList
==
currentTodoList
.
bind
)
"selected"
else
""
}>{
todoList
.
text
}</
a
>
<
a
href
={
todoList
.
hash
}
class
={
if
(
todoList
==
currentTodoList
.
bind
)
"selected"
else
""
}>{
todoList
.
text
}</
a
>
</
li
>
}
}</
ul
>
...
...
@@ -140,7 +140,7 @@ import upickle.default.{read, write}
</
footer
>
}
@dom
def
todoapp
:
Binding
[
BindingSeq
[
Node
]]
=
{
@
JSExport
@
dom
def
todoapp
:
Binding
[
BindingSeq
[
Node
]]
=
{
<
section
class
=
"todoapp"
>{
header
.
bind
}{
mainSection
.
bind
}{
footer
.
bind
}</
section
>
<
footer
class
=
"info"
>
<
p
>
Double
-
click
to
edit
a
todo
</
p
>
...
...
@@ -149,6 +149,6 @@ import upickle.default.{read, write}
</
footer
>
}
@JSExport
def
main
(
)
=
dom
.
render
(
document
.
body
,
todoapp
)
@JSExport
def
main
(
container
:
Node
)
=
dom
.
render
(
container
,
todoapp
)
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment