forked from DGNum/metis
Add default location
This commit is contained in:
parent
27d904871d
commit
933c176601
1 changed files with 5 additions and 9 deletions
|
@ -28,7 +28,8 @@ const calendars = {
|
|||
fRtjDkjrZyn6fxd8: {
|
||||
cloud: clouds.ELEVES_ENS,
|
||||
name: 'K-Fêt',
|
||||
color: '#c63b52'
|
||||
color: '#c63b52',
|
||||
default_location: 'K-Fêt'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,6 +80,7 @@ class Calendar {
|
|||
this.name = metadata.name
|
||||
this.short_name = metadata.short_name
|
||||
this.color = metadata.color || calendar[1][4][3]
|
||||
this.default_location = metadata.default_location
|
||||
this.events = calendar[2]
|
||||
.filter(item => item[0] === 'vevent')
|
||||
.map(item => this._parse_vevent(item[1]))
|
||||
|
@ -107,14 +109,8 @@ function fcEventFromjCalEvent(cal) {
|
|||
|
||||
fcEvent.calendar = cal.name
|
||||
fcEvent.short_name = evt.summary
|
||||
|
||||
if (evt.description) {
|
||||
fcEvent.description = evt.description
|
||||
}
|
||||
|
||||
if (evt.location) {
|
||||
fcEvent.location = evt.location
|
||||
}
|
||||
fcEvent.description = evt.description
|
||||
fcEvent.location = evt.location || cal.default_location
|
||||
|
||||
if (evt.rrule) {
|
||||
const { freq, byday, interval } = evt.rrule
|
||||
|
|
Loading…
Reference in a new issue