mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-30 13:09:34 +00:00
Push location, geo and description on events stack for single and repeating events.
This commit is contained in:
parent
89234c0163
commit
2cc9356c32
@ -81,6 +81,7 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// calculate the duration f the event for use with recurring events.
|
// calculate the duration f the event for use with recurring events.
|
||||||
var duration = parseInt(endDate.format("x")) - parseInt(startDate.format("x"));
|
var duration = parseInt(endDate.format("x")) - parseInt(startDate.format("x"));
|
||||||
|
|
||||||
@ -95,6 +96,10 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
title = event.description;
|
title = event.description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var location = event.location || false;
|
||||||
|
var geo = event.geo || false;
|
||||||
|
var description = event.description || false;
|
||||||
|
|
||||||
if (typeof event.rrule != "undefined" && !isFacebookBirthday) {
|
if (typeof event.rrule != "undefined" && !isFacebookBirthday) {
|
||||||
var rule = event.rrule;
|
var rule = event.rrule;
|
||||||
var dates = rule.between(today, future, true, limitFunction);
|
var dates = rule.between(today, future, true, limitFunction);
|
||||||
@ -108,7 +113,10 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
startDate: startDate.format("x"),
|
startDate: startDate.format("x"),
|
||||||
endDate: endDate.format("x"),
|
endDate: endDate.format("x"),
|
||||||
fullDayEvent: isFullDayEvent(event),
|
fullDayEvent: isFullDayEvent(event),
|
||||||
firstYear: event.start.getFullYear()
|
firstYear: event.start.getFullYear(),
|
||||||
|
location: location,
|
||||||
|
geo: geo,
|
||||||
|
description: description
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,10 +140,6 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var location = event.location || false;
|
|
||||||
var geo = event.geo || false;
|
|
||||||
|
|
||||||
// Every thing is good. Add it to the list.
|
// Every thing is good. Add it to the list.
|
||||||
|
|
||||||
newEvents.push({
|
newEvents.push({
|
||||||
@ -143,8 +147,9 @@ var CalendarFetcher = function(url, reloadInterval, maximumEntries, maximumNumbe
|
|||||||
startDate: startDate.format("x"),
|
startDate: startDate.format("x"),
|
||||||
endDate: endDate.format("x"),
|
endDate: endDate.format("x"),
|
||||||
fullDayEvent: fullDayEvent,
|
fullDayEvent: fullDayEvent,
|
||||||
location: location,
|
location: location,
|
||||||
geo: geo
|
geo: geo,
|
||||||
|
description: description
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user