Files
danbooru/app/views/post_approvals/create.js.erb

11 lines
357 B
Plaintext

<% if @approval.errors.any? %>
Danbooru.error("Error: " + <%= @approval.errors.full_messages.join("; ").to_json.html_safe %>);
<% else %>
if ($("#c-posts #a-show").length) {
location.reload();
} else if ($("#c-modqueue").length) {
$("#c-modqueue #post-<%= @approval.post.id %>").hide();
Danbooru.notice("Post was approved");
}
<% end %>