Fix view changes in calendar module

Fixes #2613
pull/17/head
Francis Lachapelle 2014-02-21 20:35:54 -05:00
parent 070d3dd825
commit be36e0ceea
2 changed files with 5 additions and 3 deletions

4
NEWS
View File

@ -2,6 +2,7 @@
------------------
New features
- initial implementation of Microsoft ActiveSync protocol
- it's now possible to set a default reminder for calendar components
using SOGoCalendarDefaultReminder
- select multiple files to attach to a message or drag'n'drop files onto the
@ -12,7 +13,7 @@ New features
Enhancements
- we now automatically convert <img src=data...> into file attachments
using CIDs. This prevents Outlook issues.
using CIDs to prevent Outlook issues
- updated French and Finnish translations
- XMLHttpRequest.js is now loaded conditionaly (< IE9)
- format time in attendees invitation window according to the user's locale
@ -48,6 +49,7 @@ Bug fixes
- replace slashes by dashes in filenames of attachments to avoid a 404 return code (#2537)
- avoid over-using LDAP connections when decomposing groups
- fixed display of a contact's birthday when not defined (#2503)
- fixed JavaScript error when switching views in calendar module (#2613)
2.1.1b (2013-12-04)
-------------------

View File

@ -2526,7 +2526,7 @@ function restoreSelectedDay() {
selectedDayDate = findDateFromDayNumber(selectedDayNumber);
else
selectedDayDate = currentDay;
if (selectedDayDate.length > 0)
if (selectedDayDate && selectedDayDate.length > 0)
day = $("day" + selectedDayDate);
}
if (day) {
@ -2542,7 +2542,7 @@ function findDateFromDayNumber(dayNumber) {
else
view = $("daysView");
var days = view.select(".day");
return days[dayNumber].readAttribute("day");
return (dayNumber < days.size()) ? days[dayNumber].readAttribute("day") : null;
}
function onShowCompletedTasks(event) {