Show the entire history of replies above a post when you expend "in reply to"

This commit is contained in:
Robin Ward
2013-08-06 17:42:36 -04:00
parent c74da0d262
commit 1c3804934e
19 changed files with 158 additions and 130 deletions
@@ -253,10 +253,29 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
},
// Toggle the star on the topic
toggleStar: function(e) {
toggleStar: function() {
this.get('content').toggleStar();
},
/**
Toggle the replies this post is a reply to
@method showReplyHistory
**/
toggleReplyHistory: function(post) {
var replyHistory = post.get('replyHistory'),
topicController = this;
if (replyHistory.length > 0) {
replyHistory.clear();
} else {
post.set('loadingReplyHistory', true);
topicController.get('postStream').findReplyHistory(post).then(function () {
post.set('loadingReplyHistory', false);
});
}
},
/**
Clears the pin from a topic for the currently logged in user