part of bug 286070, allday events are broken. r=gekacheka

This commit is contained in:
mvl%exedo.nl 2005-06-05 11:10:11 +00:00
Родитель b630c568fd
Коммит 6b54a46ccf
4 изменённых файлов: 8 добавлений и 12 удалений

Просмотреть файл

@ -750,7 +750,7 @@ CalendarView.prototype.getViewLimits = function calView_getViewLimits( dayDispla
var dateEnd = tmpDate.valueOf();
for ( var i = 0; i < dayDisplayEventList.length; i++ ) {
if( dayDisplayEventList[i].event.allDay != true ) {
if( dayDisplayEventList[i].event.isAllDay != true ) {
if( dayDisplayEventList[i].displayDate < dateStart ) {
sHour=0;
@ -798,7 +798,7 @@ CalendarView.prototype.setDrawProperties = function calView_setDrawProperties( d
var i;
for( i = 0; i < dayEventList.length; i++ )
if( !dayEventList[i].event.allDay) {
if( !dayEventList[i].event.isAllDay) {
dayEventStartList.push(dayEventList[i]);
dayEventEndList.push(dayEventList[i]);
}
@ -931,7 +931,7 @@ CalendarView.prototype.setAllDayDrawProperties = function calView_setAllDayDrawP
}
for( i = 0; i < eventList.length; i++ ) {
if( eventList[i].event.allDay) {
if( eventList[i].event.isAllDay) {
if( eventList[i].event.recur ) {
//get start time for correct occurrence

Просмотреть файл

@ -178,7 +178,7 @@ DayView.prototype.refreshEvents = function()
// Divide events into all day and other events
for( i = 0; i < dayEventList.length; i++ ) {
if ( dayEventList[i].event.allDay == true )
if ( dayEventList[i].event.isAllDay == true )
allDayEvents.push(dayEventList[i]);
else
normalEvents.push(dayEventList[i]);

Просмотреть файл

@ -484,8 +484,7 @@ function onOKCommand()
event.startDate = jsDateToDateTime(getElementValue("start-datetime"));
event.endDate = jsDateToDateTime(getElementValue("end-datetime"));
var endDate = getElementValue("end-datetime");
if (event.isAllDay)
{
if (event.isAllDay) {
// displayed all day end date is inclusive date, convert to exclusive end date.
endDate.setDate(endDate.getDate() + 1);
}

Просмотреть файл

@ -448,19 +448,16 @@ var treeView =
var eventStartDate = calendarEvent.startDate.jsDate;
// XXX reimplement
//var eventStartDate = getCurrentNextOrPreviousRecurrence( calendarEvent );
return formatUnifinderEventDateTime(eventStartDate, calendarEvent.allDay);
return formatUnifinderEventDateTime(eventStartDate, calendarEvent.isAllDay);
case "unifinder-search-results-tree-col-enddate":
var eventEndDate = calendarEvent.endDate.jsDate;
// XXX reimplement
//var eventEndDate = getCurrentNextOrPreviousRecurrence( calendarEvent );
var eventLength = calendarEvent.endDate.jsDate.getTime() - calendarEvent.startDate.jsDate.getTime();
var actualEndDate = eventEndDate.getTime() + eventLength;
eventEndDate = new Date( actualEndDate );
if (calendarEvent.allDay) // display enddate is ical enddate - 1
if (calendarEvent.isAllDay) // display enddate is ical enddate - 1
//user-enddate is ical-enddate - 1
eventEndDate.setDate( eventEndDate.getDate() - 1 );
return formatUnifinderEventDateTime(eventEndDate, calendarEvent.allDay);
return formatUnifinderEventDateTime(eventEndDate, calendarEvent.isAllDay);
case "unifinder-search-results-tree-col-categories":
return( calendarEvent.categories );