Close reply panel

This commit is contained in:
Mouse Reeve 2021-09-09 08:20:55 -07:00
parent 49f1226f3a
commit 055cced75b
2 changed files with 8 additions and 2 deletions

View file

@ -79,7 +79,13 @@ let StatusCache = new class {
modal.getElementsByClassName("modal-close")[0].click();
}
// Update buttons
// Close reply panel
let reply = form.closest(".reply-panel");
if (!!reply) {
document.querySelector("[data-controls=" + reply.id + "]").click();
}
// Update shelve buttons
}
}();

View file

@ -66,7 +66,7 @@
{% block card-bonus %}
{% if request.user.is_authenticated and not moderation_mode %}
{% with status.id|uuid as uuid %}
<section class="is-hidden" id="show_comment_{{ status.id }}">
<section class="reply-panel is-hidden" id="show_comment_{{ status.id }}">
<div class="card-footer">
<div class="card-footer-item">
{% include 'snippets/create_status/status.html' with type="reply" reply_parent=status book=None %}