Sha256: 4bf1f01b58e01a6164a4f5e0ae09f489ef2af0146e1d300afd905b7b53a18efe
Contents?: true
Size: 833 Bytes
Versions: 18
Compression:
Stored size: 833 Bytes
Contents
(function() { var rootCommentableId = <%== "comments-for-#{commentable.commentable_type.demodulize}-#{commentable.id}".to_json %>; var $comments = $("#" + rootCommentableId); var component = $comments.data("comments"); component.unmountComponent(); var commentsHtml = '<%== j(render partial: "comments").strip %>'; $(".loading-comments").addClass("hidden"); $comments.replaceWith(commentsHtml); $comments = $("#" + rootCommentableId); // Re-create the component component = new Decidim.CommentsComponent($comments, $comments.data("decidim-comments")); component.mountComponent(); $comments.data("comments", component); // Update the comments count $(".comments-count", $comments).text(<%== t("decidim.components.comments.title", count: @comments_count).to_json %>); Decidim.addInputEmoji(); }());
Version data entries
18 entries across 18 versions & 1 rubygems