mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 06:15:48 +08:00
FIX: decorateCooked
was not being applied to embedded posts
This commit is contained in:
parent
81a699e2b0
commit
b2a7411620
|
@ -11,6 +11,6 @@ export function decorateCooked(container, cb) {
|
|||
decorate(postView, 'postViewInserted', cb);
|
||||
decorate(postView, 'postViewUpdated', cb);
|
||||
decorate(container.lookupFactory('view:composer'), 'previewRefreshed', cb);
|
||||
decorate(container.lookupFactory('view:embedded-post'), 'previewRefreshed', cb);
|
||||
decorate(container.lookupFactory('view:embedded-post'), 'didInsertElement', cb);
|
||||
decorate(container.lookupFactory('view:user-stream'), 'didInsertElement', cb);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,5 @@
|
|||
<div class='cooked'>
|
||||
{{{unbound cooked}}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -1,9 +1,9 @@
|
|||
export default Discourse.GroupedView.extend({
|
||||
templateName: 'embedded_post',
|
||||
templateName: 'embedded-post',
|
||||
classNames: ['reply'],
|
||||
|
||||
_startTracking: function() {
|
||||
var post = this.get('content');
|
||||
const post = this.get('content');
|
||||
Discourse.ScreenTrack.current().track(this.get('elementId'), post.get('post_number'));
|
||||
}.on('didInsertElement'),
|
||||
|
||||
|
|
|
@ -185,20 +185,19 @@ const PostView = Discourse.GroupedView.extend(Ember.Evented, {
|
|||
actions: {
|
||||
// Toggle the replies this post is a reply to
|
||||
toggleReplyHistory(post) {
|
||||
|
||||
const replyHistory = post.get('replyHistory'),
|
||||
topicController = this.get('controller'),
|
||||
origScrollTop = $(window).scrollTop(),
|
||||
replyPostNumber = this.get('post.reply_to_post_number'),
|
||||
postNumber = this.get('post.post_number'),
|
||||
self = this;
|
||||
topicController = this.get('controller'),
|
||||
origScrollTop = $(window).scrollTop(),
|
||||
replyPostNumber = this.get('post.reply_to_post_number'),
|
||||
postNumber = this.get('post.post_number'),
|
||||
self = this;
|
||||
|
||||
if (Discourse.Mobile.mobileView) {
|
||||
Discourse.URL.routeTo(this.get('post.topic').urlForPostNumber(replyPostNumber));
|
||||
return;
|
||||
}
|
||||
|
||||
const stream = topicController.get('postStream');
|
||||
const stream = topicController.get('model.postStream');
|
||||
const offsetFromTop = this.$().position().top - $(window).scrollTop();
|
||||
|
||||
if(Discourse.SiteSettings.experimental_reply_expansion) {
|
||||
|
@ -223,7 +222,7 @@ const PostView = Discourse.GroupedView.extend(Ember.Evented, {
|
|||
} else {
|
||||
post.set('loadingReplyHistory', true);
|
||||
|
||||
topicController.get('postStream').findReplyHistory(post).then(function () {
|
||||
stream.findReplyHistory(post).then(function () {
|
||||
post.set('loadingReplyHistory', false);
|
||||
|
||||
Em.run.next(function() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user