mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
post/content component
This commit is contained in:
@@ -159,9 +159,9 @@ define('forum/topic/events', [
|
|||||||
|
|
||||||
if (!app.user.isAdmin && parseInt(data.uid, 10) !== parseInt(app.user.uid, 10)) {
|
if (!app.user.isAdmin && parseInt(data.uid, 10) !== parseInt(app.user.uid, 10)) {
|
||||||
if (isDeleted) {
|
if (isDeleted) {
|
||||||
postEl.find('.post-content').translateHtml('[[topic:post_is_deleted]]');
|
postEl.find('[component="post/content"], .post-content').translateHtml('[[topic:post_is_deleted]]');
|
||||||
} else {
|
} else {
|
||||||
postEl.find('.post-content').html(data.content);
|
postEl.find('[component="post/content"], .post-content').html(data.content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,14 +225,14 @@ define('forum/topic/posts', [
|
|||||||
utils.addCommasToNumbers(element.find('.formatted-number'));
|
utils.addCommasToNumbers(element.find('.formatted-number'));
|
||||||
utils.makeNumbersHumanReadable(element.find('.human-readable-number'));
|
utils.makeNumbersHumanReadable(element.find('.human-readable-number'));
|
||||||
element.find('.timeago').timeago();
|
element.find('.timeago').timeago();
|
||||||
element.find('.post-content img:not(.emoji)').addClass('img-responsive').each(function() {
|
element.find('[component="post/content"] img:not(.emoji), .post-content img:not(.emoji)').addClass('img-responsive').each(function() {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
if (!$this.parent().is('a')) {
|
if (!$this.parent().is('a')) {
|
||||||
$this.wrap('<a href="' + $this.attr('src') + '" target="_blank">');
|
$this.wrap('<a href="' + $this.attr('src') + '" target="_blank">');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
postTools.updatePostCount();
|
postTools.updatePostCount();
|
||||||
addBlockquoteEllipses(element.find('.post-content > blockquote'));
|
addBlockquoteEllipses(element.find('[component="post/content"] > blockquote, .post-content > blockquote'));
|
||||||
hidePostToolsForDeletedPosts(element);
|
hidePostToolsForDeletedPosts(element);
|
||||||
showBottomPostBar();
|
showBottomPostBar();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user