timeline/js/timeline.js
changeset 106 574bb047a940
parent 105 fe4b70b9991d
child 107 6b346cb90c5a
--- 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();
         }