From 3fbfd2b20adb64c200f6fbae948cb46fad287766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 21 Mar 2020 00:34:59 +0100 Subject: Add rudementary popup system. --- static/script.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'static/script.js') diff --git a/static/script.js b/static/script.js index bc20cb07..dcc7285f 100644 --- a/static/script.js +++ b/static/script.js @@ -95,8 +95,15 @@ function update_current_time_bar () { event_area.append(bar_object) } +function toggle_event_pupup () { + console.log(this); + this.getElementsByClassName("popup")[0].classList.toggle("show"); +} + window.onload = function () { + console.log("Running"); + /* update_current_time_bar() // once a minute for now, could probably be slowed to every 10 minutes window.setInterval(update_current_time_bar, 1000 * 60) @@ -106,4 +113,9 @@ window.onload = function () { c.onmouseup = onmouseuphandler; c.onmousemove = onmousemovehandler; } + */ + + for (let e of document.getElementsByClassName("event-inner")) { + e.onclick = toggle_event_pupup; + } } -- cgit v1.2.3