Checked in patch for bug 247864

This commit is contained in:
mostafah%oeone.com 2004-06-22 15:53:32 +00:00
Родитель 6e3296f240
Коммит 1c05273289
1 изменённых файлов: 8 добавлений и 5 удалений

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

@ -575,15 +575,18 @@ CalendarEventDataSource.prototype.orderToDosByDueDate = function calEvent_orderT
CalendarEventDataSource.prototype.orderEventsByDisplayDate = function calEvent_orderEventsByDisplayDate( eventA, eventB ) CalendarEventDataSource.prototype.orderEventsByDisplayDate = function calEvent_orderEventsByDisplayDate( eventA, eventB )
{ {
var r=eventA.displayDate - eventB.displayDate; var r=eventA.displayDate - eventB.displayDate;
if (r==0) if (r==0) {
{ var titleA = eventTitleOrEmpty(eventA);
if ( eventA.title < eventB.title ) r=-1; var titleB = eventTitleOrEmpty(eventB);
if ( eventA.title > eventB.title ) r=1; return ( titleA < titleB ? -1 :
titleA > titleB ? 1 : 0);
} }
return(r); return(r);
} }
function eventTitleOrEmpty(event) {
return ("title" in event && event.title != null) ? event.title : "";
}
/** PACKAGE STATIC /** PACKAGE STATIC
* CalendarEvent orderRawEventsByDate. * CalendarEvent orderRawEventsByDate.