1 // This module handles the view for "calendar" rooms.
3 // Copyright (c) 2016-2023 by the citadel.org team
5 // This program is open source software. Use, duplication, or
6 // disclosure is subject to the GNU General Public License v3.
9 // RENDERER FOR THIS VIEW
10 function view_render_calendar() {
15 "Content-Type" : "application/xml; charset=utf-8"
18 <CAL:calendar-query xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav">
21 <CAL:comp-filter name="VCALENDAR">
22 <CAL:comp-filter name="VEVENT" />
29 fetch("/ctdl/r/" + escapeHTMLURI(current_room), options)
32 return(response.text());
35 throw new Error(`${response.status} ${response.statusText}`);
38 //.then(str => new window.DOMParser().parseFromString(str, "text/xml"))
39 .then(str => document.getElementById("ctdl-main").innerHTML = escapeHTML(str))
42 document.getElementById("ctdl-main").innerHTML = `<div class="ctdl-fatal-error">${error}</div>`;