Commit ff26fa0b authored by TasteBot's avatar TasteBot

update the build files for gh-pages [ci skip]

parent 063462dc
......@@ -58,14 +58,14 @@ https://github.com/documentcloud/backbone/blob/master/examples/todos/index.html
<input id="new-todo" placeholder="What needs to be done?" autofocus>
</div>
</header>
<section id="main">
<input class="check mark-all-done" id="toggle-all" type="checkbox">
<label for="toggle-all">Mark all as complete</label>
<ul id="todo-list"></ul>
</section>
<footer id="footer">
<div id="todo-stats"></div>
</footer>
<section id="main">
<input class="check mark-all-done" id="toggle-all" type="checkbox">
<label for="toggle-all">Mark all as complete</label>
<ul id="todo-list"></ul>
</section>
<footer id="footer">
<div id="todo-stats"></div>
</footer>
</section>
<footer id="info">
<p>Double-click to edit a todo</p>
......@@ -77,14 +77,12 @@ https://github.com/documentcloud/backbone/blob/master/examples/todos/index.html
<!-- Templates -->
<script type="text/template" id="item-template">
<div class="todo <%= completed ? 'done' : '' %>">
<div class="view display">
<input class="toggle check" type="checkbox" <%= completed ? 'checked' : '' %>>
<label class="todo-content"><%= title %></label>
<button class="destroy"></button>
</div>
<input class="edit todo-input" value="<%= title %>">
<div class="view display">
<input class="toggle check" type="checkbox" <%= completed ? 'checked' : '' %>>
<label class="todo-content"><%= title %></label>
<button class="destroy"></button>
</div>
<input class="edit todo-input" value="<%= title %>">
</script>
<script type="text/template" id="stats-template">
......
......@@ -138,7 +138,7 @@ var TodoView = (function (_super) {
}
// Re-render the contents of the todo item.
TodoView.prototype.render = function () {
this.$el.html(this.template(this.model.toJSON()));
this.$el.html(this.template(this.model.toJSON())).toggleClass('completed', this.model.get('completed'));
this.input = this.$('.todo-input');
return this;
};
......
......@@ -207,7 +207,10 @@ class TodoView extends Backbone.View {
// Re-render the contents of the todo item.
render() {
this.$el.html(this.template(this.model.toJSON()));
this.$el
.html(this.template(this.model.toJSON()))
.toggleClass('completed', this.model.get('completed'));
this.input = this.$('.todo-input');
return this;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment