Files
danbooru/app/views/comment_votes/create.js.erb
2013-03-02 19:21:39 -05:00

10 lines
372 B
Plaintext

<% if @comment_vote.errors.any? %>
Danbooru.error("<%= j @comment_vote.errors.full_messages.join('; ') %>");
<% 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 %>