mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 06:38:36 +00:00
Checked in patch for bug 234463: double-clicking empty event list area
opens malfunctioning Edit Event dialog
This commit is contained in:
parent
50e37c149c
commit
ad3540b59d
@ -687,6 +687,9 @@ function newEvent( startDate, endDate )
|
||||
// create a new event to be edited and added
|
||||
var calendarEvent = createEvent();
|
||||
|
||||
if( !startDate )
|
||||
startDate = gCalendarWindow.currentView.getNewEventDate();
|
||||
|
||||
calendarEvent.start.setTime( startDate );
|
||||
|
||||
if( !endDate )
|
||||
|
@ -253,11 +253,9 @@ function unifinderDoubleClickEvent( event )
|
||||
var calendarEvent = getCalendarEventFromEvent( event );
|
||||
|
||||
if( calendarEvent != null )
|
||||
{
|
||||
// go to day view, of the day of the event, select the event
|
||||
|
||||
editEvent( calendarEvent );
|
||||
}
|
||||
else
|
||||
newEvent();
|
||||
}
|
||||
|
||||
|
||||
@ -270,11 +268,10 @@ function getCalendarEventFromEvent( event )
|
||||
|
||||
if( row.value != -1 && row.value < tree.view.rowCount )
|
||||
{
|
||||
var event = tree.eventView.getCalendarEventAtRow( row.value );
|
||||
return event;
|
||||
return ( tree.eventView.getCalendarEventAtRow( row.value ) );
|
||||
} else {
|
||||
return ( null );
|
||||
}
|
||||
|
||||
return( false );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user