FIX: Reply as new topic was broken

This commit is contained in:
Robin Ward 2014-05-07 23:28:14 -04:00
parent e6418cd582
commit fbda9cac69
2 changed files with 9 additions and 2 deletions

View file

@ -64,9 +64,13 @@ Discourse.PostGutterComponent = Em.Component.extend({
}.observes('expanded'),
click: function(e) {
if ($(e.target).hasClass('toggle-more')) {
var $target = $(e.target);
if ($target.hasClass('toggle-more')) {
this.toggleProperty('expanded');
return false;
} else if ($target.hasClass('reply-new')) {
this.sendAction('newTopicAction', this.get('post'));
return false;
}
return true;
}

View file

@ -92,7 +92,10 @@
{{view Discourse.TopicMapContainerView post=this topic=controller.model}}
</div>
{{post-gutter links=internalLinks canReplyAsNewTopic=topic.details.can_reply_as_new_topic}}
{{post-gutter post=this
links=internalLinks
canReplyAsNewTopic=topic.details.can_reply_as_new_topic
newTopicAction="replyAsNewTopic"}}
</div>
</article>