Files
cwsvJudo/homepage/participo/mams.js
marko f28fa7b51b WIP: bring participo back - consistent use of bootstrap - formatting -
phpstan level 0 error free - fixes for kyu subpage - move mams into
participo framework - remove legacy `lib/db.php` usage - add attributer
admin function - add newsposter - fixing apiKey creation
2025-11-19 12:24:38 +01:00

29 lines
816 B
JavaScript

// What to do when the document is loaded.
// @there is code duplication between the different participo/*.json! The participoLib needs a js section!
document.addEventListener("DOMContentLoaded", function () {
// init materialize elements
initSelects();
initSidenav();
initDatepicker();
});
function initSelects() {
var elems = document.querySelectorAll("select");
var instances = M.FormSelect.init(elems);
}
function initSidenav() {
options = {};
var sideNavElems = document.querySelectorAll(".sidenav");
var sideNavInstances = M.Sidenav.init(sideNavElems, options);
}
function initDatepicker() {
options = {
format: "yyyy-mm-dd",
};
var elems = document.querySelectorAll(".datepicker");
var instances = M.Datepicker.init(elems, options);
console.log("datepicker initialized");
}