forked from jashkenas/backbone
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/addyosmani/backbone
- Loading branch information
Showing
3 changed files
with
321 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,63 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Backbone.js Todos</title> | ||
<link rel="stylesheet" href="todos.css"/> | ||
</head> | ||
<body> | ||
<div id="todoapp"> | ||
<header> | ||
<h1>Todos</h1> | ||
<input id="new-todo" type="text" placeholder="What needs to be done?"> | ||
</header> | ||
|
||
<section id="main"> | ||
<input id="toggle-all" type="checkbox"> | ||
<label for="toggle-all">Mark all as complete</label> | ||
<ul id="todo-list"> | ||
</ul> | ||
</section> | ||
|
||
<footer> | ||
<a id="clear-completed">Clear completed</a> | ||
<div id="todo-count"></div> | ||
</footer> | ||
</div> | ||
<div id="instructions"> | ||
Double-click to edit a todo. | ||
</div> | ||
<div id="credits"> | ||
Created by | ||
<br /> | ||
<a href="http://jgn.me/">Jérôme Gravel-Niquet</a>. | ||
<br />Rewritten by: <a href="http://addyosmani.github.com/todomvc">TodoMVC</a>. | ||
</div> | ||
|
||
<head> | ||
<title>Backbone Demo: Todos</title> | ||
<link href="todos.css" media="all" rel="stylesheet" type="text/css"/> | ||
<script src="../../test/vendor/json2.js"></script> | ||
<script src="../../test/vendor/jquery-1.7.1.js"></script> | ||
<script src="../../test/vendor/underscore-1.3.1.js"></script> | ||
<script src="../../backbone.js"></script> | ||
<script src="../backbone-localstorage.js"></script> | ||
<script src="todos.js"></script> | ||
</head> | ||
|
||
<body> | ||
|
||
<!-- Todo App Interface --> | ||
|
||
<div id="todoapp"> | ||
|
||
<div class="title"> | ||
<h1>Todos</h1> | ||
</div> | ||
|
||
<div class="content"> | ||
|
||
<div id="create-todo"> | ||
<input id="new-todo" placeholder="What needs to be done?" type="text" /> | ||
<span class="ui-tooltip-top" style="display:none;">Press Enter to save this task</span> | ||
</div> | ||
|
||
<div id="todos"> | ||
<ul id="todo-list"></ul> | ||
</div> | ||
|
||
<div id="todo-stats"></div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
<ul id="instructions"> | ||
<li>Double-click to edit a todo.</li> | ||
<li><a href="../../docs/todos.html">View the annotated source.</a></li> | ||
</ul> | ||
|
||
<div id="credits"> | ||
Created by | ||
<br /> | ||
<a href="http://jgn.me/">Jérôme Gravel-Niquet</a> | ||
</div> | ||
|
||
<!-- Templates --> | ||
|
||
<script type="text/template" id="item-template"> | ||
<div class="todo <%= done ? 'done' : '' %>"> | ||
<div class="display"> | ||
<input class="check" type="checkbox" <%= done ? 'checked="checked"' : '' %> /> | ||
<div class="todo-text"></div> | ||
<span class="todo-destroy"></span> | ||
</div> | ||
<div class="edit"> | ||
<input class="todo-input" type="text" value="" /> | ||
<div class="view"> | ||
<input class="toggle" type="checkbox" <%= done ? 'checked="checked"' : '' %> /> | ||
<label><%= title %></label> | ||
<a class="destroy"></a> | ||
</div> | ||
</div> | ||
<input class="edit" type="text" value="<%= title %>" /> | ||
</script> | ||
|
||
<script type="text/template" id="stats-template"> | ||
<% if (total) { %> | ||
<span class="todo-count"> | ||
<span class="number"><%= remaining %></span> | ||
<span class="word"><%= remaining == 1 ? 'item' : 'items' %></span> left. | ||
</span> | ||
<% } %> | ||
<% if (done) { %> | ||
<span class="todo-clear"> | ||
<a href="#"> | ||
Clear <span class="number-done"><%= done %></span> | ||
completed <span class="word-done"><%= done == 1 ? 'item' : 'items' %></span> | ||
</a> | ||
</span> | ||
<% } %> | ||
<% if (done) { %> | ||
<a id="clear-completed">Clear <%= done %> completed <%= done == 1 ? 'item' : 'items' %></a> | ||
<% } %> | ||
<div class="todo-count"><b><%= remaining %></b> <%= remaining == 1 ? 'item' : 'items' %> left</div> | ||
</script> | ||
|
||
</body> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.