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
This commit is contained in:
28
homepage/participo/mams.js
Normal file
28
homepage/participo/mams.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// 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");
|
||||
}
|
||||
Reference in New Issue
Block a user