diff --git a/app/assets/javascripts/fullcalendar.js b/app/assets/javascripts/fullcalendar.js.erb similarity index 87% rename from app/assets/javascripts/fullcalendar.js rename to app/assets/javascripts/fullcalendar.js.erb index 3a0d88ac..992bcbc6 100644 --- a/app/assets/javascripts/fullcalendar.js +++ b/app/assets/javascripts/fullcalendar.js.erb @@ -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, now: fullcalData.data('now'), expandRows: true, @@ -24,3 +26,5 @@ $( document ).ready(function() { calendar.render(); }); + + diff --git a/app/views/schedules/vertical_schedule.haml b/app/views/schedules/vertical_schedule.haml index 6e8be368..9e5ce379 100644 --- a/app/views/schedules/vertical_schedule.haml +++ b/app/views/schedules/vertical_schedule.haml @@ -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, - 'timezone': @conference.timezone, 'now': @now, - 'scheduler-license-key': @scheduler_license_key } } + 'timezone': @conference.timezone, 'now': @now } }