Commit e82fa1a6 authored by DC3(Dee Cheung)'s avatar DC3(Dee Cheung)

fix clearCompleted method variable name conflict.

parent acf5b140
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
TodoApp.prototype.events = { TodoApp.prototype.events = {
'keyup #new-todo': 'new', 'keyup #new-todo': 'new',
'click #toggle-all': 'toggleAll', 'click #toggle-all': 'toggleAll',
'click #clear-completed': 'clearCompleted' 'click #clear-completed': 'clearCompletedItem'
}; };
function TodoApp() { function TodoApp() {
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
}); });
}; };
TodoApp.prototype.clearCompleted = function() { TodoApp.prototype.clearCompletedItem = function() {
return Todo.destroyCompleted(); return Todo.destroyCompleted();
}; };
......
...@@ -14,7 +14,7 @@ class TodoApp extends Spine.Controller ...@@ -14,7 +14,7 @@ class TodoApp extends Spine.Controller
events: events:
'keyup #new-todo': 'new' 'keyup #new-todo': 'new'
'click #toggle-all': 'toggleAll' 'click #toggle-all': 'toggleAll'
'click #clear-completed': 'clearCompleted' 'click #clear-completed': 'clearCompletedItem'
constructor: -> constructor: ->
super super
...@@ -65,7 +65,7 @@ class TodoApp extends Spine.Controller ...@@ -65,7 +65,7 @@ class TodoApp extends Spine.Controller
todo.updateAttribute 'completed', e.target.checked todo.updateAttribute 'completed', e.target.checked
todo.trigger 'update', todo todo.trigger 'update', todo
clearCompleted: -> clearCompletedItem: ->
Todo.destroyCompleted() Todo.destroyCompleted()
toggleElems: => toggleElems: =>
......
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