aboutsummaryrefslogtreecommitdiff
path: root/static/script.js
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-07-10 00:08:19 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-07-10 00:08:19 +0200
commitc508fc902b765d5aae66a55ae359e549ac3ee257 (patch)
treee3c011596b9c5525cdfd25f31ed7dc48e359e0c0 /static/script.js
parentAttempt to serve everything as xml. (diff)
downloadcalp-c508fc902b765d5aae66a55ae359e549ac3ee257.tar.gz
calp-c508fc902b765d5aae66a55ae359e549ac3ee257.tar.xz
Move back to own popup system.
JQuery apparently doesn't handle xhtml, so the old system goes bust. Currently it's replaced with a barebones popup system, which works almost as well as the dependency. However; current problems include: - Wrong mouse cursor on events - Bad size on some browsers - Close button broken - Sometimes placed outside intended area, stretching it (since I *need* scroll on it). - ...
Diffstat (limited to 'static/script.js')
-rw-r--r--static/script.js46
1 files changed, 3 insertions, 43 deletions
diff --git a/static/script.js b/static/script.js
index 5024ea67..e7076f81 100644
--- a/static/script.js
+++ b/static/script.js
@@ -406,49 +406,9 @@ window.onload = function () {
serializer.serializeToString(xml);
*/
- /* Pretty prints the xcal contents in each popup.
- Done here since guile produces compact xml.
-
- element.innerText should still be valid xcal xml.
- */
-
- let parser = new DOMParser();
- for (let el of document.querySelectorAll("[type='application/calendar+xml']")) {
- let xml = parser.parseFromString(el.innerText, "text/xml");
- el.outerHTML = "<pre class='xcal'>"
- + pretty_print_xml(xml.documentElement, 0)
- + "</pre>";
-
-
- }
}
-
-let tipped_args = {
- /* 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',
+function toggle_child_popup(el) {
+ let popup = el.getElementsByClassName("popup-container")[0];
+ popup.classList.toggle("visible");
}
-
-$(document).ready(function() {
- Tipped.setDefaultSkin("purple");
- Tipped.create(".event", tipped_args);
-});
-