moved index.html

This commit is contained in:
2016-01-29 11:00:16 +08:00
parent 8b1eafaade
commit 969b116a48
21 changed files with 0 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
define(
['backbone'
],
function(
Backbone
) {
var TaskModel = Backbone.Model.extend({
defaults: {
parentId: 0,
content: '',
isCompleted: 0,
priority: 0
},
toggelCompletedStatus:function(isCompleted){
var prev_isCompleted = isCompleted,
self = this;
this.save({'isCompleted':isCompleted},
{
success:function(){},
error:function(){
//REVERT BACK ON ERROR
self.set({'isCompleted':prev_isCompleted});
}
})
}
});
return TaskModel;
});