Commit 9a5db23b authored by Håkon Johansen Finstad's avatar Håkon Johansen Finstad
Browse files

Update workout.js

parent 5f93bef9
Pipeline #167114 failed with stages
in 3 minutes and 5 seconds
......@@ -335,6 +335,7 @@ function removeAthleteRow(event) {
event.currentTarget.parentElement.remove();
}
/*
async function displayCurrentRoster(currentUser, workoutid) {
let templateFilledAthlete = document.querySelector("#template-filled-member");
let templateEmptyAthlete = document.querySelector("#template-empty-member");
......@@ -358,7 +359,7 @@ async function displayCurrentRoster(currentUser, workoutid) {
emptyButton.addEventListener("click", addAthleteRow);
controls.appendChild(emptyDiv);
}
*/
window.addEventListener("DOMContentLoaded", async () => {
cancelWorkoutButton = document.querySelector("#btn-cancel-workout");
okWorkoutButton = document.querySelector("#btn-ok-workout");
......@@ -391,7 +392,7 @@ window.addEventListener("DOMContentLoaded", async () => {
okWorkoutButton.addEventListener("click", (async (id) => await updateWorkout(id)).bind(undefined, id));
postCommentButton.addEventListener("click", (async (id) => await createComment(id)).bind(undefined, id));
divCommentRow.className = divCommentRow.className.replace(" hide", "");
await displayCurrentRoster(currentUser, id);
//await displayCurrentRoster(currentUser, id);
}
} else {
......@@ -413,4 +414,4 @@ window.addEventListener("DOMContentLoaded", async () => {
divCommentRow.className += " hide";
}
});
\ No newline at end of file
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment