Bug 1617786 - Avoid using 'ltn' prefix outside calendar directory. r=darktrojan
authorPaul Morris <paul@thunderbird.net>
Fri, 28 Feb 2020 15:38:37 -0500
changeset 37460 77c269c63ddcf34fa4260cc4992433bd9b6a3817
parent 37459 e0e05018f705af08c3b98472483c02c69d25d9ec
child 37461 46b1f5963bc766e3ce036c5a17374fa94039db25
push id2566
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:20:31 +0000
treeherdercomm-beta@a352facfa0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdarktrojan
bugs1617786
Bug 1617786 - Avoid using 'ltn' prefix outside calendar directory. r=darktrojan Eventually it would be good to convert all uses of 'ltn' prefix but at least we can avoid it outside of the calendar directory to make it easier to identify calendar UI elements by giving them a consistent id prefix, namely "calendar-".
calendar/lightning/content/lightning-item-panel.js
calendar/lightning/content/messenger-overlay-sidebar.js
mail/base/content/mainNavigationToolbox.inc.xhtml
--- a/calendar/lightning/content/lightning-item-panel.js
+++ b/calendar/lightning/content/lightning-item-panel.js
@@ -1093,20 +1093,21 @@ function attachFileByAccountKey(aAccount
 function updateSaveControls(aSendNotSave) {
   if (window.calItemSaveControls && window.calItemSaveControls.state == aSendNotSave) {
     return;
   }
 
   let saveBtn = document.getElementById("button-save");
   let saveandcloseBtn = document.getElementById("button-saveandclose");
   let saveMenu =
-    document.getElementById("item-save-menuitem") || document.getElementById("ltnSave");
+    document.getElementById("item-save-menuitem") ||
+    document.getElementById("calendar-save-menuitem");
   let saveandcloseMenu =
     document.getElementById("item-saveandclose-menuitem") ||
-    document.getElementById("ltnSaveAndClose");
+    document.getElementById("calendar-save-and-close-menuitem");
 
   // we store the initial label and tooltip values to be able to reset later
   if (!window.calItemSaveControls) {
     window.calItemSaveControls = {
       state: false,
       saveMenu: { label: saveMenu.label },
       saveandcloseMenu: { label: saveandcloseMenu.label },
       saveBtn: null,
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -40,18 +40,18 @@ var calendarTabMonitor = {
     }
     // we reset the save menu controls when moving away (includes closing)
     // from an event or task editor tab
     if (aNewTab.mode.name == "calendarEvent" || aNewTab.mode.name == "calendarTask") {
       sendMessage({ command: "triggerUpdateSaveControls" });
     } else if (window.calItemSaveControls) {
       // we need to reset the labels of the menu controls for saving if we
       // are not switching to an item tab and displayed an item tab before
-      let saveMenu = document.getElementById("ltnSave");
-      let saveandcloseMenu = document.getElementById("ltnSaveAndClose");
+      let saveMenu = document.getElementById("calendar-save-menuitem");
+      let saveandcloseMenu = document.getElementById("calendar-save-and-close-menuitem");
       saveMenu.label = window.calItemSaveControls.saveMenu.label;
       saveandcloseMenu.label = window.calItemSaveControls.saveandcloseMenu.label;
     }
 
     // Change the mode (gCurrentMode) to match the new tab.
     switch (aNewTab.mode.name) {
       case "calendar":
         calSwitchToCalendarMode();
--- a/mail/base/content/mainNavigationToolbox.inc.xhtml
+++ b/mail/base/content/mainNavigationToolbox.inc.xhtml
@@ -111,35 +111,35 @@
                 label="&openMenuCmd.label;"
                 accesskey="&openMenuCmd.accesskey;">
             <menupopup id="menu_OpenPopup">
               <menuitem id="openMessageFileMenuitem"
                         label="&openMessageFileCmd.label;"
                         class="menuitem-iconic"
                         accesskey="&openMessageFileCmd.accesskey;"
                         oncommand="MsgOpenFromFile();"/>
-              <menuitem id="ltnOpenCalendarFileMenuitem"
+              <menuitem id="calendar-open-calendar-file-menuitem"
                         label="&lightning.menupopup.open.calendar.label;"
                         accesskey="&lightning.menupopup.open.calendar.accesskey;"
                         oncommand="openLocalCalendar();"/>
             </menupopup>
           </menu>
           <menuitem id="menu_close"
                     label="&closeCmd.label;"
                     key="key_close"
                     accesskey="&closeCmd.accesskey;"
                     command="cmd_close"
                     class="menuitem-iconic"/>
           <menuseparator id="fileMenuAfterCloseSeparator"/>
-          <menuitem id="ltnSave"
+          <menuitem id="calendar-save-menuitem"
                     label="&event.menu.item.save.label;"
                     accesskey="&event.menu.item.save.tab.accesskey;"
                     key="save-key"
                     command="cmd_save"/>
-          <menuitem id="ltnSaveAndClose"
+          <menuitem id="calendar-save-and-close-menuitem"
                     label="&event.menu.item.saveandclose.label;"
                     accesskey="&event.menu.item.saveandclose.tab.accesskey;"
                     command="cmd_accept"/>
           <menu id="menu_saveAs" class="menu-iconic menuitem-iconic"
                 label="&saveAsMenu.label;" accesskey="&saveAsMenu.accesskey;">
             <menupopup id="menu_SavePopup">
               <menuitem id="menu_saveAsFile" label="&saveAsFileCmd.label;"
                accesskey="&saveAsFileCmd.accesskey;"