Skip to content

Commit

Permalink
issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jxs committed May 17, 2012
1 parent 507b649 commit a645ddb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions script/todolist.js
Expand Up @@ -54,7 +54,6 @@ window.onload =function() {
//view observers on the model
_.bindAll(this, 'render', 'close', 'clear');
this.model.on('destroy', this.clear);
this.model.on('change:done', this.updateview);
},
render: function() {
var template= _.template($('#item-template').html());
Expand All @@ -75,9 +74,6 @@ window.onload =function() {
this.remove();
this.unbind();
},
updateview:function(){
App.checkcompleted();
}
})
var Appview = Backbone.View.extend({
el:$("#todo-app"),
Expand All @@ -92,6 +88,8 @@ window.onload =function() {
Todolist.on('reset', this.addAll);
Todolist.on('add',this.addOne);
Todolist.on('add',this.checkcompleted);
Todolist.on('remove',this.checkcompleted);
Todolist.on('change:done', this.checkcompleted);
Todolist.fetch();
},
createOnEnter:function(e){
Expand Down

0 comments on commit a645ddb

Please sign in to comment.