Files
danbooru/app/views/moderator/post/disapprovals/create.js.erb
evazion 847237980b Fix #3469: Rejecting post shouldn't hide pending/flagged notices
Just reload the page entirely instead of trying to update it in place.
2018-08-25 00:39:08 -05:00

12 lines
511 B
Plaintext

<% if @post_disapproval.errors.any? %>
$(window).trigger("danbooru:error", "Error: " + <%= @post_disapproval.errors.full_messages.join("; ").to_json.html_safe %>);
<% else %>
if ($("#c-posts #a-show").length) {
location.reload();
} else if ($("#c-moderator-post-queues").length) {
$("#c-moderator-post-queues #post-<%= @post_disapproval.post.id %>").hide();
$(window).trigger("danbooru:modqueue_increment_processed");
$(window).trigger("danbooru:notice", "Post was hidden");
}
<% end %>