rem:  if ("editEvent" in window) {  editEvent(); } else {  itemToEdit = getOccurrenceOrParent(aOccurrence); modifyEventWithDialog(itemToEdit); } 
add: modifyEventWithDialog(itemToEdit); 
context:     modifyOccurrence: function (aOccurrence, aNewStartTime, aNewEndTime) {        // if we can modify this thing directly (e.g. just the time changed),        // then do so; otherwise pop up the dialog        var itemToEdit;        if (aNewStartTime && aNewEndTime) {            itemToEdit = getOccurrenceOrParent(aOccurrence);            if (!itemToEdit) {                return;            }            var instance = itemToEdit.clone();            // if we're about to modify the parentItem, we need to account            // for the possibility that the item passed as argument was            // some other occurrence, but the user said she would like to            // modify all ocurrences instead.  In that case, we need to figure            // out how much the occurrence moved, and move the occurrence by            // that amount.            if (instance.parentItem.hasSameIds(instance)) {                // Figure out how much the start has moved, and adjust                 // aNewStartTime so that the parent moves the same amuount.                var instanceStart = instance.startDate || instance.entryDate;                var occStart = aOccurrence.startDate || aOccurrence.entryDate;                var startDiff = instanceStart.subtractDate(occStart);                aNewStartTime = aNewStartTime.clone();                aNewStartTime.addDuration(startDiff);                // Now do the same for end                var instanceEnd = instance.endDate || instance.dueDate;                var occEnd = aOccurrence.endDate || aOccurrence.dueDate;                var endDiff = instanceEnd.subtractDate(occEnd);                aNewEndTime = aNewEndTime.clone();                aNewEndTime.addDuration(endDiff);            }            // Yay for variable names that make this next line look silly            if (instance instanceof Components.interfaces.calIEvent) {                instance.startDate = aNewStartTime;                instance.endDate = aNewEndTime;            } else {                instance.entryDate = aNewStartTime;                instance.dueDate = aNewEndTime;            }            doTransaction('modify', instance, instance.calendar, itemToEdit, null);        } else {            //XXX unify these            if ("editEvent" in window) {                // Sunbird specific code                editEvent();            } else {                // Lightning specific code                itemToEdit = getOccurrenceOrParent(aOccurrence);                modifyEventWithDialog(itemToEdit);            }        }    },
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/afcdab601eaab9336408b51da7c347e49c7f692a/calendar-views.js/buggy/calendar/base/content/calendar-views.js