aboutsummaryrefslogtreecommitdiff
path: root/static/components
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-11-18 21:41:20 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-11-18 21:41:20 +0100
commite5219a712560fde7c843652f088de995a6de68ea (patch)
treed66b46cf4944eb2e3b6fbfe28a553bfd17a85bb1 /static/components
parentMinor fixes. (diff)
downloadcalp-e5219a712560fde7c843652f088de995a6de68ea.tar.gz
calp-e5219a712560fde7c843652f088de995a6de68ea.tar.xz
Restore remove event functionality.
Diffstat (limited to 'static/components')
-rw-r--r--static/components/popup-element.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/static/components/popup-element.ts b/static/components/popup-element.ts
index 2f019f4d..cb67035f 100644
--- a/static/components/popup-element.ts
+++ b/static/components/popup-element.ts
@@ -9,6 +9,8 @@ import { vcal_objects } from '../globals'
import { ComponentVEvent } from './vevent'
import { TabElement } from './tab-element'
+import { remove_event } from '../server_connect'
+
/* <popup-element /> */
class PopupElement extends ComponentVEvent {
@@ -74,8 +76,11 @@ class PopupElement extends ComponentVEvent {
let nav = body.getElementsByClassName("popup-control")[0] as HTMLElement;
bind_popup_control(nav);
- let btn = body.querySelector('.popup-control .close-tooltip') as HTMLButtonElement
- btn.addEventListener('click', () => close_popup(this));
+ let close_btn = body.querySelector('.popup-control .close-button') as HTMLButtonElement
+ close_btn.addEventListener('click', () => close_popup(this));
+
+ let remove_btn = body.querySelector('.popup-control .remove-button') as HTMLButtonElement
+ remove_btn.addEventListener('click', () => remove_event(uid));
/* end nav bar */
this.replaceChildren(body);