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);
|
Post.vote("down", post_id);
|
||||||
} else if (s === 'vote-up') {
|
} else if (s === 'vote-up') {
|
||||||
Post.vote("up", post_id);
|
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') {
|
} else if (s === 'approve') {
|
||||||
Post.approve(post_id);
|
Post.approve(post_id);
|
||||||
} else if (s === 'ban') {
|
|
||||||
Post.ban(post_id);
|
|
||||||
} else if (s === "tag-script") {
|
} else if (s === "tag-script") {
|
||||||
var current_script_id = localStorage.getItem("current_tag_script_id");
|
var current_script_id = localStorage.getItem("current_tag_script_id");
|
||||||
var tag_script = localStorage.getItem("tag-script-" + current_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.approve = function(post_id) {
|
||||||
$.post(
|
$.post(
|
||||||
"/moderator/post/approval.json",
|
"/moderator/post/approval.json",
|
||||||
|
|||||||
@@ -136,11 +136,8 @@
|
|||||||
--post-mode-menu-remove-fav-background: #FFA;
|
--post-mode-menu-remove-fav-background: #FFA;
|
||||||
--post-mode-menu-vote-up-background: #AFA;
|
--post-mode-menu-vote-up-background: #AFA;
|
||||||
--post-mode-menu-vote-down-background: #FAA;
|
--post-mode-menu-vote-down-background: #FAA;
|
||||||
--post-mode-menu-lock-rating-background: #AA3;
|
|
||||||
--post-mode-menu-lock-note-background: #3AA;
|
|
||||||
--post-mode-menu-approve-background: #48C;
|
--post-mode-menu-approve-background: #48C;
|
||||||
--post-mode-menu-translation-background: #5CD;
|
--post-mode-menu-translation-background: #5CD;
|
||||||
--post-mode-menu-ban-background: #F33;
|
|
||||||
|
|
||||||
--tag-count-color: var(--muted-text-color);
|
--tag-count-color: var(--muted-text-color);
|
||||||
--low-post-count-color: red;
|
--low-post-count-color: red;
|
||||||
@@ -382,11 +379,8 @@ body[data-current-user-theme="dark"] {
|
|||||||
--post-mode-menu-remove-fav-background: var(--yellow-0);
|
--post-mode-menu-remove-fav-background: var(--yellow-0);
|
||||||
--post-mode-menu-vote-up-background: var(--red-0);
|
--post-mode-menu-vote-up-background: var(--red-0);
|
||||||
--post-mode-menu-vote-down-background: var(--red-0);
|
--post-mode-menu-vote-down-background: var(--red-0);
|
||||||
--post-mode-menu-lock-rating-background: var(--purple-0);
|
|
||||||
--post-mode-menu-lock-note-background: var(--purple-0);
|
|
||||||
--post-mode-menu-approve-background: var(--aqua-0);
|
--post-mode-menu-approve-background: var(--aqua-0);
|
||||||
--post-mode-menu-translation-background: var(--blue-0);
|
--post-mode-menu-translation-background: var(--blue-0);
|
||||||
--post-mode-menu-ban-background: var(--red-1);
|
|
||||||
|
|
||||||
--post-notice-border: 1px solid var(--grey-3);
|
--post-notice-border: 1px solid var(--grey-3);
|
||||||
--post-search-notice-background: var(--grey-3);
|
--post-search-notice-background: var(--grey-3);
|
||||||
|
|||||||
@@ -22,14 +22,6 @@ body.mode-vote-down {
|
|||||||
background-color: var(--post-mode-menu-vote-down-background);
|
background-color: var(--post-mode-menu-vote-down-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
body.mode-lock-rating {
|
|
||||||
background-color: var(--post-mode-menu-lock-rating-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
body.mode-lock-note {
|
|
||||||
background-color: var(--post-mode-menu-lock-note-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
body.mode-approve {
|
body.mode-approve {
|
||||||
background-color: var(--post-mode-menu-approve-background);
|
background-color: var(--post-mode-menu-approve-background);
|
||||||
}
|
}
|
||||||
@@ -38,10 +30,6 @@ body.mode-translation {
|
|||||||
background-color: var(--post-mode-menu-translation-background);
|
background-color: var(--post-mode-menu-translation-background);
|
||||||
}
|
}
|
||||||
|
|
||||||
body.mode-ban {
|
|
||||||
background-color: var(--post-mode-menu-ban-background);
|
|
||||||
}
|
|
||||||
|
|
||||||
#page, #top, #page-footer {
|
#page, #top, #page-footer {
|
||||||
background-color: var(--body-background-color);
|
background-color: var(--body-background-color);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,16 +10,9 @@
|
|||||||
<option value="remove-fav">Unfavorite</option>
|
<option value="remove-fav">Unfavorite</option>
|
||||||
<option value="vote-up">Vote up</option>
|
<option value="vote-up">Vote up</option>
|
||||||
<option value="vote-down">Vote down</option>
|
<option value="vote-down">Vote down</option>
|
||||||
<% if CurrentUser.is_builder? %>
|
|
||||||
<option value="lock-rating">Lock rating</option>
|
|
||||||
<option value="lock-note">Lock notes</option>
|
|
||||||
<% end %>
|
|
||||||
<% if CurrentUser.can_approve_posts? %>
|
<% if CurrentUser.can_approve_posts? %>
|
||||||
<option value="approve">Approve</option>
|
<option value="approve">Approve</option>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if CurrentUser.is_admin? %>
|
|
||||||
<option value="ban">Ban</option>
|
|
||||||
<% end %>
|
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
<input id="tag-script-field" data-autocomplete="tag-edit" placeholder="Enter tag script" style="display: none; margin-top: 0.5em;">
|
<input id="tag-script-field" data-autocomplete="tag-edit" placeholder="Enter tag script" style="display: none; margin-top: 0.5em;">
|
||||||
|
|||||||
Reference in New Issue
Block a user