aboutsummaryrefslogtreecommitdiff
path: root/static/script.js
diff options
context:
space:
mode:
Diffstat (limited to 'static/script.js')
-rw-r--r--static/script.js31
1 files changed, 30 insertions, 1 deletions
diff --git a/static/script.js b/static/script.js
index 8617159a..6cca186e 100644
--- a/static/script.js
+++ b/static/script.js
@@ -251,15 +251,18 @@ window.onload = function () {
}
}
+ /*
for (let popup of document.getElementsByClassName("popup")) {
ev = parents_until(popup, {class: "event"})
e = ev.getElementsByClassName("body")[0]
e.onclick = new_popup;
/* disable scroll to element in side list
if popups are available.
- */
+ * /
e.parentElement.removeAttribute("href");
}
+ */
+
document.onkeydown = function (evt) {
evt = evt || window.event;
@@ -269,3 +272,29 @@ window.onload = function () {
}
}
+
+$(document).ready(function() {
+ Tipped.setDefaultSkin("purple");
+ Tipped.create(".event", {
+ /* no padding, I am the one who styles! */
+ padding: false,
+ /* Don't remove from DOM when hiding */
+ detach: false,
+
+ /* click element to toggle.
+ Elements with class "close-tooltip" also
+ acts as close buttons */
+ showOn: 'click',
+ hideOn: 'click',
+
+ /* makes popups relative our scrolling days view */
+ container: '.days',
+
+ /* Ensures that the popups stay within the given area,
+ and don't strectch the container */
+ containment: {
+ selector: '.days',
+ },
+ behaviour: 'sticky',
+ });
+});