Fix various bugs when clicking "Show all comments"
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
$("#hidden-comments-notice-for-<%= @post.id %>").hide();
|
||||
|
||||
$("div.comments-for-post[data-post-id=<%= @post.id %>] div.list-of-comments").html("<%= j(render(:partial => 'comments/partials/show/comment', :collection => @comments))%>");
|
||||
var current_comment_section = $("div.comments-for-post[data-post-id=<%= @post.id %>] div.list-of-comments");
|
||||
current_comment_section.html("<%= j(render(:partial => 'comments/partials/show/comment', :collection => @comments))%>");
|
||||
|
||||
<% if params[:include_below_threshold] %>
|
||||
$("#threshold-comments-notice-for-<%= @post.id %>").hide();
|
||||
@@ -9,7 +10,7 @@ $("div.comments-for-post[data-post-id=<%= @post.id %>] div.list-of-comments").ht
|
||||
Danbooru.Comment.hide_threshold_comments(<%= @post.id %>);
|
||||
<% end %>
|
||||
|
||||
Danbooru.Comment.initialize_reply_links();
|
||||
Danbooru.Comment.initialize_edit_links();
|
||||
Danbooru.Comment.initialize_vote_links();
|
||||
Danbooru.Dtext.initialize_expandables($(document));
|
||||
Danbooru.Comment.initialize_reply_links(current_comment_section);
|
||||
Danbooru.Comment.initialize_edit_links(current_comment_section);
|
||||
Danbooru.Comment.initialize_vote_links(current_comment_section);
|
||||
Danbooru.Dtext.initialize_expandables(current_comment_section);
|
||||
|
||||
Reference in New Issue
Block a user