Files
backbone/examples/todos.html
2010-10-19 17:59:53 -04:00

39 lines
1.1 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Backbone Demo: Todo List</title>
<style>
.todo.complete .todo-content {
text-decoration: line-through;
}
</style>
<script src="../test/vendor/underscore-1.1.0.js"></script>
<script src="../test/vendor/jquery-1.4.2.js"></script>
<script src="../backbone.js"></script>
<script id="todo-template" type="x-ejs">
<input type="checkbox" <%= model.get('completed') ? 'checked' : '' %> />
<span class="todo-content"><%= model.get('content') %></span>
</script>
<script id="edit-template" type="x-ejs">
<input type="text" value="<%= model.get('content') %>" />
<input type="submit" class="update" value="Update" />
</script>
<script id="app-template" type="x-ejs">
<input class="new-task-input" type="text" placeholder="New task..." />
<input class="new-task" type="submit" value="Add" />
<ul class="task-list"></ul>
<input class="clear" type="submit" value="Clear Completed Tasks" />
</script>
<script src="todos.js"></script>
</head>
<body>
</body>
</html>