aboutsummaryrefslogtreecommitdiff
path: root/static/script.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--static/script.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/static/script.ts b/static/script.ts
index b9336165..655d1e36 100644
--- a/static/script.ts
+++ b/static/script.ts
@@ -2,7 +2,7 @@ import { close_all_popups } from './popup'
import { VEvent, xml_to_vcal } from './vevent'
import { SmallcalCellHighlight, Timebar } from './clock'
import { makeElement } from './lib'
-import { vcal_objects, event_calendar_mapping, EDIT_MODE } from './globals'
+import { vcal_objects, event_calendar_mapping } from './globals'
import { open_popup } from './popup'
import { EventCreator } from './event-creator'
import { PopupElement } from './components/popup-element'
@@ -14,6 +14,11 @@ import { initialize_components } from './elements'
window.addEventListener('load', function() {
+ /*
+ TODO possibly check here that both window.EDIT_MODE and window.VIEW have
+ defined values.
+ */
+
// let json_objects_el = document.getElementById('json-objects');
let div = document.getElementById('xcal-data')!;
let vevents = div.firstElementChild!.children;
@@ -72,7 +77,7 @@ window.addEventListener('load', function() {
}, 1000 * 60);
/* Is event creation active? */
- if (true && EDIT_MODE) {
+ if (true && window.EDIT_MODE) {
let eventCreator = new EventCreator;
for (let c of document.getElementsByClassName("events")) {
if (!(c instanceof HTMLElement)) continue;