No bug - fix some white-space issues in calendar; rs=white-space-only
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 11 Oct 2018 20:33:45 +1300
changeset 33349 93e1d2a5aa87eaa625f0c7354076ccf13f20177e
parent 33348 79048c9f59b451f786f7c9d50cca186f19b99d60
child 33350 7f3ce4f1b0a119e9428bbda4391765f009396368
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewerswhite-space-only
No bug - fix some white-space issues in calendar; rs=white-space-only
calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
@@ -376,22 +376,22 @@
 
             return null;
         ]]></getter>
       </property>
 
       <method name="_resolveListByName">
         <parameter name="value"/>
         <body><![CDATA[
-              let entries = MailServices.headerParser.makeFromDisplayAddress(value);
-              return entries.length ? this._findListInAddrBooks(entries[0].name) : null;
-          ]]></body>
-    </method>
+            let entries = MailServices.headerParser.makeFromDisplayAddress(value);
+            return entries.length ? this._findListInAddrBooks(entries[0].name) : null;
+        ]]></body>
+      </method>
 
-    <method name="_findListInAddrBooks">
+      <method name="_findListInAddrBooks">
         <parameter name="entryname"/>
         <body><![CDATA[
             let allAddressBooks = MailServices.ab.directories;
 
             while (allAddressBooks.hasMoreElements()) {
                 let abDir = null;
                 try {
                     abDir = allAddressBooks.getNext()
@@ -413,106 +413,104 @@
                         if (dir && dir.isMailList && (dir.dirName == entryname)) {
                             return dir;
                         }
                     }
                 }
             }
             return null;
         ]]></body>
-    </method>
+      </method>
 
-    <method name="_getListEntriesInt">
+      <method name="_getListEntriesInt">
         <parameter name="mailingList"/>
         <parameter name="attendees"/>
         <parameter name="allListsUri"/>
         <body><![CDATA[
-              let addressLists = mailingList.addressLists;
-              for (let i = 0; i < addressLists.length; i++) {
-                  let abCard = addressLists.queryElementAt(i, Components.interfaces.nsIAbCard);
-                  let thisId = abCard.primaryEmail;
-                  if (abCard.displayName.length > 0) {
-                      let rCn = abCard.displayName;
-                      if (rCn.includes(",")) {
-                          rCn = '"' + rCn + '"';
-                      }
-                      thisId = rCn + " <" + thisId + ">";
-                  }
-                  if (attendees.some(att => att == thisId)) {
-                      continue;
-                  }
+            let addressLists = mailingList.addressLists;
+            for (let i = 0; i < addressLists.length; i++) {
+                let abCard = addressLists.queryElementAt(i, Components.interfaces.nsIAbCard);
+                let thisId = abCard.primaryEmail;
+                if (abCard.displayName.length > 0) {
+                    let rCn = abCard.displayName;
+                    if (rCn.includes(",")) {
+                        rCn = '"' + rCn + '"';
+                    }
+                    thisId = rCn + " <" + thisId + ">";
+                }
+                if (attendees.some(att => att == thisId)) {
+                    continue;
+                }
 
-                  if (abCard.displayName.length > 0) {
-                      let list = this._findListInAddrBooks(abCard.displayName);
-                      if (list) {
-                          if (allListsUri.some(uri => uri == list.URI)) {
-                              continue;
-                          }
-                          allListsUri.push(list.URI);
+                if (abCard.displayName.length > 0) {
+                    let list = this._findListInAddrBooks(abCard.displayName);
+                    if (list) {
+                        if (allListsUri.some(uri => uri == list.URI)) {
+                            continue;
+                        }
+                        allListsUri.push(list.URI);
 
-                          this._getListEntriesInt(list, attendees, allListsUri);
+                        this._getListEntriesInt(list, attendees, allListsUri);
 
-                          continue;
-                      }
-                  }
+                        continue;
+                    }
+                }
 
-                  attendees.push(thisId);
-              }
+                attendees.push(thisId);
+            }
 
-              return attendees;
-          ]]></body>
-    </method>
+            return attendees;
+        ]]></body>
+      </method>
 
-    <method name="_getListEntries">
+      <method name="_getListEntries">
         <parameter name="mailingList"/>
         <body><![CDATA[
+            let attendees = [];
+            let allListsUri = [];
 
-              let attendees = [];
-              let allListsUri = [];
-
-              allListsUri.push(mailingList.URI);
+            allListsUri.push(mailingList.URI);
 
-              this._getListEntriesInt(mailingList, attendees, allListsUri);
-
-              return attendees;
+            this._getListEntriesInt(mailingList, attendees, allListsUri);
 
-          ]]></body>
-    </method>
+            return attendees;
+        ]]></body>
+      </method>
 
-    <method name="_fillListItemWithEntry">
+      <method name="_fillListItemWithEntry">
         <parameter name="listitem"/>
         <parameter name="entry"/>
         <parameter name="rowNumber"/>
         <body><![CDATA[
-              let newAttendee = this.createAttendee(entry);
-              let input = listitem.querySelector(".textbox-addressingWidget");
-              input.removeAttribute("disabled");
+            let newAttendee = this.createAttendee(entry);
+            let input = listitem.querySelector(".textbox-addressingWidget");
+            input.removeAttribute("disabled");
 
-              input.attendee = newAttendee;
-              input.value = entry;
-              input.setAttribute("value", entry);
-              input.setAttribute("dirty", "true");
-              if (input.getAttribute("focused") != "") {
-                  input.removeAttribute("focused");
-              }
+            input.attendee = newAttendee;
+            input.value = entry;
+            input.setAttribute("value", entry);
+            input.setAttribute("dirty", "true");
+            if (input.getAttribute("focused") != "") {
+                input.removeAttribute("focused");
+            }
 
-              let roleStatusIcon = listitem.querySelector(".status-icon");
-              roleStatusIcon.removeAttribute("disabled");
-              roleStatusIcon.setAttribute("class", "role-icon");
-              roleStatusIcon.setAttribute("role", newAttendee.role);
+            let roleStatusIcon = listitem.querySelector(".status-icon");
+            roleStatusIcon.removeAttribute("disabled");
+            roleStatusIcon.setAttribute("class", "role-icon");
+            roleStatusIcon.setAttribute("role", newAttendee.role);
 
-              let userTypeIcon = listitem.querySelector(".usertype-icon");
-              userTypeIcon.removeAttribute("disabled");
-              userTypeIcon.setAttribute("cutype", newAttendee.userType);
-          ]]></body>
-    </method>
+            let userTypeIcon = listitem.querySelector(".usertype-icon");
+            userTypeIcon.removeAttribute("disabled");
+            userTypeIcon.setAttribute("cutype", newAttendee.userType);
+        ]]></body>
+      </method>
 
-    <method name="resolvePotentialList">
-      <parameter name="aInput"/>
-      <body><![CDATA[
+      <method name="resolvePotentialList">
+        <parameter name="aInput"/>
+        <body><![CDATA[
             let fieldValue = aInput.value;
             if (aInput.id.length > 0 && fieldValue.length > 0) {
                 let mailingList = this._resolveListByName(fieldValue);
                 if (mailingList) {
                     let entries = this._getListEntries(mailingList);
                     if (entries.length > 0) {
                         let currentIndex = parseInt(aInput.id.substr(13), 10);
                         let template = this.querySelector(".addressingWidgetItem");
@@ -565,53 +563,53 @@
 
             let event = document.createEvent("Events");
             event.initEvent("modify", true, false);
             event.details = list;
             this.dispatchEvent(event);
         ]]></body>
       </method>
 
-     <method name="updateTooltip">
-      <parameter name="targetIcon"/>
-      <body><![CDATA[
-          // Function setting the tooltip of attendeeicons based on their role
-          if (targetIcon.classList.contains("role-icon")) {
-              let role = targetIcon.getAttribute("role");
-              // Set tooltip for rolenames
+      <method name="updateTooltip">
+        <parameter name="targetIcon"/>
+        <body><![CDATA[
+            // Function setting the tooltip of attendeeicons based on their role
+            if (targetIcon.classList.contains("role-icon")) {
+                let role = targetIcon.getAttribute("role");
+                // Set tooltip for rolenames
 
-              const roleMap = {
-                  "REQ-PARTICIPANT": "required",
-                  "OPT-PARTICIPANT": "optional",
-                  "NON-PARTICIPANT": "nonparticipant",
-                  "CHAIR": "chair"
-              };
+                const roleMap = {
+                    "REQ-PARTICIPANT": "required",
+                    "OPT-PARTICIPANT": "optional",
+                    "NON-PARTICIPANT": "nonparticipant",
+                    "CHAIR": "chair"
+                };
 
-              let roleNameString = "event.attendee.role." + (role in roleMap ? roleMap[role] : "unknown");
-              let tooltip = cal.l10n.getString("calendar-event-dialog-attendees",
-                                               roleNameString,
-                                               role in roleMap ? []: [role]);
-              targetIcon.setAttribute("tooltiptext", tooltip);
-          } else if (targetIcon.classList.contains("usertype-icon")) {
-              let cutype = targetIcon.getAttribute("cutype");
-              const cutypeMap = {
-                  INDIVIDUAL: "individual",
-                  GROUP: "group",
-                  RESOURCE: "resource",
-                  ROOM: "room",
-                  // I've decided UNKNOWN will not be handled.
-              };
+                let roleNameString = "event.attendee.role." + (role in roleMap ? roleMap[role] : "unknown");
+                let tooltip = cal.l10n.getString("calendar-event-dialog-attendees",
+                                                 roleNameString,
+                                                 role in roleMap ? []: [role]);
+                targetIcon.setAttribute("tooltiptext", tooltip);
+            } else if (targetIcon.classList.contains("usertype-icon")) {
+                let cutype = targetIcon.getAttribute("cutype");
+                const cutypeMap = {
+                    INDIVIDUAL: "individual",
+                    GROUP: "group",
+                    RESOURCE: "resource",
+                    ROOM: "room",
+                    // I've decided UNKNOWN will not be handled.
+                };
 
-              let cutypeString = "event.attendee.usertype." + (cutype in cutypeMap ? cutypeMap[cutype] : "unknown");
-              let tooltip = cal.l10n.getString("calendar-event-dialog-attendees",
-                                               cutypeString,
-                                               cutype in cutypeMap ? [] : [cutype]);
-              targetIcon.setAttribute("tooltiptext", tooltip);
-          }
-      ]]></body>
+                let cutypeString = "event.attendee.usertype." + (cutype in cutypeMap ? cutypeMap[cutype] : "unknown");
+                let tooltip = cal.l10n.getString("calendar-event-dialog-attendees",
+                                                 cutypeString,
+                                                 cutype in cutypeMap ? [] : [cutype]);
+                targetIcon.setAttribute("tooltiptext", tooltip);
+            }
+        ]]></body>
       </method>
 
       <property name="documentSize">
         <getter><![CDATA[
             return this.mRowHeight * this.mMaxAttendees;
         ]]></getter>
       </property>