Bug 1291991 - Fix attendees context menu missing email items;r=MakeMyDay;a=Philipp
authorPaul Morris <paul@paulwmorris.com>
Thu, 04 Aug 2016 22:51:07 +0200
changeset 27479 c8098a508a25b9e2ab20d674d4184f80ed0a45b0
parent 27478 1998005e0ed9b5cb4ccb4a10d8fcc80bda29e24b
child 27480 767d9f98e5e3a64232b0a994b6b9f0b34494a50b
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMakeMyDay, Philipp
bugs1291991
Bug 1291991 - Fix attendees context menu missing email items;r=MakeMyDay;a=Philipp
calendar/base/content/dialogs/calendar-event-dialog.js
--- a/calendar/base/content/dialogs/calendar-event-dialog.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog.js
@@ -3686,29 +3686,34 @@ function attendeeClick(aEvent) {
         for (let node of popup.childNodes) {
             (node == invite) ? showElement(node) : hideElement(node);
         }
     } else {
         if (window.attendees.length > 1) {
             let removeall = document.getElementById("attendee-popup-removeallattendees-menuitem");
             showElement(removeall);
         }
-        // setup attendee specific menu items if appropriate otherwise hide respective  menu items
+        let sendEmail = document.getElementById("attendee-popup-sendemail-menuitem");
+        let sendTentativeEmail = document.getElementById("attendee-popup-sendtentativeemail-menuitem");
+        let firstSeparator = document.getElementById("attendee-popup-first-separator");
+        [sendEmail, sendTentativeEmail, firstSeparator].forEach(showElement);
+
+        // setup attendee specific menu items if appropriate otherwise hide respective menu items
         let mailto = document.getElementById("attendee-popup-emailattendee-menuitem");
         let remove = document.getElementById("attendee-popup-removeattendee-menuitem");
-        let separator = document.getElementById("attendee-popup-second-separator");
+        let secondSeparator = document.getElementById("attendee-popup-second-separator");
         let attId = aEvent.target.parentNode.getAttribute("attendeeid");
         let attendee = window.attendees.find(aAtt => aAtt.id == attId);
         if (attendee) {
-            [mailto, remove, separator].forEach(showElement);
+            [mailto, remove, secondSeparator].forEach(showElement);
             mailto.setAttribute("label", attendee.toString());
             mailto.attendee = attendee;
             remove.attendee = attendee;
         } else {
-            [mailto, remove, separator].forEach(hideElement);
+            [mailto, remove, secondSeparator].forEach(hideElement);
         }
 
         if (window.attendees.some(isAttendeeUndecided)) {
             document.getElementById("cmd_email_undecided")
                     .removeAttribute("disabled");
         } else {
             document.getElementById("cmd_email_undecided")
                     .setAttribute("disabled", "true");