From 0c2c02a85d61989f38b0850a0a32798fad2340a6 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 22 Dec 2009 19:47:18 +0100 Subject: [PATCH] Avoid duplicate holiday events if a holiday is provided by more than one driver. --- kronolith/js/kronolith.js | 9 +++++++++ 1 file changed, 9 insertions(+) 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': -- 2.11.0