style/js fixes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<% if @comment_vote.errors.any? %>
|
||||
Danbooru.j_error("<%= j @comment_vote.errors.full_messages.join('; ') %>");
|
||||
Danbooru.error("<%= j @comment_vote.errors.full_messages.join('; ') %>");
|
||||
<% elsif @comment_vote.is_negative? %>
|
||||
$(".comment[data-comment-id=<%= @comment.id %>]").remove();
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var errors = "<%= j @post_appeal.errors.full_messages.join("; ") %>";
|
||||
if (errors.length > 0) {
|
||||
Danbooru.j_error(errors);
|
||||
Danbooru.error(errors);
|
||||
} else {
|
||||
Danbooru.j_alert("Appeal", "Post appealed");
|
||||
Danbooru.notice("Post appealed");
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
var errors = <%= @post_flag.errors.full_messages.to_json.html_safe %>;
|
||||
if (errors.length > 0) {
|
||||
Danbooru.j_error(errors.join("; "));
|
||||
Danbooru.error(errors.join("; "));
|
||||
} else {
|
||||
Danbooru.j_alert("Flag", "Post flagged");
|
||||
Danbooru.notice("Post flagged");
|
||||
$("a#approve").show();
|
||||
$("a#disapprove").show();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<% if @error %>
|
||||
Danbooru.j_error("<%= j @error.to_s %>");
|
||||
Danbooru.error("<%= j @error.to_s %>");
|
||||
<% else %>
|
||||
$("#score-for-post-<%= @post.id %>").html(<%= @post.score %>);
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user