зеркало из https://github.com/mozilla/gecko-dev.git
Checked in patch for bug 247864
This commit is contained in:
Родитель
6e3296f240
Коммит
1c05273289
|
@ -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.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче