aboutsummaryrefslogtreecommitdiff
path: root/doc/ref/javascript/globals.texi
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2021-12-12 23:29:06 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2021-12-13 02:26:51 +0100
commit5e4aa8e9aba34bb101923685c23f0f6681a12812 (patch)
tree0bed50b63266ab65931a027c59e7b901f06d9d82 /doc/ref/javascript/globals.texi
parentMade VEventComponent template optional. (diff)
downloadcalp-5e4aa8e9aba34bb101923685c23f0f6681a12812.tar.gz
calp-5e4aa8e9aba34bb101923685c23f0f6681a12812.tar.xz
Add documenttation for javascript rewrite.
Diffstat (limited to 'doc/ref/javascript/globals.texi')
-rw-r--r--doc/ref/javascript/globals.texi41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/ref/javascript/globals.texi b/doc/ref/javascript/globals.texi
new file mode 100644
index 00000000..5ef7a43b
--- /dev/null
+++ b/doc/ref/javascript/globals.texi
@@ -0,0 +1,41 @@
+@node globals
+@subsection globals.ts
+
+Different variables and values which for different reasons needs to be
+global. Window Value's are those that are bound to the @code{window}
+context in JavaScript, so is really always available, no opt out.
+
+@deftypevar {Map<uid, VEvent>} vcal_objects
+All VEvent objects on current page, indexed by their unique identifiers.
+
+A global object store.
+@end deftypevar
+
+@deftypevar {Map<uid, string>} event_calendar_mapping
+Mapping from VEvent unique identifier, to name of its calendar. Should
+probably not be global, so refrain from using it.
+@end deftypevar
+
+@deftypevr {Window Value} {Map<uid, VEvent>} vcal_objects
+The exact same object store as the regular variable of the same
+name. Mostly here for human debugability.
+@end deftypevr
+
+@deftypevr {Window Value} {@code{'month'} | @code{'string'}} VIEW
+How the calendar is currently formatted. Should be set by the backend
+through a simple @code{script}-tag.
+@end deftypevr
+
+@deftypevr {Window Value} {boolean} EDIT_MODE
+However editing of events is enabled or not.
+Should be set by the backend through a simple @code{script}-tag.
+@end deftypevr
+
+@deftypevr {Window Value} {string} default_calendar
+Name of the calendar to assume when creating new events.
+Should be set by the backend through a simple @code{script}-tag.
+@end deftypevr
+
+@c TODO addNewEvent
+@c @deftypevr {Window Value} {string} default_calendar
+@c @end deftypevr