diff options
Diffstat (limited to '')
-rw-r--r-- | assets/js/gradings.js | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/assets/js/gradings.js b/assets/js/gradings.js index bd664bb..4730248 100644 --- a/assets/js/gradings.js +++ b/assets/js/gradings.js @@ -156,6 +156,7 @@ function gradingClickHandler(eventClickInfo) { M.Sidenav.getInstance(modal).open(); } + function setupPickers() { // Setup pickers, todo (adding an event), to be stored in messages var date_object = new Date(); @@ -171,6 +172,7 @@ function setupPickers() { } + document.addEventListener("DOMContentLoaded", () => { checkLogin(); // Calendar setup @@ -188,17 +190,17 @@ document.addEventListener("DOMContentLoaded", () => { calendar_obj.render(); // Modal for adding gradings - setupPickers(); // TODO: Hook up submit logic - // Setup modals - const modal_elems = document.querySelectorAll('.modal'); - const modal_options = { - onOpenStart: () => { $("#fab-new").hide() }, - onCloseEnd: () => { $("#fab-new").show() }, - dismissible: false - }; - $("#input-grading-name").on("blur", validateInputs); - $("#input-grading-description").on("blur", validateInputs); - M.Modal.init(modal_elems, modal_options); + + // setupPickers(); // todo (adding an event), to be stored in messages + // // Setup modals + // const modal_elems = document.querySelectorAll('.modal'); + // const modal_options = { + // onOpenStart: () => { $("#fab-new").hide() }, + // onCloseEnd: () => { $("#fab-new").show() }, + // dismissible: false + // }; + // M.Modal.init(modal_elems, modal_options); + loadGradings(true); // Setup refresh handler |