Bug 1608610 - Pre-process calendar context menus into messenger.xhtml. r=Fallen
authorPaul Morris <paul@thunderbird.net>
Tue, 14 Jan 2020 12:08:14 -0500
changeset 37233 b959058157bc2fb2029ab22fc82e7920d01c9ab9
parent 37232 05f8690b4ae9865217d2849bb1df00b7908a72e0
child 37234 1331b8f4fdfbca172f68df2d9412c908dd299843
push id2552
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:24:16 +0000
treeherdercomm-beta@f95a6f4408a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFallen
bugs1608610
Bug 1608610 - Pre-process calendar context menus into messenger.xhtml. r=Fallen
calendar/lightning/content/calendar-context-menus-and-tooltips.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-context-menus-and-tooltips.inc.xhtml
@@ -0,0 +1,808 @@
+# 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/.
+
+<popupset id="calendar-popupset">
+  <!-- Tooltips -->
+  <tooltip id="calendar-list-tooltip"
+           onpopupshowing="return calendarListTooltipShowing(event)"/>
+
+  <tooltip id="eventTreeTooltip"
+          onpopupshowing="return showToolTip(this, unifinderTreeView.getItemFromEvent(event))"
+          noautohide="true"/>
+
+  <tooltip id="taskTreeTooltip"
+          onpopupshowing="return showToolTip(this, getTaskTree().getTaskFromEvent(event))"
+          noautohide="true"/>
+
+  <tooltip id="itemTooltip"
+          noautohide="true"/>
+
+  <!-- CALENDAR TOOLBAR CONTEXT MENU -->
+  <menupopup id="calendar-toolbar-context"
+             onpopupshowing="onViewToolbarsPopupShowing(event, ['navigation-toolbox', 'calendar-toolbox']);">
+    <menuseparator id="customizeCalendarToolbarMenuSeparator"/>
+    <menuitem id="CustomizeCalendarToolbar"
+              label="&calendar.menu.customize.label;"
+              accesskey="&calendar.menu.customize.accesskey;"
+              oncommand="CustomizeMailToolbar('calendar-toolbox', 'CustomizeCalendarToolbar')"/>
+  </menupopup>
+  <menupopup id="task-toolbar-context"
+             onpopupshowing="onViewToolbarsPopupShowing(event, ['navigation-toolbox', 'task-toolbox']);">
+    <menuseparator id="customizeTaskToolbarMenuSeparator"/>
+    <menuitem id="CustomizeTaskToolbar"
+              label="&calendar.menu.customize.label;"
+              accesskey="&calendar.menu.customize.accesskey;"
+              oncommand="CustomizeMailToolbar('task-toolbox', 'CustomizeTaskToolbar')"/>
+  </menupopup>
+
+  <!-- CALENDAR LIST CONTEXT MENU -->
+  <menupopup id="list-calendars-context-menu"
+             onpopupshowing="return calendarListSetupContextMenu(event);">
+    <menuitem id="list-calendars-context-togglevisible"
+              class="needs-calendar"
+              accesskeyshow="&calendar.context.showcalendar.accesskey;"
+              accesskeyhide="&calendar.context.hidecalendar.accesskey;"
+              oncommand="toggleCalendarVisible(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
+    <menuitem id="list-calendars-context-showonly"
+              class="needs-calendar"
+              accesskey="&calendar.context.showonly.accesskey;"
+              oncommand="showOnlyCalendar(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
+    <menuitem id="list-calendars-context-showall"
+              label="&calendar.context.showall.label;"
+              accesskey="&calendar.context.showall.accesskey;"
+              oncommand="showAllCalendars();"/>
+    <menuseparator id="list-calendars-context-showops-menuseparator"/>
+    <menuitem id="list-calendars-context-new"
+              label="&calendar.context.newserver.label;"
+              accesskey="&calendar.context.newserver.accesskey;"
+              command="calendar_new_calendar_command"/>
+    <menuitem id="list-calendars-context-find"
+              label="&calendar.context.findcalendar.label;"
+              accesskey="&calendar.context.findcalendar.accesskey;"
+              oncommand="openCalendarSubscriptionsDialog();"/>
+    <menuitem id="list-calendars-context-delete"
+              class="needs-calendar"
+              labeldelete="&calendar.context.deleteserver2.label;"
+              labelremove="&calendar.context.removeserver.label;"
+              labelunsubscribe="&calendar.context.unsubscribeserver.label;"
+              accesskeydelete="&calendar.context.deleteserver2.accesskey;"
+              accesskeyremove="&calendar.context.removeserver.accesskey;"
+              accesskeyunsubscribe="&calendar.context.unsubscribeserver.accesskey;"
+              command="calendar_delete_calendar_command"/>
+    <menuseparator id="list-calendars-context-itemops-menuseparator"/>
+    <menuitem id="list-calendars-context-export"
+              class="needs-calendar"
+              label="&calendar.context.export.label;"
+              accesskey="&calendar.context.export.accesskey;"
+              oncommand="exportEntireCalendar(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
+    <menuitem id="list-calendars-context-publish"
+              class="needs-calendar"
+              label="&calendar.context.publish.label;"
+              accesskey="&calendar.context.publish.accesskey;"
+              command="calendar_publish_selected_calendar_command"/>
+    <menuseparator id="list-calendars-context-export-menuseparator"
+              class="needs-calendar"/>
+    <menuitem id="list-calendars-context-reload"
+              label="&calendar.context.synccalendars.label;"
+              accesskey="&calendar.context.synccalendars.accesskey;"
+              command="calendar_reload_remote_calendars"/>
+    <menuseparator id="list-calendars-context-reload-menuseparator"
+                   class="needs-calendar"/>
+    <menuitem id="list-calendars-context-edit"
+              class="needs-calendar"
+              label="&calendar.context.properties.label;"
+              accesskey="&calendar.context.properties.accesskey;"
+              command="calendar_edit_calendar_command"/>
+  </menupopup>
+
+  <!-- CALENDAR ITEM CONTEXT MENU -->
+  <menupopup id="calendar-item-context-menu"
+             onpopupshowing="return setupContextItemType(event, currentView().getSelectedItems());">
+    <menuitem id="calendar-item-context-menu-modify-menuitem"
+              label="&calendar.context.modifyorviewitem.label;"
+              accesskey="&calendar.context.modifyorviewitem.accesskey;"
+              command="calendar_modify_event_command"/>
+    <menuitem id="calendar-item-context-menu-newevent-menutitem"
+              label="&calendar.context.newevent.label;"
+              accesskey="&calendar.context.newevent.accesskey;"
+              key="calendar-new-event-key"
+              command="calendar_new_event_context_command"/>
+    <menuitem id="calendar-item-context-menu-newtodo-menuitem"
+              label="&calendar.context.newtodo.label;"
+              accesskey="&calendar.context.newtodo.accesskey;"
+              key="calendar-new-todo-key"
+              command="calendar_new_todo_context_command"/>
+    <menuseparator id="calendar-item-context-menuseparator-adddeletemodify"/>
+    <menuitem id="calendar-item-context-menu-cut-menuitem"
+              label="&calendar.context.cutevent.label;"
+              accesskey="&calendar.context.cutevent.accesskey;"
+              key="key_cut"
+              command="cmd_cut"/>
+    <menuitem id="calendar-item-context-menu-copy-menuitem"
+              label="&calendar.context.copyevent.label;"
+              accesskey="&calendar.context.copyevent.accesskey;"
+              key="key_copy"
+              command="cmd_copy"/>
+    <menuitem id="calendar-item-context-menu-paste-menuitem"
+              label="&calendar.context.pasteevent.label;"
+              accesskey="&calendar.context.pasteevent.accesskey;"
+              key="key_paste"
+              command="cmd_paste"/>
+    <menuseparator id="calendar-item-context-separator-cutcopypaste"/>
+    <menu id="calendar-item-context-menu-convert-menu"
+          label="&calendar.context.convertmenu.label;"
+          accesskey="&calendar.context.convertmenu.accesskey.calendar;">
+      <menupopup id="calendar-item-context-menu-convert-menupopup">
+        <menuitem id="calendar-view-context-menu-convert-message-menuitem"
+                  label="&calendar.context.convertmenu.message.label;"
+                  accesskey="&calendar.context.convertmenu.message.accesskey;"
+                  oncommand="calendarMailButtonDNDObserver.onDropItems(currentView().getSelectedItems())"/>
+        <menuitem id="calendar-item-context-menu-convert-event-menuitem"
+                  class="todo-only"
+                  label="&calendar.context.convertmenu.event.label;"
+                  accesskey="&calendar.context.convertmenu.event.accesskey;"
+                  oncommand="calendarCalendarButtonDNDObserver.onDropItems(currentView().getSelectedItems())"/>
+        <menuitem id="calendar-item-context-menu-convert-task-menuitem"
+                  class="event-only"
+                  label="&calendar.context.convertmenu.task.label;"
+                  accesskey="&calendar.context.convertmenu.task.accesskey;"
+                  oncommand="calendarTaskButtonDNDObserver.onDropItems(currentView().getSelectedItems())"/>
+      </menupopup>
+    </menu>
+    <menuseparator id="calendar-menuseparator-before-delete"/>
+    <!-- the label and accesskey of the following menuitem is set during runtime,
+        and depends on whether the item is a task or an event -->
+    <menuitem id="calendar-item-context-menu-delete-menuitem"
+              key="calendar-delete-item-key"
+              command="calendar_delete_event_command"/>
+    <menu id="calendar-item-context-menu-attendance-menu"
+          label="&calendar.context.attendance.menu.label;"
+          accesskey="&calendar.context.attendance.menu.accesskey;"
+          oncommand="setContextPartstat(event.target, currentView().getSelectedItems())"
+          observes="calendar_attendance_command">
+      <menupopup id="calendar-item-context-menu-attendance-menupopup">
+        <label id="calendar-item-context-attendance-thisoccurrence-label"
+              class="calendar-context-heading-label"
+              scope="this-occurrence"
+              value="&calendar.context.attendance.occurrence.label;"/>
+        <menu id="calendar-item-context-menu-attendance-accepted-menu"
+              label="&calendar.context.attendance.occ.accepted.label;"
+              accesskey="&calendar.context.attendance.occ.accepted.accesskey;"
+              value="ACCEPTED"
+              name="calendar-item-context-attendance"
+              scope="this-occurrence">
+          <menupopup id="calendar-item-context-menu-occurrence-accepted-menupopup">
+            <menuitem id="calendar-item-context-menu-attend-accept-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="ACCEPTED"
+                      respmode="AUTO"/>
+            <menuitem id="calendar-item-context-menu-attend-accept-dontsend-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="ACCEPTED"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="calendar-item-context-menu-attendance-tentative-menu"
+              label="&calendar.context.attendance.occ.tentative.label;"
+              accesskey="&calendar.context.attendance.occ.tentative.accesskey;"
+              value="TENTATIVE"
+              name="calendar-item-context-attendance"
+              scope="this-occurrence">
+          <menupopup id="calendar-item-context-menu-occurrence-tentative-menupopup">
+            <menuitem id="calendar-item-context-menu-attend-tentative-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="TENTATIVE"
+                      respmode="AUTO"/>
+            <menuitem id="calendar-item-context-menu-attend-tentative-dontsend-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="TENTATIVE"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="calendar-item-context-menu-attendance-declined-menu"
+              label="&calendar.context.attendance.occ.declined.label;"
+              accesskey="&calendar.context.attendance.occ.declined.accesskey;"
+              value="DECLINED"
+              name="calendar-item-context-attendance"
+              scope="this-occurrence">
+          <menupopup id="calendar-item-context-menu-occurrence-tentative-menupopup">
+            <menuitem id="calendar-item-context-menu-attend-declined-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="DECLINED"
+                      respmode="AUTO"/>
+            <menuitem id="calendar-item-context-menu-attend-declined-dontsend-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="DECLINED"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menuitem id="calendar-item-context-menu-attendance-delegated-menu"
+                  label="&calendar.context.attendance.occ.delegated.label;"
+                  name="calendar-item-context-attendance"
+                  scope="this-occurrence"
+                  value="DELEGATED"/>
+        <menuitem id="calendar-item-context-menu-attendance-needsaction-menu"
+                  label="&calendar.context.attendance.occ.needsaction.label;"
+                  name="calendar-item-context-attendance"
+                  scope="this-occurrence"
+                  value="NEEDS-ACTION"/>
+        <label id="calendar-item-context-attendance-alloccurrence-label"
+              class="calendar-context-heading-label"
+              scope="all-occurrences"
+              value="&calendar.context.attendance.all2.label;"/>
+        <menu id="calendar-item-context-menu-attendance-accepted-all-menu"
+              label="&calendar.context.attendance.all.accepted.label;"
+              accesskey="&calendar.context.attendance.all.accepted.accesskey;"
+              value="ACCEPTED"
+              name="calendar-item-context-attendance-all"
+              scope="all-occurrences">
+          <menupopup id="calendar-item-context-menu-alloccurrences-accept-menupopup">
+            <menuitem id="calendar-item-context-menu-attend-accept-all-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="ACCEPTED"
+                      respmode="AUTO"/>
+            <menuitem id="calendar-item-context-menu-attend-accept-all-dontsend-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="ACCEPTED"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="calendar-item-context-menu-attendance-tentative-all-menu"
+              label="&calendar.context.attendance.all.tentative.label;"
+              accesskey="&calendar.context.attendance.all.tentative.accesskey;"
+              value="TENTATIVE"
+              name="calendar-item-context-attendance-all"
+              scope="all-occurrences">
+          <menupopup id="calendar-item-context-menu-alloccurrences-tentative-menupopup">
+            <menuitem id="calendar-item-context-menu-attend-tentative-all-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="TENTATIVE"
+                      respmode="AUTO"/>
+            <menuitem id="calendar-item-context-menu-attend-tentative-all-dontsend-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="TENTATIVE"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="calendar-item-context-menu-attendance-decline-all-menu"
+              label="&calendar.context.attendance.all.declined.label;"
+              accesskey="&calendar.context.attendance.all.declined.accesskey;"
+              value="DECLINED"
+              name="calendar-item-context-attendance-all"
+              scope="all-occurrences">
+          <menupopup id="calendar-item-context-menu-alloccurrences-decline-menupopup">
+            <menuitem id="calendar-item-context-menu-attend-declined-all-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="DECLINED"
+                      respmode="AUTO"/>
+            <menuitem id="calendar-item-context-menu-attend-declined-all-dontsend-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="DECLINED"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menuitem id="calendar-item-context-menu-attendance-delegated-all-menu"
+                  label="&calendar.context.attendance.all.delegated.label;"
+                  name="calendar-item-context-attendance-delegated-all"
+                  scope="all-occurrences"
+                  value="DELEGATED"/>
+        <menuitem id="calendar-item-context-menu-attendance-needsaction-all-menu"
+                  label="&calendar.context.attendance.all.needsaction.label;"
+                  name="calendar-item-context-attendance-needaction-all"
+                  scope="all-occurrences"
+                  value="NEEDS-ACTION"/>
+      </menupopup>
+    </menu>
+  </menupopup>
+
+  <!-- CALENDAR VIEW CONTEXT MENU -->
+  <menupopup id="calendar-view-context-menu">
+    <menuitem id="calendar-view-context-menu-newevent"
+              label="&calendar.context.newevent.label;"
+              command="calendar_new_event_context_command"
+              accesskey="&calendar.context.newevent.accesskey;"
+              key="calendar-new-event-key"/>
+    <menuitem id="calendar-view-context-menu-newtodo"
+              label="&calendar.context.newtodo.label;"
+              command="calendar_new_todo_context_command"
+              accesskey="&calendar.context.newtodo.accesskey;"
+              key="calendar-new-todo-key"/>
+    <!-- These labels are set dynamically, based on the current view -->
+    <menuitem id="calendar-view-context-menu-previous"
+              label=""
+              accesskey=""
+              command="calendar_view_prev_command"
+              label-day="&calendar.prevday.label;"
+              label-week="&calendar.prevweek.label;"
+              label-multiweek="&calendar.prevweek.label;"
+              label-month="&calendar.prevmonth.label;"
+              accesskey-day="&calendar.prevday.accesskey;"
+              accesskey-week="&calendar.prevweek.accesskey;"
+              accesskey-multiweek="&calendar.prevweek.accesskey;"
+              accesskey-month="&calendar.prevmonth.accesskey;"/>
+    <menuitem id="calendar-view-context-menu-next"
+              label=""
+              command="calendar_view_next_command"
+              label-day="&calendar.nextday.label;"
+              label-week="&calendar.nextweek.label;"
+              label-multiweek="&calendar.nextweek.label;"
+              label-month="&calendar.nextmonth.label;"
+              accesskey-day="&calendar.nextday.accesskey;"
+              accesskey-week="&calendar.nextweek.accesskey;"
+              accesskey-multiweek="&calendar.nextweek.accesskey;"
+              accesskey-month="&calendar.nextmonth.accesskey;"/>
+    <menuseparator id="calendar-item-context-separator-cutcopypaste"/>
+    <!-- Cut and copy doesn't make sense in the views, but only showing paste
+        makes it look like something is missing. Disable by default. -->
+    <menuitem id="calendar-view-context-menu-cut-menuitem"
+              label="&calendar.context.cutevent.label;"
+              accesskey="&calendar.context.cutevent.accesskey;"
+              key="key_cut"
+              disabled="true"/>
+    <menuitem id="calendar-view-context-menu-copy-menuitem"
+              label="&calendar.context.copyevent.label;"
+              accesskey="&calendar.context.copyevent.accesskey;"
+              key="key_copy"
+              disabled="true"/>
+    <menuitem id="calendar-view-context-menu-paste-menuitem"
+              label="&calendar.context.pasteevent.label;"
+              accesskey="&calendar.context.pasteevent.accesskey;"
+              key="key_paste"
+              command="cmd_paste"/>
+  </menupopup>
+
+  <!-- TASK ITEM CONTEXT MENU -->
+  <menupopup id="taskitem-context-menu"
+            onpopupshowing="changeContextMenuForTask(event);"
+            onpopuphiding="handleTaskContextMenuStateChange(event);">
+    <menuitem id="task-context-menu-modify"
+              label="&calendar.context.modifyorviewtask.label;"
+              accesskey="&calendar.context.modifyorviewtask.accesskey;"
+              command="calendar_modify_todo_command"/>
+    <menuitem id="task-context-menu-modify-todaypane"
+              label="&calendar.context.modifyorviewtask.label;"
+              accesskey="&calendar.context.modifyorviewtask.accesskey;"
+              command="calendar_modify_todo_todaypane_command"/>
+    <menuitem id="task-context-menu-new"
+              label="&calendar.context.newtodo.label;"
+              accesskey="&calendar.context.newtodo.accesskey;"
+              key="calendar-new-todo-key"
+              command="calendar_new_todo_command"/>
+    <menuitem id="task-context-menu-new-todaypane"
+              label="&calendar.context.newtodo.label;"
+              accesskey="&calendar.context.newtodo.accesskey;"
+              key="calendar-new-todo-key"
+              command="calendar_new_todo_todaypane_command"/>
+    <menuseparator id="task-context-menuseparator-cutcopypaste"/>
+    <menuitem id="task-context-menu-cut-menuitem"
+              label="&calendar.context.cutevent.label;"
+              accesskey="&calendar.context.cutevent.accesskey;"
+              key="key_cut"
+              command="cmd_cut"/>
+    <menuitem id="task-context-menu-copy-menuitem"
+              label="&calendar.context.copyevent.label;"
+              accesskey="&calendar.context.copyevent.accesskey;"
+              key="key_copy"
+              command="cmd_copy"/>
+    <menuitem id="task-context-menu-paste-menuitem"
+              label="&calendar.context.pasteevent.label;"
+              accesskey="&calendar.context.pasteevent.accesskey;"
+              key="key_paste"
+              command="cmd_paste"/>
+    <menuseparator id="calendar-menuseparator-beforemarkcompleted"/>
+    <menuitem id="calendar-context-markcompleted"
+              type="checkbox"
+              autocheck="false"
+              label="&calendar.context.markcompleted.label;"
+              accesskey="&calendar.context.markcompleted.accesskey;"
+              command="calendar_toggle_completed_command"/>
+    <menu id="task-context-menu-progress"
+          label="&calendar.context.progress.label;"
+          accesskey="&calendar.context.progress.accesskey;"
+          command="calendar_general-progress_command">
+      <menupopup is="calendar-task-progress-menupopup"/>
+    </menu>
+    <menu id="task-context-menu-priority"
+          label="&calendar.context.priority.label;"
+          accesskey="&calendar.context.priority.accesskey;"
+          command="calendar_general-priority_command">
+      <menupopup is="calendar-task-priority-menupopup"/>
+    </menu>
+    <menu id="task-context-menu-postpone"
+          label="&calendar.context.postpone.label;"
+          accesskey="&calendar.context.postpone.accesskey;"
+          command="calendar_general-postpone_command">
+      <menupopup id="task-context-postpone-menupopup">
+        <menuitem id="task-context-postpone-1hour"
+                  label="&calendar.context.postpone.1hour.label;"
+                  accesskey="&calendar.context.postpone.1hour.accesskey;"
+                  command="calendar_postpone-1hour_command"/>
+        <menuitem id="task-context-postpone-1day"
+                  label="&calendar.context.postpone.1day.label;"
+                  accesskey="&calendar.context.postpone.1day.accesskey;"
+                  command="calendar_postpone-1day_command"/>
+        <menuitem id="task-context-postpone-1week"
+                  label="&calendar.context.postpone.1week.label;"
+                  accesskey="&calendar.context.postpone.1week.accesskey;"
+                  command="calendar_postpone-1week_command"/>
+      </menupopup>
+    </menu>
+    <menu id="calendar-context-calendar-menu"
+          label="&calendar.calendar.label;"
+          accesskey="&calendar.calendar.accesskey;">
+          <menupopup id="calendar-context-calendar-menupopup"
+                    onpopupshowing="addCalendarNames(event);"/>
+    </menu>
+    <menuseparator id="task-context-menu-separator-conversion"/>
+    <menu id="task-context-menu-convert"
+          label="&calendar.context.convertmenu.label;"
+          accesskey="&calendar.context.convertmenu.accesskey.calendar;">
+      <menupopup id="task-context-convert-menupopup">
+        <menuitem id="calendar-context-converttomessage"
+                  label="&calendar.context.convertmenu.message.label;"
+                  accesskey="&calendar.context.convertmenu.message.accesskey;"
+                  oncommand="tasksToMail(event)"/>
+        <menuitem id="calendar-context-converttoevent"
+                  label="&calendar.context.convertmenu.event.label;"
+                  accesskey="&calendar.context.convertmenu.event.accesskey;"
+                  oncommand="tasksToEvents(event)"/>
+      </menupopup>
+    </menu>
+    <menuseparator/>
+    <menuitem id="task-context-menu-delete"
+              label="&calendar.context.deletetask.label;"
+              accesskey="&calendar.context.deletetask.accesskey;"
+              command="calendar_delete_todo_command"/>
+    <menu id="task-context-menu-attendance-menu"
+          label="&calendar.context.attendance.menu.label;"
+          accesskey="&calendar.context.attendance.menu.accesskey;"
+          oncommand="setContextPartstat(event.target, getSelectedTasks())"
+          observes="calendar_attendance_command">
+      <menupopup id="task-context-menu-attendance-menupopup">
+        <label id="task-context-attendance-thisoccurrence-label"
+              class="calendar-context-heading-label"
+              scope="this-occurrence"
+              value="&calendar.context.attendance.occurrence.label;"/>
+        <menu id="task-context-menu-attendance-accepted-menu"
+              label="&calendar.context.attendance.occ.accepted.label;"
+              accesskey="&calendar.context.attendance.occ.accepted.accesskey;"
+              value="ACCEPTED"
+              name="task-context-attendance"
+              scope="this-occurrence">
+          <menupopup id="task-context-menu-occurrence-accepted-menupopup">
+            <menuitem id="task-context-menu-attend-accept-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="ACCEPTED"
+                      respmode="AUTO"/>
+            <menuitem id="task-context-menu-attend-accept-dontsend-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="ACCEPTED"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="task-context-menu-attendance-tentative-menu"
+              label="&calendar.context.attendance.occ.tentative.label;"
+              accesskey="&calendar.context.attendance.occ.tentative.accesskey;"
+              value="TENTATIVE"
+              name="task-context-attendance"
+              scope="this-occurrence">
+          <menupopup id="task-context-menu-occurrence-tentative-menupopup">
+            <menuitem id="task-context-menu-attend-tentative-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="TENTATIVE"
+                      respmode="AUTO"/>
+            <menuitem id="task-context-menu-attend-tentative-dontsend-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="TENTATIVE"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="task-context-menu-attendance-declined-menu"
+              label="&calendar.context.attendance.occ.declined.label;"
+              accesskey="&calendar.context.attendance.occ.declined.accesskey;"
+              value="DECLINED"
+              name="task-context-attendance"
+              scope="this-occurrence">
+          <menupopup id="task-context-menu-occurrence-tentative-menupopup">
+            <menuitem id="task-context-menu-attend-declined-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="DECLINED"
+                      respmode="AUTO"/>
+            <menuitem id="task-context-menu-attend-declined-dontsend-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="DECLINED"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="task-context-menu-attendance-inprogress-menu"
+              label="&calendar.context.attendance.occ.inprogress.label;"
+              accesskey="&calendar.context.attendance.occ.inprogress.accesskey;"
+              value="IN-PROGRESS"
+              name="task-context-attendance"
+              scope="this-occurrence">
+          <menupopup id="task-context-menu-occurrence-inprogress-menupopup">
+            <menuitem id="task-context-menu-attend-inprogress-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="IN-PROGRESS"
+                      respmode="AUTO"/>
+            <menuitem id="task-context-menu-attend-inprogress-dontsend-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="IN-PROGRESS"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="task-context-menu-attendance-completed-menu"
+              label="&calendar.context.attendance.occ.completed.label;"
+              accesskey="&calendar.context.attendance.occ.completed.accesskey;"
+              value="COMPLETED"
+              name="task-context-attendance"
+              scope="this-occurrence">
+          <menupopup id="task-context-menu-occurrence-completed-menupopup">
+            <menuitem id="task-context-menu-attend-completed-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="COMPLETED"
+                      respmode="AUTO"/>
+            <menuitem id="task-context-menu-attend-completed-dontsend-menuitem"
+                      scope="this-occurrence"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="COMPLETED"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menuitem id="task-context-menu-attendance-delegated-menu"
+                  label="&calendar.context.attendance.occ.delegated.label;"
+                  name="task-context-attendance"
+                  scope="this-occurrence"
+                  value="DELEGATED"/>
+        <menuitem id="task-context-menu-attendance-needsaction-menu"
+                  label="&calendar.context.attendance.occ.needsaction.label;"
+                  name="task-context-attendance"
+                  scope="this-occurrence"
+                  value="NEEDS-ACTION"/>
+        <label id="task-context-attendance-alloccurrence-label"
+              class="calendar-context-heading-label"
+              scope="all-occurrences"
+              value="&calendar.context.attendance.all2.label;"/>
+        <menu id="task-context-menu-attendance-accepted-all-menu"
+              label="&calendar.context.attendance.all.accepted.label;"
+              accesskey="&calendar.context.attendance.all.accepted.accesskey;"
+              value="ACCEPTED"
+              name="task-context-attendance-all"
+              scope="all-occurrences">
+          <menupopup id="task-context-menu-alloccurrences-accept-menupopup">
+            <menuitem id="task-context-menu-attend-accept-all-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="ACCEPTED"
+                      respmode="AUTO"/>
+            <menuitem id="task-context-menu-attend-accept-all-dontsend-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="ACCEPTED"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="task-context-menu-attendance-tentative-all-menu"
+              label="&calendar.context.attendance.all.tentative.label;"
+              accesskey="&calendar.context.attendance.all.tentative.accesskey;"
+              value="TENTATIVE"
+              name="task-context-attendance-all"
+              scope="all-occurrences">
+          <menupopup id="task-context-menu-alloccurrences-tentative-menupopup">
+            <menuitem id="task-context-menu-attend-tentative-all-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="TENTATIVE"
+                      respmode="AUTO"/>
+            <menuitem id="task-context-menu-attend-tentative-all-dontsend-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="TENTATIVE"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="task-context-menu-attendance-decline-all-menu"
+              label="&calendar.context.attendance.all.declined.label;"
+              accesskey="&calendar.context.attendance.all.declined.accesskey;"
+              value="DECLINED"
+              name="task-context-attendance-all"
+              scope="all-occurrences">
+          <menupopup id="task-context-menu-alloccurrences-decline-menupopup">
+            <menuitem id="task-context-menu-attend-declined-all-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="DECLINED"
+                      respmode="AUTO"/>
+            <menuitem id="task-context-menu-attend-declined-all-dontsend-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="DECLINED"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="task-context-menu-attendance-inprogress-all-menu"
+              label="&calendar.context.attendance.all.inprogress.label;"
+              accesskey="&calendar.context.attendance.all.inprogress.accesskey;"
+              value="IN-PROGRESS"
+              name="task-context-attendance-all"
+              scope="all-occurrences">
+          <menupopup id="task-context-menu-alloccurrences-inprogress-menupopup">
+            <menuitem id="task-context-menu-attend-inprogress-all-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="IN-PROGRESS"
+                      respmode="AUTO"/>
+            <menuitem id="task-context-menu-attend-inprogress-all-dontsend-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="IN-PROGRESS"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menu id="task-context-menu-attendance-completed-all-menu"
+              label="&calendar.context.attendance.all.completed.label;"
+              accesskey="&calendar.context.attendance.all.completed.accesskey;"
+              value="COMPLETED"
+              name="task-context-attendance-all"
+              scope="all-occurrences">
+          <menupopup id="task-context-menu-alloccurrences-completed-menupopup">
+            <menuitem id="task-context-menu-attend-completed-all-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.send.label;"
+                      accesskey="&calendar.context.attendance.send.accesskey;"
+                      respvalue="COMPLETED"
+                      respmode="AUTO"/>
+            <menuitem id="task-context-menu-attend-completed-all-dontsend-menuitem"
+                      scope="all-occurrences"
+                      label="&calendar.context.attendance.dontsend.label;"
+                      accesskey="&calendar.context.attendance.dontsend.accesskey;"
+                      respvalue="COMPLETED"
+                      respmode="NONE"/>
+          </menupopup>
+        </menu>
+        <menuitem id="task-context-menu-attendance-delegated-all-menu"
+                  label="&calendar.context.attendance.all.delegated.label;"
+                  name="task-context-attendance-delegated-all"
+                  scope="all-occurrences"
+                  value="DELEGATED"/>
+        <menuitem id="task-context-menu-attendance-needsaction-all-menu"
+                  label="&calendar.context.attendance.all.delegated.label;"
+                  name="task-context-attendance-needaction-all"
+                  scope="all-occurrences"
+                  value="NEEDS-ACTION"/>
+      </menupopup>
+    </menu>
+    <menuseparator id="task-context-menu-separator-filter"/>
+    <menu id="task-context-menu-filter-todaypane"
+          label="&calendar.tasks.view.filtertasks.label;"
+          accesskey="&calendar.tasks.view.filtertasks.accesskey;">
+      <menupopup id="task-context-menu-filter-todaypane-popup">
+        <menuitem id="task-context-menu-filter-todaypane-current"
+                  name="filtergrouptodaypane"
+                  value="throughcurrent"
+                  type="radio"
+                  command="calendar_task_filter_todaypane_command"
+                  label="&calendar.task.filter.current.label;"
+                  accesskey="&calendar.task.filter.current.accesskey;"/>
+        <menuitem id="task-context-menu-filter-todaypane-today"
+                  name="filtergrouptodaypane"
+                  value="throughtoday"
+                  type="radio"
+                  command="calendar_task_filter_todaypane_command"
+                  label="&calendar.task.filter.today.label;"
+                  accesskey="&calendar.task.filter.today.accesskey;"/>
+        <menuitem id="task-context-menu-filter-todaypane-next7days"
+                  name="filtergrouptodaypane"
+                  value="throughsevendays"
+                  type="radio"
+                  command="calendar_task_filter_todaypane_command"
+                  label="&calendar.task.filter.next7days.label;"
+                  accesskey="&calendar.task.filter.next7days.accesskey;"/>
+        <menuitem id="task-context-menu-filter-todaypane-notstarted"
+                  name="filtergrouptodaypane"
+                  value="notstarted"
+                  type="radio"
+                  command="calendar_task_filter_todaypane_command"
+                  label="&calendar.task.filter.notstarted.label;"
+                  accesskey="&calendar.task.filter.notstarted.accesskey;"/>
+        <menuitem id="task-context-menu-filter-todaypane-overdue"
+                  name="filtergrouptodaypane"
+                  value="overdue"
+                  type="radio"
+                  command="calendar_task_filter_todaypane_command"
+                  label="&calendar.task.filter.overdue.label;"
+                  accesskey="&calendar.task.filter.overdue.accesskey;"/>
+        <menuitem id="task-context-menu-filter-todaypane-completed"
+                  name="filtergrouptodaypane"
+                  type="radio"
+                  value="completed"
+                  command="calendar_task_filter_todaypane_command"
+                  label="&calendar.task.filter.completed.label;"
+                  accesskey="&calendar.task.filter.completed.accesskey;"/>
+        <menuitem id="task-context-menu-filter-todaypane-open"
+                  name="filtergrouptodaypane"
+                  type="radio"
+                  value="open"
+                  command="calendar_task_filter_todaypane_command"
+                  label="&calendar.task.filter.open.label;"
+                  accesskey="&calendar.task.filter.open.accesskey;"/>
+        <menuitem id="task-context-menu-filter-todaypane-all"
+                  name="filtergrouptodaypane"
+                  value="all"
+                  type="radio"
+                  command="calendar_task_filter_todaypane_command"
+                  label="&calendar.task.filter.all.label;"
+                  accesskey="&calendar.task.filter.all.accesskey;"/>
+      </menupopup>
+    </menu>
+  </menupopup>
+
+  <!-- TASKVIEW LINK CONTEXT MENU -->
+  <menupopup id="taskview-link-context-menu">
+    <menuitem id="taskview-link-context-menu-copy"
+              label="&calendar.copylink.label;"
+              accesskey="&calendar.copylink.accesskey;"
+              oncommand="taskViewCopyLink(document.popupNode)"/>
+  </menupopup>
+
+  <!-- CALENDAR EVENT DIALOG (IN TAB) TOOLBAR CONTEXT MENU -->
+  <menupopup id="event-dialog-toolbar-context-menu"
+             onpopupshowing="onToolbarsPopupShowingForTabType(event);">
+    <menuseparator id="customizeEventToolbarMenuSeparator"/>
+    <menuitem id="CustomizeDialogToolbar"
+              label="&event.menu.view.toolbars.customize.label;"
+              command="cmd_customize"/>
+  </menupopup>
+</popupset>
--- a/calendar/lightning/content/messenger-overlay-sidebar.xhtml
+++ b/calendar/lightning/content/messenger-overlay-sidebar.xhtml
@@ -4,824 +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">
 
-  <window id="messengerWindow">
-
-    <popupset id="calendar-popupset">
-      <!-- Tooltips -->
-      <tooltip id="calendar-list-tooltip"
-               onpopupshowing="return calendarListTooltipShowing(event)"/>
-
-      <tooltip id="eventTreeTooltip"
-              onpopupshowing="return showToolTip(this, unifinderTreeView.getItemFromEvent(event))"
-              noautohide="true"/>
-
-      <tooltip id="taskTreeTooltip"
-              onpopupshowing="return showToolTip(this, getTaskTree().getTaskFromEvent(event))"
-              noautohide="true"/>
-
-      <tooltip id="itemTooltip"
-              noautohide="true"/>
-
-      <!-- CALENDAR TOOLBAR CONTEXT MENU -->
-      <menupopup id="calendar-toolbar-context"
-                 onpopupshowing="onViewToolbarsPopupShowing(event, ['navigation-toolbox', 'calendar-toolbox']);">
-        <menuseparator id="customizeCalendarToolbarMenuSeparator"/>
-        <menuitem id="CustomizeCalendarToolbar"
-                  label="&calendar.menu.customize.label;"
-                  accesskey="&calendar.menu.customize.accesskey;"
-                  oncommand="CustomizeMailToolbar('calendar-toolbox', 'CustomizeCalendarToolbar')"/>
-      </menupopup>
-      <menupopup id="task-toolbar-context"
-                 onpopupshowing="onViewToolbarsPopupShowing(event, ['navigation-toolbox', 'task-toolbox']);">
-        <menuseparator id="customizeTaskToolbarMenuSeparator"/>
-        <menuitem id="CustomizeTaskToolbar"
-                  label="&calendar.menu.customize.label;"
-                  accesskey="&calendar.menu.customize.accesskey;"
-                  oncommand="CustomizeMailToolbar('task-toolbox', 'CustomizeTaskToolbar')"/>
-      </menupopup>
-
-      <!-- CALENDAR LIST CONTEXT MENU -->
-      <menupopup id="list-calendars-context-menu"
-                 onpopupshowing="return calendarListSetupContextMenu(event);">
-        <menuitem id="list-calendars-context-togglevisible"
-                  class="needs-calendar"
-                  accesskeyshow="&calendar.context.showcalendar.accesskey;"
-                  accesskeyhide="&calendar.context.hidecalendar.accesskey;"
-                  oncommand="toggleCalendarVisible(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
-        <menuitem id="list-calendars-context-showonly"
-                  class="needs-calendar"
-                  accesskey="&calendar.context.showonly.accesskey;"
-                  oncommand="showOnlyCalendar(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
-        <menuitem id="list-calendars-context-showall"
-                  label="&calendar.context.showall.label;"
-                  accesskey="&calendar.context.showall.accesskey;"
-                  oncommand="showAllCalendars();"/>
-        <menuseparator id="list-calendars-context-showops-menuseparator"/>
-        <menuitem id="list-calendars-context-new"
-                  label="&calendar.context.newserver.label;"
-                  accesskey="&calendar.context.newserver.accesskey;"
-                  command="calendar_new_calendar_command"/>
-        <menuitem id="list-calendars-context-find"
-                  label="&calendar.context.findcalendar.label;"
-                  accesskey="&calendar.context.findcalendar.accesskey;"
-                  oncommand="openCalendarSubscriptionsDialog();"/>
-        <menuitem id="list-calendars-context-delete"
-                  class="needs-calendar"
-                  labeldelete="&calendar.context.deleteserver2.label;"
-                  labelremove="&calendar.context.removeserver.label;"
-                  labelunsubscribe="&calendar.context.unsubscribeserver.label;"
-                  accesskeydelete="&calendar.context.deleteserver2.accesskey;"
-                  accesskeyremove="&calendar.context.removeserver.accesskey;"
-                  accesskeyunsubscribe="&calendar.context.unsubscribeserver.accesskey;"
-                  command="calendar_delete_calendar_command"/>
-        <menuseparator id="list-calendars-context-itemops-menuseparator"/>
-        <menuitem id="list-calendars-context-export"
-                  class="needs-calendar"
-                  label="&calendar.context.export.label;"
-                  accesskey="&calendar.context.export.accesskey;"
-                  oncommand="exportEntireCalendar(document.getElementById('list-calendars-context-menu').contextCalendar);"/>
-        <menuitem id="list-calendars-context-publish"
-                  class="needs-calendar"
-                  label="&calendar.context.publish.label;"
-                  accesskey="&calendar.context.publish.accesskey;"
-                  command="calendar_publish_selected_calendar_command"/>
-        <menuseparator id="list-calendars-context-export-menuseparator"
-                  class="needs-calendar"/>
-        <menuitem id="list-calendars-context-reload"
-                  label="&calendar.context.synccalendars.label;"
-                  accesskey="&calendar.context.synccalendars.accesskey;"
-                  command="calendar_reload_remote_calendars"/>
-        <menuseparator id="list-calendars-context-reload-menuseparator"
-                       class="needs-calendar"/>
-        <menuitem id="list-calendars-context-edit"
-                  class="needs-calendar"
-                  label="&calendar.context.properties.label;"
-                  accesskey="&calendar.context.properties.accesskey;"
-                  command="calendar_edit_calendar_command"/>
-      </menupopup>
-
-      <!-- CALENDAR ITEM CONTEXT MENU -->
-      <menupopup id="calendar-item-context-menu"
-                 onpopupshowing="return setupContextItemType(event, currentView().getSelectedItems());">
-        <menuitem id="calendar-item-context-menu-modify-menuitem"
-                  label="&calendar.context.modifyorviewitem.label;"
-                  accesskey="&calendar.context.modifyorviewitem.accesskey;"
-                  command="calendar_modify_event_command"/>
-        <menuitem id="calendar-item-context-menu-newevent-menutitem"
-                  label="&calendar.context.newevent.label;"
-                  accesskey="&calendar.context.newevent.accesskey;"
-                  key="calendar-new-event-key"
-                  command="calendar_new_event_context_command"/>
-        <menuitem id="calendar-item-context-menu-newtodo-menuitem"
-                  label="&calendar.context.newtodo.label;"
-                  accesskey="&calendar.context.newtodo.accesskey;"
-                  key="calendar-new-todo-key"
-                  command="calendar_new_todo_context_command"/>
-        <menuseparator id="calendar-item-context-menuseparator-adddeletemodify"/>
-        <menuitem id="calendar-item-context-menu-cut-menuitem"
-                  label="&calendar.context.cutevent.label;"
-                  accesskey="&calendar.context.cutevent.accesskey;"
-                  key="key_cut"
-                  command="cmd_cut"/>
-        <menuitem id="calendar-item-context-menu-copy-menuitem"
-                  label="&calendar.context.copyevent.label;"
-                  accesskey="&calendar.context.copyevent.accesskey;"
-                  key="key_copy"
-                  command="cmd_copy"/>
-        <menuitem id="calendar-item-context-menu-paste-menuitem"
-                  label="&calendar.context.pasteevent.label;"
-                  accesskey="&calendar.context.pasteevent.accesskey;"
-                  key="key_paste"
-                  command="cmd_paste"/>
-        <menuseparator id="calendar-item-context-separator-cutcopypaste"/>
-        <menu id="calendar-item-context-menu-convert-menu"
-              label="&calendar.context.convertmenu.label;"
-              accesskey="&calendar.context.convertmenu.accesskey.calendar;">
-          <menupopup id="calendar-item-context-menu-convert-menupopup">
-            <menuitem id="calendar-view-context-menu-convert-message-menuitem"
-                      label="&calendar.context.convertmenu.message.label;"
-                      accesskey="&calendar.context.convertmenu.message.accesskey;"
-                      oncommand="calendarMailButtonDNDObserver.onDropItems(currentView().getSelectedItems())"/>
-            <menuitem id="calendar-item-context-menu-convert-event-menuitem"
-                      class="todo-only"
-                      label="&calendar.context.convertmenu.event.label;"
-                      accesskey="&calendar.context.convertmenu.event.accesskey;"
-                      oncommand="calendarCalendarButtonDNDObserver.onDropItems(currentView().getSelectedItems())"/>
-            <menuitem id="calendar-item-context-menu-convert-task-menuitem"
-                      class="event-only"
-                      label="&calendar.context.convertmenu.task.label;"
-                      accesskey="&calendar.context.convertmenu.task.accesskey;"
-                      oncommand="calendarTaskButtonDNDObserver.onDropItems(currentView().getSelectedItems())"/>
-          </menupopup>
-        </menu>
-        <menuseparator id="calendar-menuseparator-before-delete"/>
-        <!-- the label and accesskey of the following menuitem is set during runtime,
-            and depends on whether the item is a task or an event -->
-        <menuitem id="calendar-item-context-menu-delete-menuitem"
-                  key="calendar-delete-item-key"
-                  command="calendar_delete_event_command"/>
-        <menu id="calendar-item-context-menu-attendance-menu"
-              label="&calendar.context.attendance.menu.label;"
-              accesskey="&calendar.context.attendance.menu.accesskey;"
-              oncommand="setContextPartstat(event.target, currentView().getSelectedItems())"
-              observes="calendar_attendance_command">
-          <menupopup id="calendar-item-context-menu-attendance-menupopup">
-            <label id="calendar-item-context-attendance-thisoccurrence-label"
-                  class="calendar-context-heading-label"
-                  scope="this-occurrence"
-                  value="&calendar.context.attendance.occurrence.label;"/>
-            <menu id="calendar-item-context-menu-attendance-accepted-menu"
-                  label="&calendar.context.attendance.occ.accepted.label;"
-                  accesskey="&calendar.context.attendance.occ.accepted.accesskey;"
-                  value="ACCEPTED"
-                  name="calendar-item-context-attendance"
-                  scope="this-occurrence">
-              <menupopup id="calendar-item-context-menu-occurrence-accepted-menupopup">
-                <menuitem id="calendar-item-context-menu-attend-accept-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="ACCEPTED"
-                          respmode="AUTO"/>
-                <menuitem id="calendar-item-context-menu-attend-accept-dontsend-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="ACCEPTED"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="calendar-item-context-menu-attendance-tentative-menu"
-                  label="&calendar.context.attendance.occ.tentative.label;"
-                  accesskey="&calendar.context.attendance.occ.tentative.accesskey;"
-                  value="TENTATIVE"
-                  name="calendar-item-context-attendance"
-                  scope="this-occurrence">
-              <menupopup id="calendar-item-context-menu-occurrence-tentative-menupopup">
-                <menuitem id="calendar-item-context-menu-attend-tentative-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="TENTATIVE"
-                          respmode="AUTO"/>
-                <menuitem id="calendar-item-context-menu-attend-tentative-dontsend-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="TENTATIVE"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="calendar-item-context-menu-attendance-declined-menu"
-                  label="&calendar.context.attendance.occ.declined.label;"
-                  accesskey="&calendar.context.attendance.occ.declined.accesskey;"
-                  value="DECLINED"
-                  name="calendar-item-context-attendance"
-                  scope="this-occurrence">
-              <menupopup id="calendar-item-context-menu-occurrence-tentative-menupopup">
-                <menuitem id="calendar-item-context-menu-attend-declined-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="DECLINED"
-                          respmode="AUTO"/>
-                <menuitem id="calendar-item-context-menu-attend-declined-dontsend-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="DECLINED"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menuitem id="calendar-item-context-menu-attendance-delegated-menu"
-                      label="&calendar.context.attendance.occ.delegated.label;"
-                      name="calendar-item-context-attendance"
-                      scope="this-occurrence"
-                      value="DELEGATED"/>
-            <menuitem id="calendar-item-context-menu-attendance-needsaction-menu"
-                      label="&calendar.context.attendance.occ.needsaction.label;"
-                      name="calendar-item-context-attendance"
-                      scope="this-occurrence"
-                      value="NEEDS-ACTION"/>
-            <label id="calendar-item-context-attendance-alloccurrence-label"
-                  class="calendar-context-heading-label"
-                  scope="all-occurrences"
-                  value="&calendar.context.attendance.all2.label;"/>
-            <menu id="calendar-item-context-menu-attendance-accepted-all-menu"
-                  label="&calendar.context.attendance.all.accepted.label;"
-                  accesskey="&calendar.context.attendance.all.accepted.accesskey;"
-                  value="ACCEPTED"
-                  name="calendar-item-context-attendance-all"
-                  scope="all-occurrences">
-              <menupopup id="calendar-item-context-menu-alloccurrences-accept-menupopup">
-                <menuitem id="calendar-item-context-menu-attend-accept-all-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="ACCEPTED"
-                          respmode="AUTO"/>
-                <menuitem id="calendar-item-context-menu-attend-accept-all-dontsend-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="ACCEPTED"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="calendar-item-context-menu-attendance-tentative-all-menu"
-                  label="&calendar.context.attendance.all.tentative.label;"
-                  accesskey="&calendar.context.attendance.all.tentative.accesskey;"
-                  value="TENTATIVE"
-                  name="calendar-item-context-attendance-all"
-                  scope="all-occurrences">
-              <menupopup id="calendar-item-context-menu-alloccurrences-tentative-menupopup">
-                <menuitem id="calendar-item-context-menu-attend-tentative-all-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="TENTATIVE"
-                          respmode="AUTO"/>
-                <menuitem id="calendar-item-context-menu-attend-tentative-all-dontsend-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="TENTATIVE"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="calendar-item-context-menu-attendance-decline-all-menu"
-                  label="&calendar.context.attendance.all.declined.label;"
-                  accesskey="&calendar.context.attendance.all.declined.accesskey;"
-                  value="DECLINED"
-                  name="calendar-item-context-attendance-all"
-                  scope="all-occurrences">
-              <menupopup id="calendar-item-context-menu-alloccurrences-decline-menupopup">
-                <menuitem id="calendar-item-context-menu-attend-declined-all-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="DECLINED"
-                          respmode="AUTO"/>
-                <menuitem id="calendar-item-context-menu-attend-declined-all-dontsend-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="DECLINED"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menuitem id="calendar-item-context-menu-attendance-delegated-all-menu"
-                      label="&calendar.context.attendance.all.delegated.label;"
-                      name="calendar-item-context-attendance-delegated-all"
-                      scope="all-occurrences"
-                      value="DELEGATED"/>
-            <menuitem id="calendar-item-context-menu-attendance-needsaction-all-menu"
-                      label="&calendar.context.attendance.all.needsaction.label;"
-                      name="calendar-item-context-attendance-needaction-all"
-                      scope="all-occurrences"
-                      value="NEEDS-ACTION"/>
-          </menupopup>
-        </menu>
-      </menupopup>
-
-      <!-- CALENDAR VIEW CONTEXT MENU -->
-      <menupopup id="calendar-view-context-menu">
-        <menuitem id="calendar-view-context-menu-newevent"
-                  label="&calendar.context.newevent.label;"
-                  command="calendar_new_event_context_command"
-                  accesskey="&calendar.context.newevent.accesskey;"
-                  key="calendar-new-event-key"/>
-        <menuitem id="calendar-view-context-menu-newtodo"
-                  label="&calendar.context.newtodo.label;"
-                  command="calendar_new_todo_context_command"
-                  accesskey="&calendar.context.newtodo.accesskey;"
-                  key="calendar-new-todo-key"/>
-        <!-- These labels are set dynamically, based on the current view -->
-        <menuitem id="calendar-view-context-menu-previous"
-                  label=""
-                  accesskey=""
-                  command="calendar_view_prev_command"
-                  label-day="&calendar.prevday.label;"
-                  label-week="&calendar.prevweek.label;"
-                  label-multiweek="&calendar.prevweek.label;"
-                  label-month="&calendar.prevmonth.label;"
-                  accesskey-day="&calendar.prevday.accesskey;"
-                  accesskey-week="&calendar.prevweek.accesskey;"
-                  accesskey-multiweek="&calendar.prevweek.accesskey;"
-                  accesskey-month="&calendar.prevmonth.accesskey;"/>
-        <menuitem id="calendar-view-context-menu-next"
-                  label=""
-                  command="calendar_view_next_command"
-                  label-day="&calendar.nextday.label;"
-                  label-week="&calendar.nextweek.label;"
-                  label-multiweek="&calendar.nextweek.label;"
-                  label-month="&calendar.nextmonth.label;"
-                  accesskey-day="&calendar.nextday.accesskey;"
-                  accesskey-week="&calendar.nextweek.accesskey;"
-                  accesskey-multiweek="&calendar.nextweek.accesskey;"
-                  accesskey-month="&calendar.nextmonth.accesskey;"/>
-        <menuseparator id="calendar-item-context-separator-cutcopypaste"/>
-        <!-- Cut and copy doesn't make sense in the views, but only showing paste
-            makes it look like something is missing. Disable by default. -->
-        <menuitem id="calendar-view-context-menu-cut-menuitem"
-                  label="&calendar.context.cutevent.label;"
-                  accesskey="&calendar.context.cutevent.accesskey;"
-                  key="key_cut"
-                  disabled="true"/>
-        <menuitem id="calendar-view-context-menu-copy-menuitem"
-                  label="&calendar.context.copyevent.label;"
-                  accesskey="&calendar.context.copyevent.accesskey;"
-                  key="key_copy"
-                  disabled="true"/>
-        <menuitem id="calendar-view-context-menu-paste-menuitem"
-                  label="&calendar.context.pasteevent.label;"
-                  accesskey="&calendar.context.pasteevent.accesskey;"
-                  key="key_paste"
-                  command="cmd_paste"/>
-      </menupopup>
-
-      <!-- TASK ITEM CONTEXT MENU -->
-      <menupopup id="taskitem-context-menu"
-                onpopupshowing="changeContextMenuForTask(event);"
-                onpopuphiding="handleTaskContextMenuStateChange(event);">
-        <menuitem id="task-context-menu-modify"
-                  label="&calendar.context.modifyorviewtask.label;"
-                  accesskey="&calendar.context.modifyorviewtask.accesskey;"
-                  command="calendar_modify_todo_command"/>
-        <menuitem id="task-context-menu-modify-todaypane"
-                  label="&calendar.context.modifyorviewtask.label;"
-                  accesskey="&calendar.context.modifyorviewtask.accesskey;"
-                  command="calendar_modify_todo_todaypane_command"/>
-        <menuitem id="task-context-menu-new"
-                  label="&calendar.context.newtodo.label;"
-                  accesskey="&calendar.context.newtodo.accesskey;"
-                  key="calendar-new-todo-key"
-                  command="calendar_new_todo_command"/>
-        <menuitem id="task-context-menu-new-todaypane"
-                  label="&calendar.context.newtodo.label;"
-                  accesskey="&calendar.context.newtodo.accesskey;"
-                  key="calendar-new-todo-key"
-                  command="calendar_new_todo_todaypane_command"/>
-        <menuseparator id="task-context-menuseparator-cutcopypaste"/>
-        <menuitem id="task-context-menu-cut-menuitem"
-                  label="&calendar.context.cutevent.label;"
-                  accesskey="&calendar.context.cutevent.accesskey;"
-                  key="key_cut"
-                  command="cmd_cut"/>
-        <menuitem id="task-context-menu-copy-menuitem"
-                  label="&calendar.context.copyevent.label;"
-                  accesskey="&calendar.context.copyevent.accesskey;"
-                  key="key_copy"
-                  command="cmd_copy"/>
-        <menuitem id="task-context-menu-paste-menuitem"
-                  label="&calendar.context.pasteevent.label;"
-                  accesskey="&calendar.context.pasteevent.accesskey;"
-                  key="key_paste"
-                  command="cmd_paste"/>
-        <menuseparator id="calendar-menuseparator-beforemarkcompleted"/>
-        <menuitem id="calendar-context-markcompleted"
-                  type="checkbox"
-                  autocheck="false"
-                  label="&calendar.context.markcompleted.label;"
-                  accesskey="&calendar.context.markcompleted.accesskey;"
-                  command="calendar_toggle_completed_command"/>
-        <menu id="task-context-menu-progress"
-              label="&calendar.context.progress.label;"
-              accesskey="&calendar.context.progress.accesskey;"
-              command="calendar_general-progress_command">
-          <menupopup is="calendar-task-progress-menupopup"/>
-        </menu>
-        <menu id="task-context-menu-priority"
-              label="&calendar.context.priority.label;"
-              accesskey="&calendar.context.priority.accesskey;"
-              command="calendar_general-priority_command">
-          <menupopup is="calendar-task-priority-menupopup"/>
-        </menu>
-        <menu id="task-context-menu-postpone"
-              label="&calendar.context.postpone.label;"
-              accesskey="&calendar.context.postpone.accesskey;"
-              command="calendar_general-postpone_command">
-          <menupopup id="task-context-postpone-menupopup">
-            <menuitem id="task-context-postpone-1hour"
-                      label="&calendar.context.postpone.1hour.label;"
-                      accesskey="&calendar.context.postpone.1hour.accesskey;"
-                      command="calendar_postpone-1hour_command"/>
-            <menuitem id="task-context-postpone-1day"
-                      label="&calendar.context.postpone.1day.label;"
-                      accesskey="&calendar.context.postpone.1day.accesskey;"
-                      command="calendar_postpone-1day_command"/>
-            <menuitem id="task-context-postpone-1week"
-                      label="&calendar.context.postpone.1week.label;"
-                      accesskey="&calendar.context.postpone.1week.accesskey;"
-                      command="calendar_postpone-1week_command"/>
-          </menupopup>
-        </menu>
-        <menu id="calendar-context-calendar-menu"
-              label="&calendar.calendar.label;"
-              accesskey="&calendar.calendar.accesskey;">
-              <menupopup id="calendar-context-calendar-menupopup"
-                        onpopupshowing="addCalendarNames(event);"/>
-        </menu>
-        <menuseparator id="task-context-menu-separator-conversion"/>
-        <menu id="task-context-menu-convert"
-              label="&calendar.context.convertmenu.label;"
-              accesskey="&calendar.context.convertmenu.accesskey.calendar;">
-          <menupopup id="task-context-convert-menupopup">
-            <menuitem id="calendar-context-converttomessage"
-                      label="&calendar.context.convertmenu.message.label;"
-                      accesskey="&calendar.context.convertmenu.message.accesskey;"
-                      oncommand="tasksToMail(event)"/>
-            <menuitem id="calendar-context-converttoevent"
-                      label="&calendar.context.convertmenu.event.label;"
-                      accesskey="&calendar.context.convertmenu.event.accesskey;"
-                      oncommand="tasksToEvents(event)"/>
-          </menupopup>
-        </menu>
-        <menuseparator/>
-        <menuitem id="task-context-menu-delete"
-                  label="&calendar.context.deletetask.label;"
-                  accesskey="&calendar.context.deletetask.accesskey;"
-                  command="calendar_delete_todo_command"/>
-        <menu id="task-context-menu-attendance-menu"
-              label="&calendar.context.attendance.menu.label;"
-              accesskey="&calendar.context.attendance.menu.accesskey;"
-              oncommand="setContextPartstat(event.target, getSelectedTasks())"
-              observes="calendar_attendance_command">
-          <menupopup id="task-context-menu-attendance-menupopup">
-            <label id="task-context-attendance-thisoccurrence-label"
-                  class="calendar-context-heading-label"
-                  scope="this-occurrence"
-                  value="&calendar.context.attendance.occurrence.label;"/>
-            <menu id="task-context-menu-attendance-accepted-menu"
-                  label="&calendar.context.attendance.occ.accepted.label;"
-                  accesskey="&calendar.context.attendance.occ.accepted.accesskey;"
-                  value="ACCEPTED"
-                  name="task-context-attendance"
-                  scope="this-occurrence">
-              <menupopup id="task-context-menu-occurrence-accepted-menupopup">
-                <menuitem id="task-context-menu-attend-accept-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="ACCEPTED"
-                          respmode="AUTO"/>
-                <menuitem id="task-context-menu-attend-accept-dontsend-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="ACCEPTED"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="task-context-menu-attendance-tentative-menu"
-                  label="&calendar.context.attendance.occ.tentative.label;"
-                  accesskey="&calendar.context.attendance.occ.tentative.accesskey;"
-                  value="TENTATIVE"
-                  name="task-context-attendance"
-                  scope="this-occurrence">
-              <menupopup id="task-context-menu-occurrence-tentative-menupopup">
-                <menuitem id="task-context-menu-attend-tentative-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="TENTATIVE"
-                          respmode="AUTO"/>
-                <menuitem id="task-context-menu-attend-tentative-dontsend-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="TENTATIVE"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="task-context-menu-attendance-declined-menu"
-                  label="&calendar.context.attendance.occ.declined.label;"
-                  accesskey="&calendar.context.attendance.occ.declined.accesskey;"
-                  value="DECLINED"
-                  name="task-context-attendance"
-                  scope="this-occurrence">
-              <menupopup id="task-context-menu-occurrence-tentative-menupopup">
-                <menuitem id="task-context-menu-attend-declined-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="DECLINED"
-                          respmode="AUTO"/>
-                <menuitem id="task-context-menu-attend-declined-dontsend-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="DECLINED"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="task-context-menu-attendance-inprogress-menu"
-                  label="&calendar.context.attendance.occ.inprogress.label;"
-                  accesskey="&calendar.context.attendance.occ.inprogress.accesskey;"
-                  value="IN-PROGRESS"
-                  name="task-context-attendance"
-                  scope="this-occurrence">
-              <menupopup id="task-context-menu-occurrence-inprogress-menupopup">
-                <menuitem id="task-context-menu-attend-inprogress-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="IN-PROGRESS"
-                          respmode="AUTO"/>
-                <menuitem id="task-context-menu-attend-inprogress-dontsend-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="IN-PROGRESS"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="task-context-menu-attendance-completed-menu"
-                  label="&calendar.context.attendance.occ.completed.label;"
-                  accesskey="&calendar.context.attendance.occ.completed.accesskey;"
-                  value="COMPLETED"
-                  name="task-context-attendance"
-                  scope="this-occurrence">
-              <menupopup id="task-context-menu-occurrence-completed-menupopup">
-                <menuitem id="task-context-menu-attend-completed-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="COMPLETED"
-                          respmode="AUTO"/>
-                <menuitem id="task-context-menu-attend-completed-dontsend-menuitem"
-                          scope="this-occurrence"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="COMPLETED"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menuitem id="task-context-menu-attendance-delegated-menu"
-                      label="&calendar.context.attendance.occ.delegated.label;"
-                      name="task-context-attendance"
-                      scope="this-occurrence"
-                      value="DELEGATED"/>
-            <menuitem id="task-context-menu-attendance-needsaction-menu"
-                      label="&calendar.context.attendance.occ.needsaction.label;"
-                      name="task-context-attendance"
-                      scope="this-occurrence"
-                      value="NEEDS-ACTION"/>
-            <label id="task-context-attendance-alloccurrence-label"
-                  class="calendar-context-heading-label"
-                  scope="all-occurrences"
-                  value="&calendar.context.attendance.all2.label;"/>
-            <menu id="task-context-menu-attendance-accepted-all-menu"
-                  label="&calendar.context.attendance.all.accepted.label;"
-                  accesskey="&calendar.context.attendance.all.accepted.accesskey;"
-                  value="ACCEPTED"
-                  name="task-context-attendance-all"
-                  scope="all-occurrences">
-              <menupopup id="task-context-menu-alloccurrences-accept-menupopup">
-                <menuitem id="task-context-menu-attend-accept-all-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="ACCEPTED"
-                          respmode="AUTO"/>
-                <menuitem id="task-context-menu-attend-accept-all-dontsend-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="ACCEPTED"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="task-context-menu-attendance-tentative-all-menu"
-                  label="&calendar.context.attendance.all.tentative.label;"
-                  accesskey="&calendar.context.attendance.all.tentative.accesskey;"
-                  value="TENTATIVE"
-                  name="task-context-attendance-all"
-                  scope="all-occurrences">
-              <menupopup id="task-context-menu-alloccurrences-tentative-menupopup">
-                <menuitem id="task-context-menu-attend-tentative-all-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="TENTATIVE"
-                          respmode="AUTO"/>
-                <menuitem id="task-context-menu-attend-tentative-all-dontsend-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="TENTATIVE"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="task-context-menu-attendance-decline-all-menu"
-                  label="&calendar.context.attendance.all.declined.label;"
-                  accesskey="&calendar.context.attendance.all.declined.accesskey;"
-                  value="DECLINED"
-                  name="task-context-attendance-all"
-                  scope="all-occurrences">
-              <menupopup id="task-context-menu-alloccurrences-decline-menupopup">
-                <menuitem id="task-context-menu-attend-declined-all-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="DECLINED"
-                          respmode="AUTO"/>
-                <menuitem id="task-context-menu-attend-declined-all-dontsend-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="DECLINED"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="task-context-menu-attendance-inprogress-all-menu"
-                  label="&calendar.context.attendance.all.inprogress.label;"
-                  accesskey="&calendar.context.attendance.all.inprogress.accesskey;"
-                  value="IN-PROGRESS"
-                  name="task-context-attendance-all"
-                  scope="all-occurrences">
-              <menupopup id="task-context-menu-alloccurrences-inprogress-menupopup">
-                <menuitem id="task-context-menu-attend-inprogress-all-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="IN-PROGRESS"
-                          respmode="AUTO"/>
-                <menuitem id="task-context-menu-attend-inprogress-all-dontsend-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="IN-PROGRESS"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menu id="task-context-menu-attendance-completed-all-menu"
-                  label="&calendar.context.attendance.all.completed.label;"
-                  accesskey="&calendar.context.attendance.all.completed.accesskey;"
-                  value="COMPLETED"
-                  name="task-context-attendance-all"
-                  scope="all-occurrences">
-              <menupopup id="task-context-menu-alloccurrences-completed-menupopup">
-                <menuitem id="task-context-menu-attend-completed-all-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.send.label;"
-                          accesskey="&calendar.context.attendance.send.accesskey;"
-                          respvalue="COMPLETED"
-                          respmode="AUTO"/>
-                <menuitem id="task-context-menu-attend-completed-all-dontsend-menuitem"
-                          scope="all-occurrences"
-                          label="&calendar.context.attendance.dontsend.label;"
-                          accesskey="&calendar.context.attendance.dontsend.accesskey;"
-                          respvalue="COMPLETED"
-                          respmode="NONE"/>
-              </menupopup>
-            </menu>
-            <menuitem id="task-context-menu-attendance-delegated-all-menu"
-                      label="&calendar.context.attendance.all.delegated.label;"
-                      name="task-context-attendance-delegated-all"
-                      scope="all-occurrences"
-                      value="DELEGATED"/>
-            <menuitem id="task-context-menu-attendance-needsaction-all-menu"
-                      label="&calendar.context.attendance.all.delegated.label;"
-                      name="task-context-attendance-needaction-all"
-                      scope="all-occurrences"
-                      value="NEEDS-ACTION"/>
-          </menupopup>
-        </menu>
-        <menuseparator id="task-context-menu-separator-filter"/>
-        <menu id="task-context-menu-filter-todaypane"
-              label="&calendar.tasks.view.filtertasks.label;"
-              accesskey="&calendar.tasks.view.filtertasks.accesskey;">
-          <menupopup id="task-context-menu-filter-todaypane-popup">
-            <menuitem id="task-context-menu-filter-todaypane-current"
-                      name="filtergrouptodaypane"
-                      value="throughcurrent"
-                      type="radio"
-                      command="calendar_task_filter_todaypane_command"
-                      label="&calendar.task.filter.current.label;"
-                      accesskey="&calendar.task.filter.current.accesskey;"/>
-            <menuitem id="task-context-menu-filter-todaypane-today"
-                      name="filtergrouptodaypane"
-                      value="throughtoday"
-                      type="radio"
-                      command="calendar_task_filter_todaypane_command"
-                      label="&calendar.task.filter.today.label;"
-                      accesskey="&calendar.task.filter.today.accesskey;"/>
-            <menuitem id="task-context-menu-filter-todaypane-next7days"
-                      name="filtergrouptodaypane"
-                      value="throughsevendays"
-                      type="radio"
-                      command="calendar_task_filter_todaypane_command"
-                      label="&calendar.task.filter.next7days.label;"
-                      accesskey="&calendar.task.filter.next7days.accesskey;"/>
-            <menuitem id="task-context-menu-filter-todaypane-notstarted"
-                      name="filtergrouptodaypane"
-                      value="notstarted"
-                      type="radio"
-                      command="calendar_task_filter_todaypane_command"
-                      label="&calendar.task.filter.notstarted.label;"
-                      accesskey="&calendar.task.filter.notstarted.accesskey;"/>
-            <menuitem id="task-context-menu-filter-todaypane-overdue"
-                      name="filtergrouptodaypane"
-                      value="overdue"
-                      type="radio"
-                      command="calendar_task_filter_todaypane_command"
-                      label="&calendar.task.filter.overdue.label;"
-                      accesskey="&calendar.task.filter.overdue.accesskey;"/>
-            <menuitem id="task-context-menu-filter-todaypane-completed"
-                      name="filtergrouptodaypane"
-                      type="radio"
-                      value="completed"
-                      command="calendar_task_filter_todaypane_command"
-                      label="&calendar.task.filter.completed.label;"
-                      accesskey="&calendar.task.filter.completed.accesskey;"/>
-            <menuitem id="task-context-menu-filter-todaypane-open"
-                      name="filtergrouptodaypane"
-                      type="radio"
-                      value="open"
-                      command="calendar_task_filter_todaypane_command"
-                      label="&calendar.task.filter.open.label;"
-                      accesskey="&calendar.task.filter.open.accesskey;"/>
-            <menuitem id="task-context-menu-filter-todaypane-all"
-                      name="filtergrouptodaypane"
-                      value="all"
-                      type="radio"
-                      command="calendar_task_filter_todaypane_command"
-                      label="&calendar.task.filter.all.label;"
-                      accesskey="&calendar.task.filter.all.accesskey;"/>
-          </menupopup>
-        </menu>
-      </menupopup>
-
-      <!-- TASKVIEW LINK CONTEXT MENU -->
-      <menupopup id="taskview-link-context-menu">
-        <menuitem id="taskview-link-context-menu-copy"
-                  label="&calendar.copylink.label;"
-                  accesskey="&calendar.copylink.accesskey;"
-                  oncommand="taskViewCopyLink(document.popupNode)"/>
-      </menupopup>
-
-      <!-- CALENDAR EVENT DIALOG (IN TAB) TOOLBAR CONTEXT MENU -->
-      <menupopup id="event-dialog-toolbar-context-menu"
-                 onpopupshowing="onToolbarsPopupShowingForTabType(event);">
-        <menuseparator id="customizeEventToolbarMenuSeparator"/>
-        <menuitem id="CustomizeDialogToolbar"
-                  label="&event.menu.view.toolbars.customize.label;"
-                  command="cmd_customize"/>
-      </menupopup>
-    </popupset>
-  </window>
-
   <toolbar id="tabbar-toolbar">
     <toolbarbutton id="calendar-tab-button"
                    class="toolbarbutton-1"
                    title="&lightning.toolbar.calendar.label;"
                    tooltiptext="&lightning.toolbar.calendar.tooltip;"
                    command="new_calendar_tab"/>
     <toolbarbutton id="task-tab-button"
                    class="toolbarbutton-1"
--- a/calendar/lightning/jar.mn
+++ b/calendar/lightning/jar.mn
@@ -9,16 +9,17 @@ lightning.jar:
 % overlay chrome://messenger/content/messenger.xhtml chrome://lightning/content/messenger-overlay-sidebar.xhtml
 % overlay chrome://communicator/content/pref/preferences.xhtml chrome://lightning/content/suite-overlay-preferences.xhtml application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
 % 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/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)
     content/lightning-invitation.xhtml                     (content/lightning-invitation.xhtml)
--- a/mail/base/content/messenger.xhtml
+++ b/mail/base/content/messenger.xhtml
@@ -509,16 +509,18 @@
     <menuitem label="&openAddressBookDock.label;" id="tasksOpenAddressBook"
               oncommand="openAddressBookDock();"/>
     <menuitem label="&dockOptions.label;" id="tasksMenuDockOptions"
               oncommand="openDockOptions();"/>
   </menupopup>
 </popupset>
 #endif
 
+#include ../../../calendar/lightning/content/calendar-context-menus-and-tooltips.inc.xhtml
+
 <vbox id="titlebar">
   <hbox id="titlebar-content">
     <spacer id="titlebar-spacer" flex="1"/>
     <hbox id="titlebar-buttonbox-container" align="start">
       <hbox id="titlebar-buttonbox">
         <toolbarbutton class="titlebar-button" id="titlebar-min" oncommand="window.minimize();"/>
         <toolbarbutton class="titlebar-button" id="titlebar-max" oncommand="onTitlebarMaxClick();"/>
         <toolbarbutton class="titlebar-button" id="titlebar-close" oncommand="window.close()"/>