Sha256: ab6c311f84d12377b99cd2289302ba15857bb8d56b79eb527741279a9a596ea7
Contents?: true
Size: 847 Bytes
Versions: 26
Compression:
Stored size: 847 Bytes
Contents
$(() => { var rootCommentableId = <%== "comments-for-#{@comment.commentable.commentable_type.demodulize}-#{@comment.commentable.id}".to_json %>; var $comments = $("#" + rootCommentableId); var config = $comments.data("decidim-comments"); component = new Decidim.CommentsComponent($comments, config); component.unmountComponent(); var commentHtml = '<%== j(render partial: "edited_comment", locals: { comment: @comment }).strip %>'; var commentId = <%= @comment.id.to_json %>; var $comment = $("#comment_<%= @comment.id %>"); $comment.replaceWith(commentHtml); $comments = $("#" + rootCommentableId); $comments.foundation(); // Re-create the component component = new Decidim.CommentsComponent($comments, $comments.data("decidim-comments")); component.mountComponent(); $comments.data("comments", component); });
Version data entries
26 entries across 26 versions & 1 rubygems