Skip to content

Instantly share code, notes, and snippets.

@matthusby
Created January 11, 2012 16:14
Show Gist options
  • Save matthusby/1595404 to your computer and use it in GitHub Desktop.
Save matthusby/1595404 to your computer and use it in GitHub Desktop.
success: function(data){
setTimeout(function(){
for (var i = 0; i < data.objects.length; i++){
var t = new Todo({
id: data.objects[i].id,
text: data.objects[i].text,
done: data.objects[i].done,
order: data.objects[i].order
});
if(typeof(Todos.get(t.id)) != "object"){
Todos.add(t);
} else {
console.log(t.id);
var r = Todos.get(t.id);
Todos.remove(r);
Todos.add(t);
}
}
}, 500);
waitForMsg(data.timestamp);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment