fixes #477
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
<% if @comment_vote.errors.any? %>
|
||||
Danbooru.error("<%= j @comment_vote.errors.full_messages.join('; ') %>");
|
||||
<% elsif @comment_vote.is_negative? %>
|
||||
$(".comment[data-comment-id=<%= @comment.id %>]").remove();
|
||||
<% else %>
|
||||
<% if @comment_vote.is_negative? %>
|
||||
$(".comment[data-comment-id=<%= @comment.id %>]").remove();
|
||||
<% end %>
|
||||
$("#comment-vote-up-link-for-<%= @comment.id %>").remove();
|
||||
$("#comment-vote-down-link-for-<%= @comment.id %>").remove();
|
||||
<% end %>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<li><%= link_to "Delete", comment_path(comment.id), :confirm => "Do you really want to delete this comment?", :method => :delete, :remote => true %></li>
|
||||
<li><%= link_to "Edit", edit_comment_path(comment.id) %></li>
|
||||
<% end %>
|
||||
<li><%= link_to "Vote up", comment_votes_path(:comment_id => comment.id, :score => "up"), :method => :post, :remote => true %></li>
|
||||
<li><%= link_to "Vote down", comment_votes_path(:comment_id => comment.id, :score => "down"), :method => :post, :remote => true %></li>
|
||||
<li id="comment-vote-up-link-for-<%= comment.id %>"><%= link_to "Vote up", comment_votes_path(:comment_id => comment.id, :score => "up"), :method => :post, :remote => true %></li>
|
||||
<li id="comment-vote-down-link-for-<%= comment.id %>"><%= link_to "Vote down", comment_votes_path(:comment_id => comment.id, :score => "down"), :method => :post, :remote => true %></li>
|
||||
<% end %>
|
||||
</menu>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user