timeline/js/timeline.js
changeset 107 6b346cb90c5a
parent 106 574bb047a940
equal deleted inserted replaced
106:574bb047a940 107:6b346cb90c5a
   811             type: this.type,
   811             type: this.type,
   812             conId: this.id,
   812             conId: this.id,
   813             status: +newFavStatus,
   813             status: +newFavStatus,
   814             uid: this.timeline.user_id || undefined
   814             uid: this.timeline.user_id || undefined
   815         },
   815         },
   816         success: function(r) {
   816         success: function(data) {
   817             console.log(r);
   817             _this.isFavorite = !!(data.data && +data.data.favorite);
   818             /* DEPENDING ON THE RESULT.... */
   818             _this.timeline.$.find(".Tl-Detail-Favorite")[_this.isFavorite ? "addClass" : "removeClass"]("Tl-Detail-isFavorite");
   819             _this.isFavorite = newFavStatus;
       
   820             _this.timeline.throttledDrawGrid();
   819             _this.timeline.throttledDrawGrid();
   821         }
   820         }
   822     });
   821     });
   823     
   822     
   824 };
   823 };