- Type: 'ToDo',\r
- StartRange: (new Date(now.getFullYear() - 1, now.getMonth(), now.getDate(), 0, 0, 0)),\r
- EndRange: (new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 1))\r
+ StartRange: (new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0)),
+ EndRange: (new Date(now.getFullYear(), now.getMonth() + config['monthRange'].Value, now.getDate(), 0, 0, 0))
+ }
+ }
+ var meetingResult = calendarService.IDataSource.GetList(meetingListFiltering);
+ if (meetingResult.ErrorCode != 0)
+ throw("Error fetching calendar data: " + meetingResult.ErrorCode + ': ' + meetingResult.ErrorMessage);
+ var list = meetingResult.ReturnValue;
+ meetingList = meetingList.concat(listToArray(list, calendarList[i]));
+ }
+ log("updateData(): meetingList.sort()");
+ meetingList.sort(sortCalendarEntries);
+
+ // todos don't, they start on 00:00 hrs., but should be visible anyway
+ // this will generate a list of passed todos. We have to check if they have been marked as "done" yet
+ if (config['includeTodos'].Value) {
+ var todayTodoList = [];
+ for(var i=0; i < calendarList.length; i++) {
+ // ignore excluded calendars
+ if (config['excludedCalendars'].Value.indexOf(calendarList[i]) != -1)
+ continue;
+ var todayTodoListFiltering = {
+ Type:'CalendarEntry',
+ Filter:{
+ CalendarName: calendarList[i],
+ Type: 'ToDo',
+ StartRange: (new Date(now.getFullYear() - 1, now.getMonth(), now.getDate(), 0, 0, 0)),
+ EndRange: (new Date(now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 1))
+ }