comments: show "undo vote" link by default on voted comments (fix #4143).

This commit is contained in:
evazion
2019-08-20 17:40:37 -05:00
parent 6e708dec18
commit 2cf929ad6e
6 changed files with 49 additions and 27 deletions

View File

@@ -1,7 +1,2 @@
<% if @comment_vote.is_negative? %>
$(".comment[data-comment-id=<%= @comment.id %>]").remove();
<% end %>
$("#comment-vote-up-link-for-<%= @comment.id %>").hide();
$("#comment-vote-down-link-for-<%= @comment.id %>").hide();
$("#comment-unvote-link-for-<%= @comment.id %>").show();
Danbooru.Utility.notice("Vote saved");
$(".comment[data-id=<%= @comment.id %>]").attr("data-is-voted", "true");

View File

@@ -1,3 +1,2 @@
$("#comment-vote-up-link-for-<%= @comment.id %>").show();
$("#comment-vote-down-link-for-<%= @comment.id %>").show();
$("#comment-unvote-link-for-<%= @comment.id %>").hide();
Danbooru.Utility.notice("Removed vote");
$(".comment[data-id=<%= @comment.id %>]").attr("data-is-voted", "false");