added function to archive button
This commit is contained in:
parent
6e4fbb75ec
commit
bc7ae07530
@ -114,12 +114,18 @@
|
|||||||
|
|
||||||
$(document).on("click", ".post_options", function(event)
|
$(document).on("click", ".post_options", function(event)
|
||||||
{
|
{
|
||||||
let post_title = $(this).parent(".post").children(".post_info").children("div").children(".post_author").html() + " - " + $(this).parent(".post").children(".post_info").children("div").children(".post_name").html();
|
let post_author = $(this).parent(".post").children(".post_info").children("div").children(".post_author").html();
|
||||||
|
let post_title = post_author + " - " + $(this).parent(".post").children(".post_info").children("div").children(".post_name").html();
|
||||||
|
|
||||||
if ($("#moderation_post_title").html() !== post_title)
|
if ($("#moderation_post_title").html() !== post_title)
|
||||||
{
|
{
|
||||||
$("#moderation_popup").css("display", "flex");
|
$("#moderation_popup").css("display", "flex");
|
||||||
$("#moderation_post_title").html(post_title);
|
$("#moderation_post_title").html(post_title);
|
||||||
|
|
||||||
|
let post_id_buffer = $(this).parent(".post").children(".post_image").children("img").attr("src").split("/");
|
||||||
|
let post_id = post_id_buffer[post_id_buffer.length - 1];
|
||||||
|
|
||||||
|
$("#archive_btn").attr("onclick", "archive_post(\"" + post_id + "\", \"" + post_author + "\")");
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
$("#moderation_popup").css("display", "none");
|
$("#moderation_popup").css("display", "none");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user