mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-01 13:20:41 +01:00
feat: show links in post queue
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
"nodebb-plugin-ntfy": "1.7.4",
|
||||
"nodebb-plugin-spam-be-gone": "2.2.2",
|
||||
"nodebb-rewards-essentials": "1.0.0",
|
||||
"nodebb-theme-harmony": "1.2.62",
|
||||
"nodebb-theme-harmony": "1.2.63",
|
||||
"nodebb-theme-lavender": "7.1.8",
|
||||
"nodebb-theme-peace": "2.2.6",
|
||||
"nodebb-theme-persona": "13.3.24",
|
||||
|
||||
@@ -38,5 +38,6 @@
|
||||
"remove-selected": "Remove Selected",
|
||||
"remove-selected-confirm": "Do you want to remove %1 selected posts?",
|
||||
"bulk-accept-success": "%1 posts accepted",
|
||||
"bulk-reject-success": "%1 posts rejected"
|
||||
"bulk-reject-success": "%1 posts rejected",
|
||||
"links-in-this-post": "Links in this post"
|
||||
}
|
||||
@@ -29,8 +29,23 @@ define('forum/post-queue', [
|
||||
});
|
||||
|
||||
$('[component="post/content"] img:not(.not-responsive)').addClass('img-fluid');
|
||||
showLinksInPosts();
|
||||
};
|
||||
|
||||
function showLinksInPosts() {
|
||||
$('.posts-list [data-id]').each((idx, el) => {
|
||||
const $el = $(el);
|
||||
const linkContainer = $el.find('[component="post-queue/link-container"]');
|
||||
const linkList = linkContainer.find('[component="post-queue/link-container/list"]');
|
||||
const linksInPost = $el.find('.post-content a');
|
||||
linksInPost.each((idx, link) => {
|
||||
const href = $(link).attr('href');
|
||||
linkList.append(`<li><a href="${href}">${href}</a></li>`);
|
||||
});
|
||||
linkContainer.toggleClass('hidden', !linksInPost.length);
|
||||
});
|
||||
}
|
||||
|
||||
function confirmReject(msg) {
|
||||
return new Promise((resolve) => {
|
||||
bootbox.confirm(msg, resolve);
|
||||
|
||||
Reference in New Issue
Block a user