[feat] Prevent license key from being embedded in view
This commit is contained in:
parent
6777ffb0bb
commit
2dbcf95425
2 changed files with 5 additions and 4 deletions
|
|
@ -3,8 +3,10 @@ $( document ).ready(function() {
|
||||||
if (!calendarEl) return; //check that we need a vertical schedule
|
if (!calendarEl) return; //check that we need a vertical schedule
|
||||||
let fullcalData = $('#fullcalendar');
|
let fullcalData = $('#fullcalendar');
|
||||||
|
|
||||||
|
let license_key = "<%= Rails.configuration.fullcalendar[:license_key] %>";
|
||||||
|
|
||||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||||
schedulerLicenseKey: fullcalData.data('schedulerLicenseKey'),
|
schedulerLicenseKey: license_key,
|
||||||
nowIndicator: true,
|
nowIndicator: true,
|
||||||
now: fullcalData.data('now'),
|
now: fullcalData.data('now'),
|
||||||
expandRows: true,
|
expandRows: true,
|
||||||
|
|
@ -8,6 +8,5 @@
|
||||||
#vert-schedule-full-calendar
|
#vert-schedule-full-calendar
|
||||||
#fullcalendar{ data: { rooms: @rooms, events: @event_schedules, day: @day,
|
#fullcalendar{ data: { rooms: @rooms, events: @event_schedules, day: @day,
|
||||||
'start-hour': @conference.start_hour, 'end-hour': @conference.end_hour,
|
'start-hour': @conference.start_hour, 'end-hour': @conference.end_hour,
|
||||||
'start-date': @conference.start_date, 'end-date': @conference.end_date + 1.day,
|
'start-date': @conference.start_date,
|
||||||
'timezone': @conference.timezone, 'now': @now,
|
'end-date': @conference.end_date + 1.day } }
|
||||||
'scheduler-license-key': @scheduler_license_key } }
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue