mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-08 05:30:40 +01:00
Merge branch 'master' into develop
This commit is contained in:
@@ -109,7 +109,7 @@
|
||||
"nodebb-rewards-essentials": "1.0.2",
|
||||
"nodebb-theme-harmony": "2.2.43",
|
||||
"nodebb-theme-lavender": "7.1.21",
|
||||
"nodebb-theme-peace": "2.2.55",
|
||||
"nodebb-theme-peace": "2.2.56",
|
||||
"nodebb-theme-persona": "14.2.21",
|
||||
"nodebb-widget-essentials": "7.0.42",
|
||||
"nodemailer": "8.0.1",
|
||||
|
||||
@@ -270,15 +270,16 @@ define('forum/topic', [
|
||||
hooks.registerPage('action:posts.edited', addCopyCodeButton);
|
||||
}
|
||||
|
||||
function addParentHandler() {
|
||||
function gotoPost(event, toPid) {
|
||||
const toPost = $('[component="topic"]>[component="post"][data-pid="' + toPid + '"]');
|
||||
if (toPost.length) {
|
||||
event.preventDefault();
|
||||
navigator.scrollToIndex(toPost.attr('data-index'), true);
|
||||
return false;
|
||||
}
|
||||
function gotoPost(event, toPid) {
|
||||
const toPost = $(`[component="topic"]>[component="post"][data-pid="${toPid}"]`);
|
||||
if (toPost.length) {
|
||||
event.preventDefault();
|
||||
navigator.scrollToIndex(toPost.attr('data-index'), true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function addParentHandler() {
|
||||
components.get('topic').on('click', '[component="post/parent"]', function (e) {
|
||||
const parentEl = $(this);
|
||||
const contentEl = parentEl.find('[component="post/parent/content"]');
|
||||
@@ -308,6 +309,10 @@ define('forum/topic', [
|
||||
replies.init(btn);
|
||||
});
|
||||
});
|
||||
|
||||
$('[component="topic"]').on('click', '[component="post/replies"] .post-header a.timeago', function (e) {
|
||||
return gotoPost(e, $(this).parents('[data-pid]').attr('data-pid'));
|
||||
});
|
||||
}
|
||||
|
||||
function addPostsPreviewHandler() {
|
||||
|
||||
Reference in New Issue
Block a user