[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

@ -3,8 +3,10 @@ $( document ).ready(function() {
if (!calendarEl) return; //check that we need a vertical schedule
let fullcalData = $('#fullcalendar');
let license_key = "<%= Rails.configuration.fullcalendar[:license_key] %>";
var calendar = new FullCalendar.Calendar(calendarEl, {
schedulerLicenseKey: fullcalData.data('schedulerLicenseKey'),
schedulerLicenseKey: license_key,
nowIndicator: true,
expandRows: true,
allDaySlot: false,

View file

@ -9,5 +9,4 @@
#fullcalendar{ data: { rooms: @rooms, events: @event_schedules, day: @day,
'start-hour': @conference.start_hour, 'end-hour': @conference.end_hour,
'start-date': @conference.start_date,
'end-date': @conference.end_date + 1.day,
'scheduler-license-key': @scheduler_license_key } }
'end-date': @conference.end_date + 1.day } }