| 1 |
<!DOCTYPE html> |
| 2 |
<html lang="en"> |
| 3 |
|
| 4 |
<head> |
| 5 |
<meta charset="utf-8"> |
| 6 |
<title>Backbone.js Todos</title> |
| 7 |
<link rel="stylesheet" href="todos.css"/> |
| 8 |
</head> |
| 9 |
|
| 10 |
<body> |
| 11 |
|
| 12 |
<div id="todoapp"> |
| 13 |
|
| 14 |
<header> |
| 15 |
<h1>Todos</h1> |
| 16 |
<input id="new-todo" type="text" placeholder="What needs to be done?"> |
| 17 |
</header> |
| 18 |
|
| 19 |
<section id="main"> |
| 20 |
<input id="toggle-all" type="checkbox"> |
| 21 |
<label for="toggle-all">Mark all as complete</label> |
| 22 |
<ul id="todo-list"></ul> |
| 23 |
</section> |
| 24 |
|
| 25 |
<footer> |
| 26 |
<a id="clear-completed">Clear completed</a> |
| 27 |
<div id="todo-count"></div> |
| 28 |
</footer> |
| 29 |
|
| 30 |
</div> |
| 31 |
|
| 32 |
<div id="instructions"> |
| 33 |
Double-click to edit a todo. |
| 34 |
</div> |
| 35 |
|
| 36 |
<div id="credits"> |
| 37 |
Created by |
| 38 |
<br /> |
| 39 |
<a href="http://jgn.me/">Jérôme Gravel-Niquet</a>. |
| 40 |
<br />Rewritten by: <a href="https://github.com/tastejs/todomvc">TodoMVC</a>. |
| 41 |
</div> |
| 42 |
|
| •43 |
<script src="/usr/share/javascript/json/json2.js"></script> |
| 44 |
<script src="/usr/share/javascript/jquery/jquery.js"></script> |
| 45 |
<script src="/usr/share/javascript/underscore/underscore.js"></script> |
| 46 |
<script src="/usr/share/javascript/backbone/backbone.js"></script> |
| 47 |
<script src="../backbone.localStorage.js"></script> |
| 48 |
<script src="todos.js"></script> |
| 49 |
|
| 50 |
<!-- Templates --> |
| 51 |
|
| 52 |
<script type="text/template" id="item-template"> |
| 53 |
<div class="view"> |
| 54 |
<input class="toggle" type="checkbox" <%= done ? 'checked="checked"' : '' %> /> |
| 55 |
<label><%- title %></label> |
| 56 |
<a class="destroy"></a> |
| 57 |
</div> |
| 58 |
<input class="edit" type="text" value="<%- title %>" /> |
| 59 |
</script> |
| 60 |
|
| 61 |
<script type="text/template" id="stats-template"> |
| 62 |
<% if (done) { %> |
| 63 |
<a id="clear-completed">Clear <%= done %> completed <%= done == 1 ? 'item' : 'items' %></a> |
| 64 |
<% } %> |
| 65 |
<div class="todo-count"><b><%= remaining %></b> <%= remaining == 1 ? 'item' : 'items' %> left</div> |
| 66 |
</script> |
| 67 |
|
| 68 |
</body> |
| 69 |
</html> |