loadCalendar: function(type, calendar)
{
if (Kronolith.conf.calendars[type][calendar].show &&
- $w('day week month year').include(this.view)) {
+ $w('day week month year agenda').include(this.view)) {
var dates = this.viewDates(this.date, this.view);
this.deleteCache(null, [type, calendar]);
this.loadEvents(dates[0], dates[1], this.view, [[type, calendar]]);
switch (this.view) {
case 'month':
+ case 'agenda':
if (Object.isUndefined(this.ecache.get(type)) ||
Object.isUndefined(this.ecache.get(type).get(calendar))) {
this.loadCalendar(type, calendar);
var allEvents = $('kronolithBody').select('div').findAll(function(el) {
return el.retrieve('calendar') == type + '|' + calendar;
});
- if (Kronolith.conf.max_events) {
+ if (this.view == 'month' && Kronolith.conf.max_events) {
var dates = this.viewDates(this.date, this.view);
if (elt.hasClassName('kronolithCalOff')) {
var day, more, events, calendars = [];
if (this.view == 'day' ||
this.view == 'week' ||
this.view == 'month' ||
+ this.view == 'agenda' ||
(this.view == 'year' && !$H(this.eventsLoading).size())) {
this.insertEvents(dates, this.view, r.response.cal);
}
}
this.holidays.push(event.key);
}
- if (Kronolith.conf.max_events) {
+ if (view == 'month' && Kronolith.conf.max_events) {
more = $('kronolithMonthDay' + date).down('.kronolithMore');
if (more) {
more.purge();