aboutsummaryrefslogtreecommitdiff
path: root/static/server_connect.ts
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-12-10 00:13:15 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-12-10 00:13:15 +0100
commit5211cea181bbdf9c5296f09806c3735197bc2042 (patch)
tree1b0dad1db73330e4c237885100e463f5cae99e64 /static/server_connect.ts
parentBetter handling of popup visibility. (diff)
downloadcalp-5211cea181bbdf9c5296f09806c3735197bc2042.tar.gz
calp-5211cea181bbdf9c5296f09806c3735197bc2042.tar.xz
Close popup on event creation.
Diffstat (limited to 'static/server_connect.ts')
-rw-r--r--static/server_connect.ts22
1 files changed, 14 insertions, 8 deletions
diff --git a/static/server_connect.ts b/static/server_connect.ts
index 66410324..61eb4f30 100644
--- a/static/server_connect.ts
+++ b/static/server_connect.ts
@@ -94,7 +94,9 @@ async function create_event(event: VEvent) {
return;
}
- let body = await response.text();
+ /* response from here on is good */
+
+ // let body = await response.text();
/* server is assumed to return an XML document on the form
<properties>
@@ -103,10 +105,10 @@ async function create_event(event: VEvent) {
parse that, and update our own vevent with the data.
*/
- let parser = new DOMParser();
- let return_properties = parser
- .parseFromString(body, 'text/xml')
- .children[0];
+ // let parser = new DOMParser();
+ // let return_properties = parser
+ // .parseFromString(body, 'text/xml')
+ // .children[0];
// let child;
// while ((child = return_properties.firstChild)) {
@@ -120,7 +122,11 @@ async function create_event(event: VEvent) {
// }
// }
- // event.classList.remove("generated");
- // toggle_popup(popup_from);
-
+ for (let r of event.registered) {
+ r.classList.remove('generated');
+ if (r.tagName.toLowerCase() === 'popup-element') {
+ console.log(r);
+ r.removeAttribute('visible');
+ }
+ }
}