From: Jan Schneider Date: Fri, 19 Nov 2010 17:44:28 +0000 (+0100) Subject: Don't try to display events if calendar is not displayed. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=37548063cc868eaefb23ad4d498d3b3e47cea637;p=horde.git Don't try to display events if calendar is not displayed. --- 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); }