rough implementations of Moment and Essay creation and viewing completed.

This commit is contained in:
2025-06-04 14:53:02 -06:00
parent 088e0cc5a3
commit becfbc3628
14 changed files with 465 additions and 134 deletions
+19
View File
@@ -18,6 +18,25 @@ window.addEventListener("click", () => {
});
});
function editPost(id) {
fetch("director.php", {
method: "POST",
// TODO: Add Authorization header with JWT
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: "ajaxId=editPostHTML&id=" + id,
})
.then((response) => {
return response.json();
})
.then((data) => {
openModal(data["html"]);
document.querySelector("#redirect").value = window.location.href;
});
}
function deleteSpace(id) {
document.querySelector("#space-" + id).remove();