[feat] Prevent license key from being embedded in view

This commit is contained in:
CactusPuppy 2021-04-30 09:56:15 -07:00
parent 66767c33a2
commit 5b06b4d8bb
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
2 changed files with 4 additions and 3 deletions

View file

@ -1,25 +0,0 @@
$( document ).ready(function() {
let calendarEl = document.getElementById('vert-schedule-full-calendar');
if (!calendarEl) return; //check that we need a vertical schedule
let fullcalData = $('#fullcalendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
schedulerLicenseKey: fullcalData.data('schedulerLicenseKey'),
nowIndicator: true,
expandRows: true,
allDaySlot: false,
slotMinTime: fullcalData.data('startHour') + ':00:00',
slotMaxTime: fullcalData.data('endHour') + ':00:00',
validRange: {
start: fullcalData.data('startDate'),
end: fullcalData.data('endDate')
},
timeZone: 'UTC', // TODO: Events are stored in conference's timezone implicitly (UTC+0) in the database
initialDate: fullcalData.data('day'),
initialView: 'resourceTimeGridDay',
resources: fullcalData.data('rooms'),
events: fullcalData.data('events')
});
calendar.render();
});