diff --git a/calendar/resources/content/calendar.js b/calendar/resources/content/calendar.js index eaba3c1ed545..69efef6bb8da 100644 --- a/calendar/resources/content/calendar.js +++ b/calendar/resources/content/calendar.js @@ -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 ) diff --git a/calendar/resources/content/unifinder.js b/calendar/resources/content/unifinder.js index ca0e37802ddc..9b97b5d90067 100644 --- a/calendar/resources/content/unifinder.js +++ b/calendar/resources/content/unifinder.js @@ -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 ); } /**