diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-06 18:55:25 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-06 18:55:25 +0200 |
commit | 75430891794ac41af3b1111453e8972d9ca6b70b (patch) | |
tree | ea33f4d6ad733739896fb4d6c62e3fefbe2a812d /static | |
parent | Fix most of event creation problems in week. (diff) | |
download | calp-75430891794ac41af3b1111453e8972d9ca6b70b.tar.gz calp-75430891794ac41af3b1111453e8972d9ca6b70b.tar.xz |
Fix popup when creating and deleting in week.
Diffstat (limited to '')
-rw-r--r-- | static/script.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/static/script.js b/static/script.js index 1bd0bb95..db5b818e 100644 --- a/static/script.js +++ b/static/script.js @@ -252,7 +252,7 @@ async function remove_event (element) { }); console.log(response); - toggle_child_popup(element); + toggle_popup("popup" + element.id); if (response.status < 200 || response.status >= 300) { let body = await response.text(); @@ -333,7 +333,6 @@ async function create_event (event) { } let body = await response.text(); - console.log(body); /* servere is assumed to return an XML document on the form <properties> @@ -360,7 +359,7 @@ async function create_event (event) { event.classList.remove("generated"); event.classList.add("CAL_Calendar"); - toggle_child_popup(event); + toggle_popup("popup" + event.id); } function place_in_edit_mode (event) { @@ -585,7 +584,6 @@ function open_popup(popup) { function toggle_popup(popup_id) { let popup = document.getElementById(popup_id); - // popup.classList.toggle("visible"); if (popup.classList.contains("visible")) { close_popup(popup); } else { @@ -593,11 +591,6 @@ function toggle_popup(popup_id) { } } -function toggle_child_popup(el) { - let popup = el.getElementsByClassName("popup-container")[0]; - toggle_popup(popup); -} - function datepad(thing, width=2) { return (thing + "").padStart(width, "0"); } |