forum: add "..." menu to forum posts, like comments have.
Adds the ability to copy forum post IDs, like with comments. Fixes #4768: Display DText shortlink for forum posts/topics.
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
let ForumPost = {};
|
||||
|
||||
ForumPost.initialize_all = function() {
|
||||
if ($("#c-forum-topics #a-show,#c-forum-posts #a-show").length) {
|
||||
this.initialize_edit_links();
|
||||
}
|
||||
}
|
||||
|
||||
ForumPost.initialize_edit_links = function() {
|
||||
$(document).on("click.danbooru", ".edit_forum_post_link", function(e) {
|
||||
let $form = $(this).parents("article.forum-post").find("form.edit_forum_post");
|
||||
$form.fadeToggle("fast");
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(document).on("click.danbooru", ".edit_forum_topic_link", function(e) {
|
||||
let $form = $(this).parents("article.forum-post").find("form.edit_forum_topic");
|
||||
$form.fadeToggle("fast");
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$(document).on("click.danbooru", "#c-forum-topics #a-show #new-response-link", function (e) {
|
||||
$("#topic-response").show();
|
||||
document.body.scrollIntoView(false);
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
ForumPost.initialize_all();
|
||||
});
|
||||
|
||||
export default ForumPost
|
||||
Reference in New Issue
Block a user