Fix #3469: Rejecting post shouldn't hide pending/flagged notices
Just reload the page entirely instead of trying to update it in place.
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
<% if @approval.errors.any? %>
|
||||
$(window).trigger("danbooru:error", "Error: " + <%= @approval.errors.full_messages.join("; ").to_json.html_safe %>);
|
||||
<% else %>
|
||||
$(window).trigger("danbooru:notice", "Post was approved");
|
||||
$(window).trigger("danbooru:modqueue_increment_processed");
|
||||
if ($("#c-posts #a-show").length) {
|
||||
location.reload();
|
||||
} else if ($("#c-moderator-post-queues").length) {
|
||||
$("#c-moderator-post-queues #post-<%= @approval.post.id %>").hide();
|
||||
$(window).trigger("danbooru:modqueue_increment_processed");
|
||||
$(window).trigger("danbooru:notice", "Post was approved");
|
||||
}
|
||||
<% end %>
|
||||
|
||||
$("#c-posts #approve").hide();
|
||||
$("#c-posts #disapprove").hide();
|
||||
$("#c-posts #flag").show();
|
||||
|
||||
$("#pending-approval-notice, .notice-flagged, .notice-appealed").hide();
|
||||
$("#c-moderator-post-queues #post-<%= @approval.post.id %>").hide();
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<% if @post_disapproval.errors.any? %>
|
||||
$(window).trigger("danbooru:error", "Error: " + <%= @post_disapproval.errors.full_messages.join("; ").to_json.html_safe %>);
|
||||
<% else %>
|
||||
$(window).trigger("danbooru:notice", "Post was hidden");
|
||||
$(window).trigger("danbooru:modqueue_increment_processed");
|
||||
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 %>
|
||||
|
||||
$("#c-posts #approve").hide();
|
||||
$("#c-posts #disapprove").hide();
|
||||
|
||||
$("#pending-approval-notice, .notice-flagged, .notice-appealed").hide();
|
||||
$("#c-moderator-post-queues #post-<%= @post_disapproval.post.id %>").hide();
|
||||
|
||||
Reference in New Issue
Block a user