FIX: Reply As New Topic from all 3 different places
This commit is contained in:
parent
589bae5c03
commit
74e93d2260
|
@ -33,7 +33,8 @@ export default Ember.Controller.extend({
|
|||
replyAsNewTopic() {
|
||||
const topicController = this.get("controllers.topic");
|
||||
const postStream = topicController.get("model.postStream");
|
||||
const post = postStream.findLoadedPost(this.get("postId"));
|
||||
const postId = this.get("postId") || postStream.findPostIdForPostNumber(1);
|
||||
const post = postStream.findLoadedPost(postId);
|
||||
topicController.send("replyAsNewTopic", post);
|
||||
this.send("close");
|
||||
},
|
||||
|
|
|
@ -92,7 +92,7 @@ export default Ember.View.extend({
|
|||
const $currentTarget = $(e.currentTarget),
|
||||
url = $currentTarget.data('share-url'),
|
||||
postNumber = $currentTarget.data('post-number'),
|
||||
postId = $currentTarget.data('post-id'),
|
||||
postId = $currentTarget.closest('article').data('post-id'),
|
||||
date = $currentTarget.children().data('time');
|
||||
showPanel($currentTarget, url, postNumber, date, postId);
|
||||
return false;
|
||||
|
|
|
@ -162,7 +162,6 @@ createWidget('post-meta-data', {
|
|||
href: attrs.shareUrl,
|
||||
'data-share-url': attrs.shareUrl,
|
||||
'data-post-number': attrs.post_number,
|
||||
'data-post-id': attrs.id,
|
||||
}
|
||||
}, dateNode(createdAt))
|
||||
));
|
||||
|
|
Loading…
Reference in New Issue