Sha256: 2bee91b39240a3623cba761f1dee4ee689b23e0e692fefa15321f7c8491a778c
Contents?: true
Size: 962 Bytes
Versions: 8
Compression:
Stored size: 962 Bytes
Contents
$(() => { const deleteDataHtml = '<%== j(render partial: "delete", locals: { comment: @comment }).strip %>'; const rootCommentableId = <%== "comments-for-#{@comment.root_commentable.commentable_type.demodulize}-#{@comment.root_commentable.id}".to_json %>; const commentId = <%= @comment.id.to_json %>; const $comment = $(`#comment_${commentId}`); const $commentReply = $(`#comment${commentId}-reply`); const $content = $("> .comment__content", $comment); const sectionsToDelete = ["header", "footer-grid", "reply", "additionalreply"]; sectionsToDelete.forEach((section) => { $(`> .comment__${section}`, $comment).remove(); }); $commentReply.remove(); $content.replaceWith(deleteDataHtml); Rails.fire(document, "comments:loaded", { commentsIds: [commentId] }); $(".comments-count", $(`#${rootCommentableId}`)).text(<%== t("decidim.components.comments.title", count: @comment.root_commentable.comments_count).to_json %>); });
Version data entries
8 entries across 8 versions & 1 rubygems