[feat]Change border color of event

This commit is contained in:
Jimmy 2021-04-30 19:19:30 +08:00 committed by CactusPuppy
parent 29b7f057c7
commit 03b12eafb0
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
2 changed files with 3 additions and 0 deletions

View file

@ -33,6 +33,7 @@ class FullCalendarFormatter
end: event_schedule.end_time, end: event_schedule.end_time,
resourceId: event_schedule.room.guid, resourceId: event_schedule.room.guid,
url: url, url: url,
borderColor: event_type_color,
backgroundColor: event_type_color, backgroundColor: event_type_color,
textColor: contrast_color(event_type_color) textColor: contrast_color(event_type_color)
} }

View file

@ -49,6 +49,7 @@ describe FullCalendarFormatter do
end: event_schedule1.end_time, end: event_schedule1.end_time,
resourceId: room1.guid, resourceId: room1.guid,
url: Rails.application.routes.url_helpers.conference_program_proposal_path(conference.short_title, event1.id), url: Rails.application.routes.url_helpers.conference_program_proposal_path(conference.short_title, event1.id),
borderColor: event1.event_type.color,
backgroundColor: event1.event_type.color, backgroundColor: event1.event_type.color,
textColor: 'black' textColor: 'black'
}, },
@ -59,6 +60,7 @@ describe FullCalendarFormatter do
end: event_schedule2.end_time, end: event_schedule2.end_time,
resourceId: room2.guid, resourceId: room2.guid,
url: Rails.application.routes.url_helpers.conference_program_proposal_path(conference.short_title, event2.id), url: Rails.application.routes.url_helpers.conference_program_proposal_path(conference.short_title, event2.id),
borderColor: event2.event_type.color,
backgroundColor: event2.event_type.color, backgroundColor: event2.event_type.color,
textColor: 'white' textColor: 'white'
} }