Fixing so that import an event goes into the currently selected calendar, bug 188216.
git-svn-id: svn://10.0.0.236/trunk@136439 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
61be5cc169
commit
ab538a8ac3
@ -257,8 +257,29 @@ function addEventsToCalendar( calendarEventArray, silent, ServerName )
|
||||
if( silent )
|
||||
{
|
||||
if( ServerName == null || ServerName == "" || ServerName == false )
|
||||
var ServerName = gCalendarWindow.calendarManager.getDefaultServer();
|
||||
|
||||
{
|
||||
//see if there's a server selected in the calendar window first
|
||||
//get the selected calendar
|
||||
if( document.getElementById( "list-calendars-listbox" ) )
|
||||
{
|
||||
var selectedCalendarItem = document.getElementById( "list-calendars-listbox" ).selectedItem;
|
||||
|
||||
if( selectedCalendarItem )
|
||||
{
|
||||
ServerName = selectedCalendarItem.getAttribute( "calendarPath" );
|
||||
}
|
||||
else
|
||||
{
|
||||
//otherwise use the default
|
||||
var ServerName = gCalendarWindow.calendarManager.getDefaultServer();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//otherwise use the default
|
||||
var ServerName = gCalendarWindow.calendarManager.getDefaultServer();
|
||||
}
|
||||
}
|
||||
gICalLib.addEvent( calendarEvent, ServerName );
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user