Commit 2f4aa8b3 authored by Luko van der Maas's avatar Luko van der Maas
Browse files

Merge branch 'fix/events-list-upcoming-only' into 'master'

Only really show upcoming events in the upcoming events view

See merge request !1106
parents 72b9036d d062a83c
...@@ -9,6 +9,16 @@ ListView = View.extend({ ...@@ -9,6 +9,16 @@ ListView = View.extend({
return this.title; return this.title;
}, },
fetchInitialEvents: function (dateProfile) {
var calendar = this.calendar;
var today = new Date();
return calendar.requestEvents(
calendar.msToMoment(Date.UTC(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0), false),
calendar.msToMoment(Date.UTC(today.getFullYear() + 2, today.getMonth(), today.getDate(), 0, 0, 0), false)
);
},
renderEvents: function (events) { renderEvents: function (events) {
var root = $("<div>").addClass("accordion bordered"); var root = $("<div>").addClass("accordion bordered");
......
...@@ -11,12 +11,12 @@ function checkResponsiveState(calendarElement, windowWidth, view) { ...@@ -11,12 +11,12 @@ function checkResponsiveState(calendarElement, windowWidth, view) {
calendarElement.fullCalendar('removeEventSource', SOURCES.birthdays); calendarElement.fullCalendar('removeEventSource', SOURCES.birthdays);
if (windowWidth <= 768) { if (windowWidth <= 768) {
calendarElement.fullCalendar('option', 'header', { calendarElement.fullCalendar('option', 'header', {
right: 'today' right: ''
}); });
} else { } else {
if (view.name === 'list') { if (view.name === 'list') {
calendarElement.fullCalendar('option', 'header', { calendarElement.fullCalendar('option', 'header', {
right: 'list,agendaWeek,month today' right: 'list,agendaWeek,month'
}); });
} else { } else {
if (Cookies.get(BIRTHDAYS_COOKIE)) { if (Cookies.get(BIRTHDAYS_COOKIE)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment