Commit 62fa615f authored by Christoph Burgdorf's avatar Christoph Burgdorf

changed model property "content" to "title"

parent 68f57e14
......@@ -22,11 +22,11 @@
<li ng:repeat="todo in todos" my:dblclick="editTodo(todo)" ng:class="(todo.done && ' done ') + (todo.editing && ' editing ')">
<div class="view">
<input class="toggle" type="checkbox" name="todo.done">
<label>{{ todo.content }}</label>
<label>{{ todo.title }}</label>
<a class="destroy" ng:click="removeTodo(todo)"></a>
</div>
<form ng:submit="finishEditing(todo)">
<input class="edit" type="text" name="todo.content" my:focus="todo.editing" my:blur="finishEditing(todo)">
<input class="edit" type="text" name="todo.title" my:focus="todo.editing" my:blur="finishEditing(todo)">
</form>
</li>
</ul>
......
......@@ -9,7 +9,7 @@ App.Controllers.TodoController = function () {
if (self.newTodo.trim().length === 0) return;
self.todos.push({
content: self.newTodo,
title: self.newTodo,
done: false,
editing: false
});
......@@ -25,7 +25,7 @@ App.Controllers.TodoController = function () {
};
self.finishEditing = function(todo) {
if (todo.content.trim().length === 0){
if (todo.title.trim().length === 0){
self.removeTodo(todo);
}
else{
......
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