summaryrefslogtreecommitdiffstats
path: root/js/meals.js
diff options
context:
space:
mode:
authorrstular <rok@stular.eu>2020-05-16 23:41:52 +0200
committerrstular <rok@stular.eu>2020-05-16 23:41:52 +0200
commit48de23d1c8a36a0cd322d8a72ebdca2cb822cb24 (patch)
treee6a722a835c0c29609c50c67375fd943409ad7bf /js/meals.js
parentMerge branch 'dev' of github.com:beziapp/beziapp.github.io into dev (diff)
downloadbeziapp-48de23d1c8a36a0cd322d8a72ebdca2cb822cb24.tar
beziapp-48de23d1c8a36a0cd322d8a72ebdca2cb822cb24.tar.gz
beziapp-48de23d1c8a36a0cd322d8a72ebdca2cb822cb24.tar.bz2
beziapp-48de23d1c8a36a0cd322d8a72ebdca2cb822cb24.tar.lz
beziapp-48de23d1c8a36a0cd322d8a72ebdca2cb822cb24.tar.xz
beziapp-48de23d1c8a36a0cd322d8a72ebdca2cb822cb24.tar.zst
beziapp-48de23d1c8a36a0cd322d8a72ebdca2cb822cb24.zip
Diffstat (limited to 'js/meals.js')
-rw-r--r--js/meals.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/meals.js b/js/meals.js
index f0d0266..0a5313a 100644
--- a/js/meals.js
+++ b/js/meals.js
@@ -341,9 +341,23 @@ async function setMenu(date, menu) {
getToken(getMenus, [setMenus, choice]);
}
+
+function setupEventListeners() {
+ $("#meals-login").click(() => {
+ lopolisLogin();
+ });
+
+ $("#meals-logout").click(() => {
+ lopolisLogout();
+ });
+}
+
// Initialization code
document.addEventListener("DOMContentLoaded", async () => {
checkLogin();
+
+ setupEventListeners();
+
let coll_elem = document.querySelectorAll('.collapsible');
M.Collapsible.init(coll_elem, {});