mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-24 08:46:24 -07:00
Add move thread to post dropdown on thread OP (related to issue #36)
This commit is contained in:
parent
2b12801c60
commit
ae179a3762
1 changed files with 14 additions and 1 deletions
|
@ -19,7 +19,16 @@ function editPost(id, _board) {
|
|||
}, "Edit post");
|
||||
}
|
||||
|
||||
export function reportPost(id, board) {
|
||||
function moveThread(id, _board) {
|
||||
let cookiePass = getCookie("password");
|
||||
promptLightbox(cookiePass, true, () => {
|
||||
$("input[type=checkbox]").prop("checked", false);
|
||||
$(`input#check${id}`).prop("checked", true);
|
||||
$("input[name=move_btn]").trigger("click");
|
||||
}, "Move thread");
|
||||
}
|
||||
|
||||
function reportPost(id, board) {
|
||||
promptLightbox("", false, ($lb, reason) => {
|
||||
if(reason == "" || reason === null) return;
|
||||
let xhrFields = {
|
||||
|
@ -123,6 +132,9 @@ function handleActions(action, postIDStr) {
|
|||
case "Hide thread":
|
||||
setThreadVisibility(postID, false);
|
||||
break;
|
||||
case "Move thread":
|
||||
moveThread(postID, board);
|
||||
break;
|
||||
case "Show post":
|
||||
setPostVisibility(postID, true);
|
||||
break;
|
||||
|
@ -187,6 +199,7 @@ export function addPostDropdown($post) {
|
|||
} else {
|
||||
$ddownMenu.append("<option>Watch thread</option>");
|
||||
}
|
||||
$ddownMenu.append("<option>Move thread</option>");
|
||||
}
|
||||
let showHide = isPostVisible(idNum)?"Hide":"Show";
|
||||
$ddownMenu.append(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue