Merge pull request #2829 from evazion/fix-post-unvotes-js

Fix voting not showing 'undo vote' link if you already voted.
This commit is contained in:
Albert Yi
2017-01-11 10:53:53 -08:00
committed by GitHub

View File

@@ -3,6 +3,7 @@
<% else %> <% else %>
Danbooru.notice("Vote saved"); Danbooru.notice("Vote saved");
$("#score-for-post-<%= @post.id %>").html(<%= @post.score %>); $("#score-for-post-<%= @post.id %>").html(<%= @post.score %>);
$("#vote-links-for-post-<%= @post.id %>").hide();
$("#unvote-link-for-post-<%= @post.id %>").show();
<% end %> <% end %>
$("#vote-links-for-post-<%= @post.id %>").hide();
$("#unvote-link-for-post-<%= @post.id %>").show();