Bug 1608610 - Pre-process calendar status bar into messenger.xhtml. r=Fallen
authorPaul Morris <paul@thunderbird.net>
Tue, 14 Jan 2020 13:47:53 -0500
changeset 38116 65d67acb5b16961642faa0b965c56a3a944b0234
parent 38115 37bca8ac52ca3c77fc931aa0fbac3a9cdcc23eb3
child 38117 df845a3dbec6eed3199082683b2af39083a6192c
push id398
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:10:28 +0000
reviewersFallen
bugs1608610
Bug 1608610 - Pre-process calendar status bar into messenger.xhtml. r=Fallen
calendar/lightning/content/calendar-status-bar.inc.xhtml
calendar/lightning/content/messenger-overlay-sidebar.xhtml
calendar/lightning/jar.mn
mail/base/content/messenger.xhtml
new file mode 100644
--- /dev/null
+++ b/calendar/lightning/content/calendar-status-bar.inc.xhtml
@@ -0,0 +1,86 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+<!-- event/task in tab statusbarpanels -->
+<hbox id="status-privacy"
+      class="statusbarpanel event-dialog"
+      align="center"
+      flex="1"
+      collapsed="true"
+      pack="start">
+  <label value="&event.statusbarpanel.privacy.label;"/>
+  <hbox id="status-privacy-public-box" privacy="PUBLIC">
+    <label value="&event.menu.options.privacy.public.label;"/>
+  </hbox>
+  <hbox id="status-privacy-confidential-box" privacy="CONFIDENTIAL">
+    <label value="&event.menu.options.privacy.confidential.label;"/>
+  </hbox>
+  <hbox id="status-privacy-private-box" privacy="PRIVATE">
+    <label value="&event.menu.options.privacy.private.label;"/>
+  </hbox>
+</hbox>
+<hbox id="status-priority"
+      class="statusbarpanel event-dialog"
+      align="center"
+      flex="1"
+      collapsed="true"
+      pack="start">
+  <label value="&event.priority2.label;"/>
+  <image id="image-priority-low"
+         class="cal-statusbar-1"
+         collapsed="true"
+         value="low"/>
+  <image id="image-priority-normal"
+         class="cal-statusbar-1"
+         collapsed="true"
+         value="normal"/>
+  <image id="image-priority-high"
+         class="cal-statusbar-1"
+         collapsed="true"
+         value="high"/>
+</hbox>
+<hbox id="status-status"
+      class="statusbarpanel event-dialog"
+      align="center"
+      flex="1"
+      collapsed="true"
+      pack="start">
+  <label value="&task.status.label;"/>
+  <label id="status-status-tentative-label"
+         value="&newevent.status.tentative.label;"
+         hidden="true"/>
+  <label id="status-status-confirmed-label"
+         value="&newevent.status.confirmed.label;"
+         hidden="true"/>
+  <label id="status-status-cancelled-label"
+         value="&newevent.eventStatus.cancelled.label;"
+         hidden="true"/>
+</hbox>
+<hbox id="status-freebusy"
+      class="statusbarpanel event-only event-dialog"
+      align="center"
+      flex="1"
+      collapsed="true"
+      pack="start">
+  <label value="&event.statusbarpanel.freebusy.label;"/>
+  <label id="status-freebusy-free-label"
+         value="&event.freebusy.legend.free;"
+         hidden="true"/>
+  <label id="status-freebusy-busy-label"
+         value="&event.freebusy.legend.busy;"
+         hidden="true"/>
+</hbox>
+<!-- end event/task in tab statusbarpanels -->
+
+<calendar-modebox id="calendar-show-todaypane-panel"
+                  class="statusbarpanel"
+                  mode="mail,calendar,task,chat,calendarEvent,calendarTask"
+                  collapsedinmodes="special"
+                  pack="center">
+  <toolbarbutton id="calendar-status-todaypane-button"
+                 type="checkbox"
+                 label="&todaypane.statusButton.label;"
+                 tooltiptext="&calendar.todaypane.button.tooltip;"
+                 command="calendar_toggle_todaypane_command"/>
+</calendar-modebox>
--- a/calendar/lightning/content/messenger-overlay-sidebar.xhtml
+++ b/calendar/lightning/content/messenger-overlay-sidebar.xhtml
@@ -4,109 +4,16 @@
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <overlay id="ltnSidebarOverlay"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
          xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
          xmlns:html="http://www.w3.org/1999/xhtml">
 
-  <hbox id="status-bar">
-    <!-- event/task in tab statusbarpanels -->
-    <hbox id="status-privacy"
-          class="statusbarpanel event-dialog"
-          align="center"
-          flex="1"
-          collapsed="true"
-          pack="start">
-      <label value="&event.statusbarpanel.privacy.label;"/>
-      <hbox id="status-privacy-public-box" privacy="PUBLIC">
-        <label value="&event.menu.options.privacy.public.label;"/>
-      </hbox>
-      <hbox id="status-privacy-confidential-box" privacy="CONFIDENTIAL">
-        <label value="&event.menu.options.privacy.confidential.label;"/>
-      </hbox>
-      <hbox id="status-privacy-private-box" privacy="PRIVATE">
-        <label value="&event.menu.options.privacy.private.label;"/>
-      </hbox>
-    </hbox>
-    <hbox id="status-priority"
-          class="statusbarpanel event-dialog"
-          align="center"
-          flex="1"
-          collapsed="true"
-          pack="start">
-      <label value="&event.priority2.label;"/>
-      <image id="image-priority-low"
-             class="cal-statusbar-1"
-             collapsed="true"
-             value="low"/>
-      <image id="image-priority-normal"
-             class="cal-statusbar-1"
-             collapsed="true"
-             value="normal"/>
-      <image id="image-priority-high"
-             class="cal-statusbar-1"
-             collapsed="true"
-             value="high"/>
-    </hbox>
-    <hbox id="status-status"
-          class="statusbarpanel event-dialog"
-          align="center"
-          flex="1"
-          collapsed="true"
-          pack="start">
-      <label value="&task.status.label;"/>
-      <label id="status-status-tentative-label"
-             value="&newevent.status.tentative.label;"
-             hidden="true"/>
-      <label id="status-status-confirmed-label"
-             value="&newevent.status.confirmed.label;"
-             hidden="true"/>
-      <label id="status-status-cancelled-label"
-             value="&newevent.eventStatus.cancelled.label;"
-             hidden="true"/>
-    </hbox>
-    <hbox id="status-freebusy"
-          class="statusbarpanel event-only event-dialog"
-          align="center"
-          flex="1"
-          collapsed="true"
-          pack="start">
-      <label value="&event.statusbarpanel.freebusy.label;"/>
-      <label id="status-freebusy-free-label"
-             value="&event.freebusy.legend.free;"
-             hidden="true"/>
-      <label id="status-freebusy-busy-label"
-             value="&event.freebusy.legend.busy;"
-             hidden="true"/>
-    </hbox>
-    <!-- end event/task in tab statusbarpanels -->
-    <calendar-modebox id="calendar-show-todaypane-panel"
-                      class="statusbarpanel"
-                      mode="mail,calendar,task,chat,calendarEvent,calendarTask"
-                      collapsedinmodes="special"
-                      pack="center">
-      <toolbarbutton id="calendar-status-todaypane-button"
-                     type="checkbox"
-                     label="&todaypane.statusButton.label;"
-                     tooltiptext="&calendar.todaypane.button.tooltip;"
-                     command="calendar_toggle_todaypane_command"/>
-    </calendar-modebox>
-    <hbox id="calendar-invitations-panel"
-          class="statusbarpanel"
-          insertbefore="unreadMessageCount,totalMessageCount"
-          oncommand="openInvitationsDialog()">
-      <label id="calendar-invitations-label"
-             class="text-link"
-             onclick="openInvitationsDialog()"
-             onkeypress="if (event.key == 'Enter') { openInvitationsDialog(); }"/>
-    </hbox>
-  </hbox>
-
   <!-- CALENDAR TOOLBAR BUTTONS FOR MAIL TOOLBAR -->
   <toolbarpalette id="MailToolbarPalette">
     <toolbarbutton id="lightning-button-calendar"
                    class="toolbarbutton-1"
                    label="&lightning.toolbar.calendar.label;"
                    tooltiptext="&lightning.toolbar.calendar.tooltip;"
                    command="new_calendar_tab"/>
     <toolbarbutton id="lightning-button-tasks"
--- a/calendar/lightning/jar.mn
+++ b/calendar/lightning/jar.mn
@@ -11,16 +11,17 @@ lightning.jar:
 % overlay about:addons chrome://lightning/content/suite-overlay-addons.xhtml application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay chrome://mozapps/content/extensions/extensions.xhtml chrome://lightning/content/suite-overlay-addons.xhtml application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xhtml chrome://lightning/content/suite-overlay-sidebar.xhtml application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % override chrome://lightning-common/skin/accountCentral.css chrome://lightning-common/skin/suite-accountCentral.css application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % content lightning %content/
     content/calendar-commands.inc.xhtml                    (content/calendar-commands.inc.xhtml)
     content/calendar-context-menus-and-tooltips.inc.xhtml  (content/calendar-context-menus-and-tooltips.inc.xhtml)
     content/calendar-keys.inc.xhtml                        (content/calendar-keys.inc.xhtml)
+    content/calendar-status-bar.inc.xhtml                  (content/calendar-status-bar.inc.xhtml)
     content/calendar-tab-panels.inc.xhtml                  (content/calendar-tab-panels.inc.xhtml)
     content/calendar-today-pane.inc.xhtml                  (content/calendar-today-pane.inc.xhtml)
     content/html-item-editing/lightning-item-iframe.html   (content/html-item-editing/lightning-item-iframe.html)
     content/html-item-editing/react-code.js                (content/html-item-editing/react-code.js)
     content/imip-bar.js                                    (content/imip-bar.js)
     content/imip-bar-overlay.inc.xhtml                     (content/imip-bar-overlay.inc.xhtml)
     content/lightning-calendar-creation.js                 (content/lightning-calendar-creation.js)
     content/lightning-calendar-properties.js               (content/lightning-calendar-properties.js)
--- a/mail/base/content/messenger.xhtml
+++ b/mail/base/content/messenger.xhtml
@@ -907,13 +907,22 @@
   </panel>
 
   <hbox id="messenger-notification-bottom">
       <!-- notificationbox will be added here lazily. -->
   </hbox>
   <statuspanel id="statusbar-display"/>
   <hbox id="status-bar" class="statusbar chromeclass-status">
 #include mainStatusbar.inc.xhtml
+    <hbox id="calendar-invitations-panel"
+          class="statusbarpanel"
+          oncommand="openInvitationsDialog()">
+      <label id="calendar-invitations-label"
+             class="text-link"
+             onclick="openInvitationsDialog()"
+             onkeypress="if (event.key == 'Enter') { openInvitationsDialog(); }"/>
+    </hbox>
     <label id="unreadMessageCount" class="statusbarpanel"/>
     <label id="totalMessageCount" class="statusbarpanel"/>
+#include ../../../calendar/lightning/content/calendar-status-bar.inc.xhtml
   </hbox>
 </window>