mode menu: remove post ban, rating lock, note lock options.
This commit is contained in:
@@ -165,14 +165,8 @@ PostModeMenu.click = function(e) {
|
||||
Post.vote("down", post_id);
|
||||
} else if (s === 'vote-up') {
|
||||
Post.vote("up", post_id);
|
||||
} else if (s === 'lock-rating') {
|
||||
Post.update(post_id, {"post[is_rating_locked]": "1"});
|
||||
} else if (s === 'lock-note') {
|
||||
Post.update(post_id, {"post[is_note_locked]": "1"});
|
||||
} else if (s === 'approve') {
|
||||
Post.approve(post_id);
|
||||
} else if (s === 'ban') {
|
||||
Post.ban(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);
|
||||
|
||||
@@ -529,22 +529,6 @@ Post.update = function(post_id, params) {
|
||||
});
|
||||
}
|
||||
|
||||
Post.ban = function(post_id) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/moderator/post/posts/" + post_id + "/ban.js",
|
||||
data: {
|
||||
commit: "Ban"
|
||||
},
|
||||
success: function(data) {
|
||||
$("#post_" + post_id).remove();
|
||||
},
|
||||
error: function(data) {
|
||||
Utility.error(`There was an error updating <a href="/posts/${post_id}">post #${post_id}</a>`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Post.approve = function(post_id) {
|
||||
$.post(
|
||||
"/moderator/post/approval.json",
|
||||
|
||||
Reference in New Issue
Block a user