aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-28 02:54:01 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-28 02:54:01 +0200
commit4413fe85f8165d8066743784fa5907693c8d8f91 (patch)
tree5479d62b1d6fc89209f24cc76e16b69134d889f8
parentClean up and simlify event drag code. (diff)
downloadcalp-4413fe85f8165d8066743784fa5907693c8d8f91.tar.gz
calp-4413fe85f8165d8066743784fa5907693c8d8f91.tar.xz
Minor JS cleanup.
-rw-r--r--static/script.js13
1 files changed, 2 insertions, 11 deletions
diff --git a/static/script.js b/static/script.js
index c6d7ad10..b7526ee5 100644
--- a/static/script.js
+++ b/static/script.js
@@ -145,8 +145,6 @@ function toggle_event_pupup () {
this.getElementsByClassName("popup")[0].classList.toggle("show");
}
-let days;
-
function min(a, b) {
return a < b ? a : b;
}
@@ -166,6 +164,8 @@ https://stackoverflow.com/questions/21064101/understanding-offsetwidth-clientwid
*/
function new_popup (event) {
+ let days = document.getElementsByClassName("days")[0]
+
console.log(event.target);
console.log(this);
// if (event.target !== this) return;
@@ -245,11 +245,6 @@ window.onload = function () {
}
}
- // for (let e of document.getElementsByClassName("event-inner")) {
- // e.onclick = toggle_event_pupup;
- // }
-
- days = document.getElementsByClassName("days")[0]
for (let popup of document.getElementsByClassName("popup")) {
ev = parents_until(popup, {class: "event"})
e = ev.getElementsByClassName("body")[0]
@@ -260,8 +255,4 @@ window.onload = function () {
e.parentElement.removeAttribute("href");
}
- // days.scrollLeft == 0
- // days.offsetWidth == viewable width
- // days.offsetHeight == viewable height
-
}