summaryrefslogtreecommitdiffstats
path: root/assets/js/gradings.js
diff options
context:
space:
mode:
authorrstular <rok@stular.eu>2020-06-01 20:27:31 +0200
committerrstular <rok@stular.eu>2020-06-02 16:05:54 +0200
commit4c43b6c615e18ec3f59c9b886775e6603a0f119f (patch)
treedcf79398fcc048a036498f2a628a09b9ee2a5fd5 /assets/js/gradings.js
parentgsec bug fix - regex may return null (diff)
downloadbeziapp-4c43b6c615e18ec3f59c9b886775e6603a0f119f.tar
beziapp-4c43b6c615e18ec3f59c9b886775e6603a0f119f.tar.gz
beziapp-4c43b6c615e18ec3f59c9b886775e6603a0f119f.tar.bz2
beziapp-4c43b6c615e18ec3f59c9b886775e6603a0f119f.tar.lz
beziapp-4c43b6c615e18ec3f59c9b886775e6603a0f119f.tar.xz
beziapp-4c43b6c615e18ec3f59c9b886775e6603a0f119f.tar.zst
beziapp-4c43b6c615e18ec3f59c9b886775e6603a0f119f.zip
Diffstat (limited to '')
-rw-r--r--assets/js/gradings.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/assets/js/gradings.js b/assets/js/gradings.js
index b5bf7b5..a852337 100644
--- a/assets/js/gradings.js
+++ b/assets/js/gradings.js
@@ -143,7 +143,7 @@ function gradingClickHandler(eventClickInfo) {
const modal = document.querySelectorAll(".side-modal")[0];
M.Sidenav.getInstance(modal).open();
}
-/*
+
function setupPickers() {
// Setup pickers, todo (adding an event), to be stored in messages
var date_object = new Date();
@@ -155,10 +155,9 @@ function gradingClickHandler(eventClickInfo) {
setDefaultDate: true,
firstDay: 1
}
- let instances = M.Datepicker.init(elems, options);
instances = M.Datepicker.init(elems, options);
}
-*/
+
document.addEventListener("DOMContentLoaded", () => {
checkLogin();
@@ -175,7 +174,18 @@ document.addEventListener("DOMContentLoaded", () => {
height: "parent"
});
calendar_obj.render();
- // setupPickers(); // todo (adding an event), to be stored in messages
+
+ // Modal for adding gradings
+ 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
$("#refresh-icon").click(() => {