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
+24
View File
@@ -0,0 +1,24 @@
let essays = document.querySelectorAll(".divLink");
essays.forEach((e) => {
let link = e.querySelector("a").href;
let id = link.split("=")[2];
e.addEventListener("click", () => {
fetch("director.php", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: "ajaxId=viewEssay&id=" + id,
})
.then((response) => {
return response.json();
})
.then((data) => {
if (!data["html"]) return;
openModal(data["html"]);
});
});
});