# HG changeset patch # User veltr # Date 1381502468 -7200 # Node ID 574bb047a940873063225ab5e90adf44cf2bc3b2 # Parent fe4b70b9991d7c2232668f8f4e4509b96f42a861 bugfix diff -r fe4b70b9991d -r 574bb047a940 timeline/js/timeline.js --- a/timeline/js/timeline.js Fri Oct 11 11:57:20 2013 +0200 +++ b/timeline/js/timeline.js Fri Oct 11 16:41:08 2013 +0200 @@ -802,8 +802,8 @@ }; Tlns.Classes.Occurrence.prototype.toggleFavorite = function() { - var newFavStatus = !this.isFavorite; - + var newFavStatus = !this.isFavorite, + _this = this; $.ajax({ type: "POST", url: this.timeline.set_favorite_endpoint, @@ -815,6 +815,7 @@ }, success: function(r) { console.log(r); + /* DEPENDING ON THE RESULT.... */ _this.isFavorite = newFavStatus; _this.timeline.throttledDrawGrid(); }