Bug 1508119 - Inline the calendar-unifinder.xul overlay file. r=darktrojan
authorPaul Morris <paul@thunderbird.net>
Fri, 25 Oct 2019 16:49:01 -0400
changeset 37380 7edaf5c980d383735ccfe8e300ea2783d9468956
parent 37379 9088ce19d9d4115dcc29b8c2283dbdcfce51bf85
child 37381 faa7e3cc7838eea5d26bb4cb93ee0b940e6acbff
push id396
push userclokep@gmail.com
push dateMon, 06 Jan 2020 23:11:57 +0000
reviewersdarktrojan
bugs1508119
Bug 1508119 - Inline the calendar-unifinder.xul overlay file. r=darktrojan
calendar/base/content/calendar-unifinder.xul
calendar/base/jar.mn
calendar/lightning/content/messenger-overlay-sidebar.xul
calendar/lightning/jar.mn
deleted file mode 100644
--- a/calendar/base/content/calendar-unifinder.xul
+++ /dev/null
@@ -1,139 +0,0 @@
-<?xml version="1.0"?>
-<!-- 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/. -->
-
-<?xml-stylesheet href="chrome://calendar/skin/calendar-unifinder.css" type="text/css"?>
-
-<!DOCTYPE overlay SYSTEM "chrome://calendar/locale/calendar.dtd">
-
-<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
-  <script src="chrome://calendar/content/calendar-unifinder.js"/>
-  <script src="chrome://global/content/globalOverlay.js"/>
-
-  <vbox id="calendar-view-box">
-    <vbox id="bottom-events-box" insertbefore="calendar-nav-control" persist="height">
-      <hbox id="unifinder-searchBox" persist="collapsed">
-        <box align="center">
-          <menulist id="event-filter-menulist" value="P7D" persist="value">
-            <menupopup id="event-filter-menupopup" oncommand="refreshEventTree()">
-              <menuitem id="event-filter-all"
-                        label="&calendar.events.filter.all.label;"
-                        value="all"/>
-              <menuitem id="event-filter-today"
-                        label="&calendar.events.filter.today.label;"
-                        value="today"/>
-              <menuitem id="event-filter-next7days"
-                        label="&calendar.events.filter.next7Days.label;"
-                        value="P7D"/>
-              <menuitem id="event-filter-next14Days"
-                        label="&calendar.events.filter.next14Days.label;"
-                        value="P14D"/>
-              <menuitem id="event-filter-next31Days"
-                        label="&calendar.events.filter.next31Days.label;"
-                        value="P31D"/>
-              <menuitem id="event-filter-thisCalendarMonth"
-                        label="&calendar.events.filter.thisCalendarMonth.label;"
-                        value="thisCalendarMonth"/>
-              <menuitem id="event-filter-future"
-                        label="&calendar.events.filter.future.label;"
-                        value="future"/>
-              <menuitem id="event-filter-current"
-                        label="&calendar.events.filter.current.label;"
-                        value="current"/>
-              <menuitem id="event-filter-currentview"
-                        label="&calendar.events.filter.currentview.label;"
-                        value="currentview"/>
-            </menupopup>
-          </menulist>
-        </box>
-        <box align="center" flex="1">
-          <label control="unifinder-search-field" value="&calendar.search.options.searchfor;"/>
-          <search-textbox id="unifinder-search-field"
-                          class="themeableSearchBox"
-                          oncommand="refreshEventTree();"
-                          flex="1"/>
-        </box>
-        <toolbarbutton id="unifinder-closer"
-                       class="unifinder-closebutton close-icon"
-                       command="calendar_show_unifinder_command"
-                       tooltiptext="&calendar.unifinder.close.tooltip;"/>
-      </hbox>
-      <tree id="unifinder-search-results-tree" flex="1"
-            onselect="unifinderSelect(event); calendarController.onSelectionChanged()"
-            onkeypress="unifinderKeyPress(event)"
-            _selectDelay="500"
-            persist="sort-active sort-direction"
-            enableColumnDrag="true">
-        <treecols id="unifinder-search-results-tree-cols">
-          <treecol id="unifinder-search-results-tree-col-title"
-                   persist="hidden ordinal width"
-                   flex="1"
-                   itemproperty="title"
-                   label="&calendar.unifinder.tree.title.label;"
-                   tooltiptext="&calendar.unifinder.tree.title.tooltip2;"/>
-          <splitter class="tree-splitter"/>
-          <treecol id="unifinder-search-results-tree-col-startdate"
-                   persist="hidden ordinal width"
-                   flex="1"
-                   itemproperty="startDate"
-                   label="&calendar.unifinder.tree.startdate.label;"
-                   tooltiptext="&calendar.unifinder.tree.startdate.tooltip2;"/>
-          <splitter class="tree-splitter"/>
-          <treecol id="unifinder-search-results-tree-col-enddate"
-                   persist="hidden ordinal width"
-                   flex="1"
-                   itemproperty="endDate"
-                   label="&calendar.unifinder.tree.enddate.label;"
-                   tooltiptext="&calendar.unifinder.tree.enddate.tooltip2;"/>
-          <splitter class="tree-splitter"/>
-          <treecol id="unifinder-search-results-tree-col-categories"
-                   persist="hidden ordinal width"
-                   flex="1"
-                   itemproperty="categories"
-                   label="&calendar.unifinder.tree.categories.label;"
-                   tooltiptext="&calendar.unifinder.tree.categories.tooltip2;"/>
-          <splitter class="tree-splitter"/>
-          <treecol id="unifinder-search-results-tree-col-location"
-                   persist="hidden ordinal width"
-                   flex="1"
-                   hidden="true"
-                   itemproperty="location"
-                   label="&calendar.unifinder.tree.location.label;"
-                   tooltiptext="&calendar.unifinder.tree.location.tooltip2;"/>
-          <splitter class="tree-splitter"/>
-          <treecol id="unifinder-search-results-tree-col-status"
-                   persist="hidden ordinal width"
-                   flex="1"
-                   hidden="true"
-                   itemproperty="status"
-                   label="&calendar.unifinder.tree.status.label;"
-                   tooltiptext="&calendar.unifinder.tree.status.tooltip2;"/>
-          <treecol id="unifinder-search-results-tree-col-calendarname"
-                   persist="hidden ordinal width"
-                   flex="1"
-                   hidden="true"
-                   itemproperty="calendar"
-                   label="&calendar.unifinder.tree.calendarname.label;"
-                   tooltiptext="&calendar.unifinder.tree.calendarname.tooltip2;"/>
-        </treecols>
-
-        <!-- on mousedown here happens before onclick above -->
-        <treechildren tooltip="eventTreeTooltip"
-                      context="calendar-item-context-menu"
-                      onkeypress="if (event.key == 'Enter') { unifinderEditCommand(); }"
-                      ondragenter="return false;"
-                      ondblclick="unifinderDoubleClick(event)"
-                      onfocus="focusFirstItemIfNoSelection();"/>
-      </tree>
-    </vbox>
-    <splitter id="calendar-view-splitter"
-              insertbefore="calendar-nav-control"
-              resizebefore="closest"
-              resizeafter="farthest"
-              persist="state"
-              class="chromeclass-extrachrome sidebar-splitter calendar-splitter"
-              orient="vertical"
-              onmouseup="setTimeout(refreshEventTree, 10);"/>
-  </vbox>
-</overlay>
--- a/calendar/base/jar.mn
+++ b/calendar/base/jar.mn
@@ -30,17 +30,16 @@ calendar.jar:
     content/calendar-statusbar.js                               (content/calendar-statusbar.js)
     content/calendar-task-editing.js                            (content/calendar-task-editing.js)
     content/calendar-task-tree-utils.js                         (content/calendar-task-tree-utils.js)
     content/calendar-task-tree-view.js                          (content/calendar-task-tree-view.js)
     content/calendar-task-tree.js                               (content/calendar-task-tree.js)
     content/calendar-task-view.js                               (content/calendar-task-view.js)
     content/calendar-ui-utils.js                                (content/calendar-ui-utils.js)
     content/calendar-unifinder.js                               (content/calendar-unifinder.js)
-    content/calendar-unifinder.xul                              (content/calendar-unifinder.xul)
     content/calendar-views-utils.js                             (content/calendar-views-utils.js)
     content/calendar-views.js                                   (content/calendar-views.js)
     content/calendar-editable-item.js                           (content/calendar-editable-item.js)
     content/calendar-views.xul                                  (content/calendar-views.xul)
     content/calendar-alarm-dialog.js                            (content/dialogs/calendar-alarm-dialog.js)
     content/calendar-alarm-dialog.xul                           (content/dialogs/calendar-alarm-dialog.xul)
     content/calendar-conflicts-dialog.xul                       (content/dialogs/calendar-conflicts-dialog.xul)
     content/calendar-creation.js                                (content/dialogs/calendar-creation.js)
--- a/calendar/lightning/content/messenger-overlay-sidebar.xul
+++ b/calendar/lightning/content/messenger-overlay-sidebar.xul
@@ -19,16 +19,18 @@
 <?xml-stylesheet href="chrome://lightning/skin/lightning.css" type="text/css"?>
 
 <?xml-stylesheet href="chrome://calendar/skin/calendar-event-dialog.css" type="text/css"?>
 <?xml-stylesheet href="chrome://calendar/content/calendar-event-dialog.css" type="text/css"?>
 <?xml-stylesheet href="chrome://calendar-common/skin/dialogs/calendar-event-dialog.css" type="text/css"?>
 
 <?xml-stylesheet href="chrome://calendar/skin/today-pane.css" type="text/css"?>
 
+<?xml-stylesheet href="chrome://calendar/skin/calendar-unifinder.css" type="text/css"?>
+
 <?xml-stylesheet href="chrome://calendar/skin/calendar-task-tree.css" type="text/css"?>
 <?xml-stylesheet href="chrome://calendar/skin/calendar-task-view.css" type="text/css"?>
 
 <?xul-overlay href="chrome://calendar/content/calendar-views.xul"?>
 
 <?xul-overlay href="chrome://lightning/content/lightning-toolbar.xul"?>
 <?xul-overlay href="chrome://lightning/content/lightning-menus.xul"?>
 
@@ -89,17 +91,20 @@
 
   <script src="chrome://calendar/content/calendar-command-controller.js"/>
 
   <!-- NEEDED FOR TODAY PANE -->
   <script src="chrome://calendar/content/agenda-listbox.js"/>
   <script src="chrome://calendar/content/today-pane.js"/>
   <script src="chrome://calendar/content/agenda-listbox-utils.js"/>
 
-  <!-- NEEDED FOR TODAY PANE AND TASK VIEW -->
+  <!-- NEEDED FOR EVENTS VIEW (UNIFINDER) -->
+  <script src="chrome://calendar/content/calendar-unifinder.js"/>
+
+  <!-- NEEDED FOR TODAY PANE AND TASKS VIEW -->
   <script src="chrome://calendar/content/calFilter.js"/>
   <script src="chrome://calendar/content/calendar-task-tree-utils.js"/>
 
   <!-- NEEDED FOR TASK VIEW -->
   <script src="chrome://calendar/content/calendar-task-tree-view.js"/>
   <script src="chrome://calendar/content/calendar-task-tree.js"/>
   <script src="chrome://calendar/content/calendar-task-view.js"/>
   <script src="chrome://calendar/content/calendar-dialog-utils.js"/>
@@ -1118,18 +1123,143 @@
         </vbox>
 
         <splitter id="calsidebar_splitter"
                   collapse="before"
                   persist="state"
                   class="calendar-sidebar-splitter"/>
 
         <deck id="calendarDisplayDeck" flex="1">
-          <!-- vbox "calendar-view-box will be overlaid..." -->
-          <vbox id="calendar-view-box"/>
+          <!-- Events View ("Unifinder") -->
+          <vbox id="calendar-view-box">
+            <vbox id="bottom-events-box" insertbefore="calendar-nav-control" persist="height">
+              <hbox id="unifinder-searchBox" persist="collapsed">
+                <box align="center">
+                  <menulist id="event-filter-menulist" value="P7D" persist="value">
+                    <menupopup id="event-filter-menupopup" oncommand="refreshEventTree()">
+                      <menuitem id="event-filter-all"
+                                label="&calendar.events.filter.all.label;"
+                                value="all"/>
+                      <menuitem id="event-filter-today"
+                                label="&calendar.events.filter.today.label;"
+                                value="today"/>
+                      <menuitem id="event-filter-next7days"
+                                label="&calendar.events.filter.next7Days.label;"
+                                value="P7D"/>
+                      <menuitem id="event-filter-next14Days"
+                                label="&calendar.events.filter.next14Days.label;"
+                                value="P14D"/>
+                      <menuitem id="event-filter-next31Days"
+                                label="&calendar.events.filter.next31Days.label;"
+                                value="P31D"/>
+                      <menuitem id="event-filter-thisCalendarMonth"
+                                label="&calendar.events.filter.thisCalendarMonth.label;"
+                                value="thisCalendarMonth"/>
+                      <menuitem id="event-filter-future"
+                                label="&calendar.events.filter.future.label;"
+                                value="future"/>
+                      <menuitem id="event-filter-current"
+                                label="&calendar.events.filter.current.label;"
+                                value="current"/>
+                      <menuitem id="event-filter-currentview"
+                                label="&calendar.events.filter.currentview.label;"
+                                value="currentview"/>
+                    </menupopup>
+                  </menulist>
+                </box>
+                <box align="center" flex="1">
+                  <label control="unifinder-search-field" value="&calendar.search.options.searchfor;"/>
+                  <search-textbox id="unifinder-search-field"
+                                  class="themeableSearchBox"
+                                  oncommand="refreshEventTree();"
+                                  flex="1"/>
+                </box>
+                <toolbarbutton id="unifinder-closer"
+                               class="unifinder-closebutton close-icon"
+                               command="calendar_show_unifinder_command"
+                               tooltiptext="&calendar.unifinder.close.tooltip;"/>
+              </hbox>
+              <tree id="unifinder-search-results-tree" flex="1"
+                    onselect="unifinderSelect(event); calendarController.onSelectionChanged()"
+                    onkeypress="unifinderKeyPress(event)"
+                    _selectDelay="500"
+                    persist="sort-active sort-direction"
+                    enableColumnDrag="true">
+                <treecols id="unifinder-search-results-tree-cols">
+                  <treecol id="unifinder-search-results-tree-col-title"
+                           persist="hidden ordinal width"
+                           flex="1"
+                           itemproperty="title"
+                           label="&calendar.unifinder.tree.title.label;"
+                           tooltiptext="&calendar.unifinder.tree.title.tooltip2;"/>
+                  <splitter class="tree-splitter"/>
+                  <treecol id="unifinder-search-results-tree-col-startdate"
+                           persist="hidden ordinal width"
+                           flex="1"
+                           itemproperty="startDate"
+                           label="&calendar.unifinder.tree.startdate.label;"
+                           tooltiptext="&calendar.unifinder.tree.startdate.tooltip2;"/>
+                  <splitter class="tree-splitter"/>
+                  <treecol id="unifinder-search-results-tree-col-enddate"
+                           persist="hidden ordinal width"
+                           flex="1"
+                           itemproperty="endDate"
+                           label="&calendar.unifinder.tree.enddate.label;"
+                           tooltiptext="&calendar.unifinder.tree.enddate.tooltip2;"/>
+                  <splitter class="tree-splitter"/>
+                  <treecol id="unifinder-search-results-tree-col-categories"
+                           persist="hidden ordinal width"
+                           flex="1"
+                           itemproperty="categories"
+                           label="&calendar.unifinder.tree.categories.label;"
+                           tooltiptext="&calendar.unifinder.tree.categories.tooltip2;"/>
+                  <splitter class="tree-splitter"/>
+                  <treecol id="unifinder-search-results-tree-col-location"
+                           persist="hidden ordinal width"
+                           flex="1"
+                           hidden="true"
+                           itemproperty="location"
+                           label="&calendar.unifinder.tree.location.label;"
+                           tooltiptext="&calendar.unifinder.tree.location.tooltip2;"/>
+                  <splitter class="tree-splitter"/>
+                  <treecol id="unifinder-search-results-tree-col-status"
+                           persist="hidden ordinal width"
+                           flex="1"
+                           hidden="true"
+                           itemproperty="status"
+                           label="&calendar.unifinder.tree.status.label;"
+                           tooltiptext="&calendar.unifinder.tree.status.tooltip2;"/>
+                  <treecol id="unifinder-search-results-tree-col-calendarname"
+                           persist="hidden ordinal width"
+                           flex="1"
+                           hidden="true"
+                           itemproperty="calendar"
+                           label="&calendar.unifinder.tree.calendarname.label;"
+                           tooltiptext="&calendar.unifinder.tree.calendarname.tooltip2;"/>
+                </treecols>
+
+                <!-- on mousedown here happens before onclick above -->
+                <treechildren tooltip="eventTreeTooltip"
+                              context="calendar-item-context-menu"
+                              onkeypress="if (event.key == 'Enter') { unifinderEditCommand(); }"
+                              ondragenter="return false;"
+                              ondblclick="unifinderDoubleClick(event)"
+                              onfocus="focusFirstItemIfNoSelection();"/>
+              </tree>
+            </vbox>
+            <splitter id="calendar-view-splitter"
+                      insertbefore="calendar-nav-control"
+                      resizebefore="closest"
+                      resizeafter="farthest"
+                      persist="state"
+                      class="chromeclass-extrachrome sidebar-splitter calendar-splitter"
+                      orient="vertical"
+                      onmouseup="setTimeout(refreshEventTree, 10);"/>
+          </vbox>
+          <!-- Tasks View -->
           <vbox id="calendar-task-box" flex="1"
                 onselect="taskDetailsView.onSelect(event);">
             <hbox id="task-addition-box" align="center">
               <box align="center" flex="1">
                 <toolbarbutton id="calendar-add-task-button"
                                label="&calendar.newtask.button.label;"
                                tooltiptext="&calendar.newtask.button.tooltip;"
                                command="calendar_new_todo_command"/>
--- a/calendar/lightning/jar.mn
+++ b/calendar/lightning/jar.mn
@@ -13,17 +13,16 @@ lightning.jar:
 % overlay chrome://messenger/content/messageWindow.xul chrome://lightning/content/imip-bar-overlay.xul
 % overlay chrome://messenger/content/messageWindow.xul chrome://lightning/content/messenger-overlay-messageWindow.xul
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://lightning/content/imip-bar-overlay.xul
 % overlay chrome://communicator/content/pref/preferences.xul chrome://lightning/content/suite-overlay-preferences.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay about:addons chrome://lightning/content/suite-overlay-addons.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay chrome://mozapps/content/extensions/extensions.xul chrome://lightning/content/suite-overlay-addons.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay chrome://messenger/content/preferences/preferences.xul chrome://lightning/content/messenger-overlay-preferences.xul
 % overlay about:preferences chrome://lightning/content/messenger-overlay-preferences.xul
-% overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://calendar/content/calendar-unifinder.xul
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://lightning/content/suite-overlay-sidebar.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % overlay chrome://calendar/content/calendarCreation.xul chrome://lightning/content/lightning-calendar-creation.xul
 % overlay chrome://lightning/content/lightning-calendar-creation.xul chrome://lightning/content/caldav-lightning-calendar-creation.xul
 % override chrome://lightning-common/skin/accountCentral.css chrome://lightning-common/skin/suite-accountCentral.css application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % content lightning %content/
     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)