mode menu: remove approve option.

Remove the approve option from the post mode menu. Mass approving posts
is rarely needed. The javascript was also buggy (it didn't update the
data attributes correctly when undeleting a post).

The replacement for this feature is to use a tagscript with the
status:active tag.
This commit is contained in:
evazion
2020-02-20 17:43:33 -06:00
parent d7e0b5aa90
commit 9b58cb7b42
4 changed files with 0 additions and 25 deletions

View File

@@ -164,8 +164,6 @@ PostModeMenu.click = function(e) {
Post.tag(post_id, "downvote:me");
} else if (s === 'vote-up') {
Post.tag(post_id, "upvote:me");
} else if (s === 'approve') {
Post.approve(post_id);
} else if (s === "tag-script") {
var current_script_id = localStorage.getItem("current_tag_script_id");
var tag_script = localStorage.getItem("tag-script-" + current_script_id);

View File

@@ -521,23 +521,6 @@ Post.update = function(post_id, params) {
});
}
Post.approve = function(post_id) {
$.post(
"/post_approvals.json",
{"post_id": post_id}
).fail(function(data) {
var message = $.map(data.responseJSON.errors, function(msg, attr) { return msg; }).join("; ");
Utility.error("Error: " + message);
}).done(function(data) {
var $post = $("#post_" + post_id);
if ($post.length) {
$post.data("flags", $post.data("flags").replace(/pending/, ""));
$post.removeClass("post-status-pending");
Utility.notice("Approved post #" + post_id);
}
});
}
Post.initialize_saved_searches = function() {
$("#save-search-dialog").dialog({
width: 700,