From 37548063cc868eaefb23ad4d498d3b3e47cea637 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Fri, 19 Nov 2010 18:44:28 +0100 Subject: [PATCH] Don't try to display events if calendar is not displayed. --- kronolith/js/kronolith.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kronolith/js/kronolith.js b/kronolith/js/kronolith.js index 92d828078..217d70acb 100644 --- a/kronolith/js/kronolith.js +++ b/kronolith/js/kronolith.js @@ -1448,6 +1448,12 @@ KronolithCore = { } delete this.eventsLoading[r.response.cal]; + // Check if the calendar is still visible. + var calendar = r.response.cal.split('|'); + if (!Kronolith.conf.calendars[calendar[0]][calendar[1]].show) { + return; + } + // Check if the result is still for the current view. currentDates = this.viewDates(this.date, this.view); if (r.response.view != this.view || @@ -3746,6 +3752,10 @@ KronolithCore = { { if (calendar) { var cals = calendar.split('|'); + if (!this.ecache.get(cals[0]) || + !this.ecache.get(cals[0]).get(cals[1])) { + return $H(); + } return this.ecache.get(cals[0]).get(cals[1]).get(date); } -- 2.11.0