зеркало из https://github.com/mozilla/pjs.git
Checked in attachment #135921 and attachment 135927 for
bug 210236: [RFE] Currently selected event should be highlighed in the calendar window
This commit is contained in:
Родитель
167eb55b0f
Коммит
d80811ad81
|
@ -392,7 +392,7 @@ function weekEventItemClick( eventBox, event )
|
|||
|
||||
newDate.setDate( eventBox.calendarEventDisplay.event.start.day );
|
||||
|
||||
gCalendarWindow.setSelectedDate( newDate );
|
||||
gCalendarWindow.setSelectedDate( newDate, false );
|
||||
}
|
||||
|
||||
if ( event )
|
||||
|
|
|
@ -114,10 +114,26 @@ function WeekView( calendarWindow )
|
|||
{
|
||||
onSelectionChanged : function( EventSelectionArray )
|
||||
{
|
||||
for( i = 0; i < EventSelectionArray.length; i++ )
|
||||
{
|
||||
gCalendarWindow.weekView.selectBoxForEvent( EventSelectionArray[i] );
|
||||
}
|
||||
if( EventSelectionArray.length > 0 )
|
||||
{
|
||||
//if there are selected events.
|
||||
|
||||
//for some reason, this function causes the tree to go into a select / unselect loop
|
||||
//putting it in a settimeout fixes this.
|
||||
setTimeout( "gCalendarWindow.weekView.clearSelectedDate();", 1 );
|
||||
|
||||
var i = 0;
|
||||
|
||||
for( i = 0; i < EventSelectionArray.length; i++ )
|
||||
{
|
||||
gCalendarWindow.weekView.selectBoxForEvent( EventSelectionArray[i] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//select the proper day
|
||||
gCalendarWindow.weekView.hiliteSelectedDate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче