style/js fixes

This commit is contained in:
albert
2011-11-03 16:30:06 -04:00
parent 694eefd314
commit d09e80d2f4
11 changed files with 45 additions and 42 deletions

View File

@@ -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 %>

View File

@@ -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");
}

View File

@@ -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();
}

View File

@@ -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 %>