comments: add scores, rework comment menu.
* Add comment scores. * Rework voting buttons so that you can click the upvote/downvote buttons to toggle votes. * Hide the edit, delete, undelete, and report buttons behind a popup menu. * Show the upvote/downvote/reply buttons to logged out users. Redirect them to the login page instead.
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
Danbooru.Utility.notice("Vote saved");
|
||||
$(".comment[data-id=<%= @comment.id %>]").attr("data-is-voted", "true");
|
||||
var $comment = $("article#comment_<%= @comment.id %>");
|
||||
$comment.replaceWith("<%= j render_comment(@comment, current_user: CurrentUser.user) %>");
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Danbooru.Utility.notice("Removed vote");
|
||||
$(".comment[data-id=<%= @comment.id %>]").attr("data-is-voted", "false");
|
||||
var $comment = $("article#comment_<%= @comment.id %>");
|
||||
$comment.replaceWith("<%= j render_comment(@comment, current_user: CurrentUser.user) %>");
|
||||
|
||||
Reference in New Issue
Block a user