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:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user