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 27371 f392635ba8883345195b4584724dab01c5e08d53
parent 27370 555845fa3750c03c5c7dc90c8fbfa0ac65f5c2c2
child 27372 8f54e69715f50f817ced01988d8b1b236956d093
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");