Fix bug 938459 - Lightning Calendar Edit Events : Unable to update changes to invited attendees. r=makemyday,a=philipp
authorPhilipp Kewisch <mozilla@kewis.ch>
Mon, 24 Mar 2014 11:10:27 +0100
changeset 16096 0fc420befbfe6e1baa0a0990a418fe69a15537fd
parent 16095 e49d1ca3ab589f3e3f4432e20751fc3c0036e314
child 16097 710fcab096a8b43e36f83d770d11ea35354d6527
push id51
push usermozilla@kewis.ch
push dateMon, 24 Mar 2014 10:11:14 +0000
reviewersmakemyday, philipp
bugs938459
Fix bug 938459 - Lightning Calendar Edit Events : Unable to update changes to invited attendees. r=makemyday,a=philipp
calendar/itip/calItipEmailTransport.js
--- a/calendar/itip/calItipEmailTransport.js
+++ b/calendar/itip/calItipEmailTransport.js
@@ -187,17 +187,21 @@ calItipEmailTransport.prototype = {
                 cal.LOG("sendXpcomMail: Found USER autoResponse type.\n" +
                         "This type is currently unsupported, the compose API will always enter a text/plain\n" +
                         "or text/html part as first part of the message.\n" +
                         "This will disable OL (up to 2003) to consume the mail as an iTIP invitation showing\n" +
                         "the usual calendar buttons.");
                 // To somehow have a last resort before sending spam, the user can choose to send the mail.
                 let prefCompatMode = cal.getPrefSafe("calendar.itip.compatSendMode", 0);
                 let inoutCheck = { value: (prefCompatMode == 1) };
-                if (Services.prompt.confirmEx(null,
+                let parent = Services.wm.getMostRecentWindow(null);
+                if (parent.closed) {
+                    parent = cal.getCalendarWindow();
+                }
+                if (Services.prompt.confirmEx(parent,
                                               cal.calGetString("lightning", "imipSendMail.title", null, "lightning"),
                                               cal.calGetString("lightning", "imipSendMail.text", null, "lightning"),
                                               Services.prompt.STD_YES_NO_BUTTONS,
                                               null,
                                               null,
                                               null,
                                               cal.calGetString("lightning", "imipSendMail.Outlook2000CompatMode.text", null, "lightning"),
                                               inoutCheck)) {