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

changed model property "content" to "title"

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