From: Jan Schneider Date: Tue, 22 Dec 2009 18:47:18 +0000 (+0100) Subject: Avoid duplicate holiday events if a holiday is provided by more than one driver. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0c2c02a85d61989f38b0850a0a32798fad2340a6;p=horde.git Avoid duplicate holiday events if a holiday is provided by more than one driver. --- diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index e68b8b655..861189c3c 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -20,6 +20,7 @@ KronolithCore = { view: '', ecache: $H(), + holidays: [], tcache: $H(), efifo: {}, eventsLoading: {}, @@ -444,6 +445,8 @@ KronolithCore = { */ updateView: function(date, view, data) { + this.holidays = []; + switch (view) { case 'day': this.dayEvents = []; @@ -1133,6 +1136,12 @@ KronolithCore = { if (calendar != event.value.calendar) { return; } + if (calendar.startsWith('holiday|')) { + if (this.holidays.include(event.key)) { + return; + } + this.holidays.push(event.key); + } break; case 'year':