[feat]Read fullcalendar license key from ENV
This commit is contained in:
parent
657c9fdfb8
commit
cb6219e812
4 changed files with 8 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ $( document ).ready(function() {
|
||||||
let fullcalData = $('#fullcalendar');
|
let fullcalData = $('#fullcalendar');
|
||||||
|
|
||||||
var calendar = new FullCalendar.Calendar(calendarEl, {
|
var calendar = new FullCalendar.Calendar(calendarEl, {
|
||||||
|
schedulerLicenseKey: fullcalData.data('schedulerLicenseKey'),
|
||||||
expandRows: true,
|
expandRows: true,
|
||||||
allDaySlot: false,
|
allDaySlot: false,
|
||||||
slotMinTime: fullcalData.data('startHour') + ':00:00',
|
slotMinTime: fullcalData.data('startHour') + ':00:00',
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ class SchedulesController < ApplicationController
|
||||||
|
|
||||||
@rooms = FullCalendarFormatter.rooms_to_resources(@conference.venue.rooms) if @conference.venue
|
@rooms = FullCalendarFormatter.rooms_to_resources(@conference.venue.rooms) if @conference.venue
|
||||||
@event_schedules = FullCalendarFormatter.event_schedules_to_resources(event_schedules)
|
@event_schedules = FullCalendarFormatter.event_schedules_to_resources(event_schedules)
|
||||||
|
@scheduler_license_key = Rails.configuration.fullcalendar[:license_key]
|
||||||
end
|
end
|
||||||
|
|
||||||
def app
|
def app
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,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, |
|
||||||
|
'scheduler-license-key': @scheduler_license_key } }
|
||||||
|
|
|
||||||
|
|
@ -82,5 +82,9 @@ module Osem
|
||||||
end
|
end
|
||||||
|
|
||||||
config.assets.paths << Rails.root.join('node_modules')
|
config.assets.paths << Rails.root.join('node_modules')
|
||||||
|
|
||||||
|
config.fullcalendar = {
|
||||||
|
license_key: ENV['FULL_CALENDAR_LICENSE_KEY']
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue