diff --git a/calendar/resources/content/clipboard.js b/calendar/resources/content/clipboard.js index 43ac8181fa33..99f0bc0e3ab4 100644 --- a/calendar/resources/content/clipboard.js +++ b/calendar/resources/content/clipboard.js @@ -224,7 +224,8 @@ function pasteFromClipboard() calendarEventArray[i].start.setTime( startDate ); calendarEventArray[i].end.setTime( endDateTime ); } - addEventsToCalendar( calendarEventArray ); + // LINAGORA (We don't want to have to edit the event again) + addEventsToCalendar( calendarEventArray, 1 ); break; case "text/unicode": if ( data.indexOf("BEGIN:VEVENT") == -1 ) @@ -250,7 +251,8 @@ function pasteFromClipboard() calendarEventArray[i].end.setTime( endDateTime ); } - addEventsToCalendar( calendarEventArray ); + // LINAGORA (We don't want to have to edit the event again) + addEventsToCalendar( calendarEventArray, 1 ); } break; default: diff --git a/calendar/resources/content/dragDrop.js b/calendar/resources/content/dragDrop.js index d81847c39bdc..00b7ace2b098 100644 --- a/calendar/resources/content/dragDrop.js +++ b/calendar/resources/content/dragDrop.js @@ -250,7 +250,9 @@ var calendarViewDNDObserver = { calendarEvent.start.setTime(gDropzoneStartTime.getTime() ); calendarEvent.end.setTime ( calendarEvent.start.getTime() + eventDuration ); - gICalLib.modifyEvent( calendarEvent ); + // LINAGORA: Needed to update remote calendar + modifyEventDialogResponse( calendarEvent, calendarEvent.parent.server ); + // gICalLib.modifyEvent( calendarEvent ); } else alert(" Event with id: " + dropEvent.id + " not found"); @@ -373,8 +375,8 @@ var calendarViewDNDObserver = { var fileObj = dataObj.value.QueryInterface(Components.interfaces.nsIFile); var aDataStream = readDataFromFile( fileObj.path ); var calendarEventArray = parseIcalData( aDataStream ); - // TODO Move to calendarImportExport to have the option to turn off dialogs - addEventsToCalendar( calendarEventArray ); + // LINAGORA (- TODO Move to calendarImportExport to have the option to turn off dialogs) + addEventsToCalendar( calendarEventArray, 1 ); } catch(ex) { alert(ex.message); diff --git a/calendar/resources/content/importExport.js b/calendar/resources/content/importExport.js index 6c08701ef2c0..606fb9fccbb8 100644 --- a/calendar/resources/content/importExport.js +++ b/calendar/resources/content/importExport.js @@ -264,7 +264,9 @@ function addEventsToCalendar( calendarEventArray, silent, ServerName ) ServerName = gCalendarWindow.calendarManager.getDefaultServer(); } } - gICalLib.addEvent( calendarEvent, ServerName ); + // LINAGORA (We need to see the new added event in the window and to update remote cal) + addEventDialogResponse( calendarEvent, ServerName ); + /* gICalLib.addEvent( calendarEvent, ServerName ); */ } else editNewEvent( calendarEvent ); diff --git a/calendar/resources/content/monthView.js b/calendar/resources/content/monthView.js index 02aa0911696f..a692851d2b2d 100644 --- a/calendar/resources/content/monthView.js +++ b/calendar/resources/content/monthView.js @@ -1056,7 +1056,9 @@ var monthViewEventDragAndDropObserver = { eventToCopy.recurWeekdays = eventToCopy.recurWeekdays << Difference; } - gICalLib.addEvent( eventToCopy, gEventBeingDragged.parent.server ); + // LINAGORA: Needed to update remote calendar + addEventDialogResponse( eventToCopy, gEventBeingDragged.parent.server ); + //gICalLib.addEvent( eventToCopy, gEventBeingDragged.parent.server ); } else { @@ -1067,7 +1069,9 @@ var monthViewEventDragAndDropObserver = { { gEventBeingDragged.recurWeekdays = gEventBeingDragged.recurWeekdays << Difference; } - gICalLib.modifyEvent( gEventBeingDragged, gEventBeingDragged.parent.server ); + // LINAGORA: Needed to update remote calendar + modifyEventDialogResponse( gEventBeingDragged, gEventBeingDragged.parent.server ); + //gICalLib.modifyEvent( gEventBeingDragged, gEventBeingDragged.parent.server ); } } };