Skip to content

Commit

Permalink
batman code
Browse files Browse the repository at this point in the history
  • Loading branch information
tsloughter committed Apr 25, 2012
1 parent 5bb5a13 commit 7d9ee4e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions batman/01_slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,28 @@

@@@ html
<li data-foreach-todo="Todo.all"
data-event-doubleclick="controllers.todos.edit"
data-addclass-completed="todo.isDone">
<div class="view">
<input class="toggle" type="checkbox" data-bind="todo.isDone" />
<label data-bind="todo.body"></label>
<button class="destroy" data-event-click="todo.destroy"></button>
</div>
<input data-bind-id="todo.id" class="edit"
data-bind-value="todo.body"
data-event-submit="controllers.todos.update">
data-event-doubleclick="controllers.todos.edit"
data-addclass-completed="todo.isDone">
<div class="view">
<input class="toggle"
type="checkbox" data-bind="todo.isDone" />
<label data-bind="todo.body" />
<button class="destroy"
data-event-click="todo.destroy"></button>
</div>
<input data-bind-id="todo.id" class="edit"
data-bind-value="todo.body"
data-event-submit="controllers.todos.update">
</li>

!SLIDE code
# Model #

@@@ coffeescript
class TodoMVC.Todo extends Batman.Model
@global yes # global exposes this class on the global object, so you can access `Todo` directly.
@global yes

@persist Batman.RestStorage # Batman.LocalStorage
@persist Batman.RestStorage
@encode 'body', 'isDone'

body: ''
Expand Down
2 changes: 1 addition & 1 deletion introduction/01_slide.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# Erlang for Web Development? #

!SLIDE center
# I know, I'll convert Erlang terms to HTML and functions to generate Javascript! #
# I know, I'll convert Erlang terms to HTML and have functions to generate Javascript! #

!SLIDE center
# Now you have 2 problems! #
Expand Down

0 comments on commit 7d9ee4e

Please sign in to comment.