<?xml version="1.0" encoding="UTF-8"?>
<!-- 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/. -->

<!DOCTYPE overlay [
  <!ENTITY % calendarDTD SYSTEM "chrome://calendar/locale/calendar.dtd" > %calendarDTD;
  <!ENTITY % eventDialogDTD SYSTEM "chrome://calendar/locale/calendar-event-dialog.dtd"> %eventDialogDTD;
  <!ENTITY % menuOverlayDTD SYSTEM "chrome://calendar/locale/menuOverlay.dtd" > %menuOverlayDTD;
]>

<overlay id="calendar-common-sets-overlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <stringbundleset id="calendar_stringbundles">
    <stringbundle id="bundle_branding" src="chrome://branding/locale/brand.properties"/>
  </stringbundleset>
  <script type="application/javascript" src="chrome://calendar/content/calendar-common-sets.js"/>

  <broadcasterset id="calendar_broadcasters">
    <broadcaster id="modeBroadcaster" mode="calendar"/>
    <broadcaster id="calendarviewBroadcaster"/>
    <broadcaster id="unifinder-todo-filter-broadcaster"
                 persist="value"
                 value="throughcurrent"/>
  </broadcasterset>

  <commandset id="calendar_commands"
              commandupdater="true"
              events="calendar_commands"
              oncommandupdate="calendarController.updateCommands()">
    <command id="calendar_new_event_command" oncommand="goDoCommand('calendar_new_event_command')"/>
    <command id="calendar_new_event_context_command" oncommand="goDoCommand('calendar_new_event_context_command')"/>
    <command id="calendar_modify_event_command" oncommand="goDoCommand('calendar_modify_event_command')"/>
    <command id="calendar_delete_event_command" oncommand="goDoCommand('calendar_delete_event_command')"/>

    <command id="calendar_new_todo_command" oncommand="goDoCommand('calendar_new_todo_command')"/>
    <command id="calendar_new_todo_context_command" oncommand="goDoCommand('calendar_new_todo_context_command')"/>
    <command id="calendar_new_todo_todaypane_command" oncommand="goDoCommand('calendar_new_todo_todaypane_command')"/>
    <command id="calendar_modify_todo_command" oncommand="goDoCommand('calendar_modify_todo_command')"/>
    <command id="calendar_modify_todo_todaypane_command" oncommand="goDoCommand('calendar_modify_todo_todaypane_command')"/>
    <command id="calendar_delete_todo_command" oncommand="goDoCommand('calendar_delete_todo_command')"/>

    <command id="calendar_modify_focused_item_command" oncommand="goDoCommand('calendar_modify_focused_item_command')"/>
    <command id="calendar_delete_focused_item_command" oncommand="goDoCommand('calendar_delete_focused_item_command')"/>

    <command id="calendar_new_calendar_command" oncommand="goDoCommand('calendar_new_calendar_command')"/>
    <command id="calendar_edit_calendar_command" oncommand="goDoCommand('calendar_edit_calendar_command')"/>
    <command id="calendar_delete_calendar_command" oncommand="goDoCommand('calendar_delete_calendar_command')"/>

    <command id="calendar_import_command" oncommand="goDoCommand('calendar_import_command')"/>
    <command id="calendar_export_command" oncommand="goDoCommand('calendar_export_command')"/>
    <command id="calendar_export_selection_command" oncommand="goDoCommand('calendar_export_selection_command')"/>

    <command id="calendar_publish_selected_calendar_command" oncommand="goDoCommand('calendar_publish_selected_calendar_command')"/>
    <command id="calendar_publish_calendar_command" oncommand="goDoCommand('calendar_publish_calendar_command')"/>
    <command id="calendar_publish_selected_events_command" oncommand="goDoCommand('calendar_publish_selected_events_command')"/>

    <command id="calendar_reload_remote_calendars" oncommand="goDoCommand('calendar_reload_remote_calendars')"/>

    <command id="calendar_show_unifinder_command" oncommand="goDoCommand('calendar_show_unifinder_command')"/>
    <!-- The dash instead of the underscore is intended. the 'xxx-view' part should be the id of the view in the deck -->
    <command id="calendar_day-view_command" oncommand="goDoCommand('calendar_day-view_command')"/>
    <command id="calendar_week-view_command" oncommand="goDoCommand('calendar_week-view_command')"/>
    <command id="calendar_multiweek-view_command" oncommand="goDoCommand('calendar_multiweek-view_command')"/>
    <command id="calendar_month-view_command" oncommand="goDoCommand('calendar_month-view_command')"/>
    <command id="calendar_task_category_command"/>
    <command id="calendar_toggle_completed_command" oncommand="toggleCompleted(event)"/>
    <command id="calendar_percentComplete-0_command" oncommand="contextChangeTaskProgress(event, 0)"/>
    <command id="calendar_percentComplete-25_command" oncommand="contextChangeTaskProgress(event, 25)"/>
    <command id="calendar_percentComplete-50_command" oncommand="contextChangeTaskProgress(event, 50)"/>
    <command id="calendar_percentComplete-75_command" oncommand="contextChangeTaskProgress(event, 75)"/>
    <command id="calendar_percentComplete-100_command" oncommand="contextChangeTaskProgress(event, 100)"/>
    <command id="calendar_priority-0_command" oncommand="contextChangeTaskPriority(event, 0)"/>
    <command id="calendar_priority-9_command" oncommand="contextChangeTaskPriority(event, 9)"/>
    <command id="calendar_priority-5_command" oncommand="contextChangeTaskPriority(event, 5)"/>
    <command id="calendar_priority-1_command" oncommand="contextChangeTaskPriority(event, 1)"/>
    <command id="calendar_general-priority_command" oncommand="goDoCommand('calendar_general-priority_command')"/>
    <command id="calendar_general-progress_command" oncommand="goDoCommand('calendar_general-progress_command')"/>
    <command id="calendar_general-postpone_command"/>
    <command id="calendar_postpone-1hour_command" oncommand="contextPostponeTask(event, 'PT1H')"/>
    <command id="calendar_postpone-1day_command" oncommand="contextPostponeTask(event, 'P1D')"/>
    <command id="calendar_postpone-1week_command" oncommand="contextPostponeTask(event, 'P1W')"/>
    <command id="calendar_toggle_orientation_command" persist="checked" oncommand="goDoCommand('calendar_toggle_orientation_command')"/>
    <command id="calendar_toggle_workdays_only_command" persist="checked" oncommand="goDoCommand('calendar_toggle_workdays_only_command')"/>
    <command id="calendar_toggle_tasks_in_view_command" persist="checked" oncommand="toggleTasksInView()"/>
    <command id="calendar_toggle_show_completed_in_view_command" persist="checked" oncommand="toggleShowCompletedInView()"/>
    <command id="calendar_toggle_calendarsidebar_command" oncommand="togglePaneSplitter('calsidebar_splitter')"/>
    <command id="calendar_toggle_minimonthpane_command" oncommand="document.getElementById('minimonth-pane').togglePane(event)"/>
    <command id="calendar_toggle_calendarlist_command" oncommand="document.getElementById('calendar-list-pane').togglePane(event)"/>
    <command id="calendar_task_filter_command" oncommand="taskViewUpdate(event.explicitOriginalTarget.getAttribute('value'))"/>
    <command id="calendar_task_filter_todaypane_command" oncommand="updateCalendarToDoUnifinder(event.explicitOriginalTarget.getAttribute('value'))"/>
    <command id="calendar_toggle_filter_command" oncommand="document.getElementById('task-filter-pane').togglePane(event)"/>
    <command id="calendar_view_next_command" oncommand="goDoCommand('calendar_view_next_command')"/>
    <command id="calendar_view_today_command" oncommand="currentView().moveView()"/>
    <command id="calendar_view_prev_command" oncommand="goDoCommand('calendar_view_prev_command')"/>

    <!-- this is a pseudo-command that is disabled when in calendar mode -->
    <command id="calendar_in_foreground"/>
    <!-- this is a pseudo-command that is disabled when not in calendar mode -->
    <command id="calendar_in_background"/>

    <!-- These commands are enabled when in calendar or task mode, respectively -->
    <command id="calendar_mode_calendar"/>
    <command id="calendar_mode_task"/>

    <command id="calendar_attendance_command"/>
  </commandset>

  <keyset id="calendar-keys">


// For linux tab switching reservers alt+number, where on windows that's ctrl.
// Use the available modifiers for each platform.
// Can't use the OPTION key on OSX, so we will use SHIFT+OPTION on the Mac.
// MacOSX
    <key id="calendar-day-view-key" key="1"
         observes="calendar_day-view_command"
 modifiers="shift alt"/>
    <key id="calendar-week-view-key" key="2"
         observes="calendar_week-view_command"
 modifiers="shift alt"/>
    <key id="calendar-multiweek-view-key" key="3"
         observes="calendar_multiweek-view_command"
 modifiers="shift alt"/>
    <key id="calendar-month-view-key" key="4"
         observes="calendar_month-view_command"
 modifiers="shift alt"/>
    <key id="calendar-go-to-today-key" keycode="VK_END" observes="calendar_go_to_today_command" modifiers="alt"/>
    <key id="calendar-delete-item-key" keycode="VK_DELETE" observes="calendar_delete_event_command"/>
    <key id="calendar-delete-todo-key" keycode="VK_DELETE" observes="calendar_delete_todo_command"/>
  </keyset>

  <popupset id="calendar-popupset">
    <!-- Tooltips -->
    <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 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;"
                observes="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"
                observes="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"
                observes="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"
                observes="cmd_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"
                observes="cmd_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"
                observes="cmd_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 wether the item is a task or an event-->
      <menuitem id="calendar-item-context-menu-delete-menuitem"
                key="calendar-delete-item-key"
                observes="calendar_delete_event_command"/>
      <menu id="calendar-item-context-menu-attendance-menu"
            class="attendance-menu"
            label="&calendar.context.attendance.menu.label;"
            accesskey="&calendar.context.attendance.menu.accesskey;"
            oncommand="setContextPartstat(event.target.value, event.target.getAttribute('scope'), 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="all-occurrences"
                 value="&calendar.context.attendance.occurrence.label;"/>
          <menuitem id="calendar-item-context-menu-attend-accept-menuitem"
                    type="radio"
                    scope="this-occurrence"
                    name="calendar-item-context-attendance"
                    label="&read.only.accept.label;" value="ACCEPTED"/>
          <menuitem id="calendar-item-context-menu-attend-tentative-menuitem"
                    type="radio"
                    scope="this-occurrence"
                    name="calendar-item-context-attendance"
                    label="&read.only.tentative.label;" value="TENTATIVE"/>
          <menuitem id="calendar-item-context-menu-attend-declined-menuitem"
                    type="radio"
                    scope="this-occurrence"
                    name="calendar-item-context-attendance"
                    label="&read.only.decline.label;" value="DECLINED"/>
          <menuitem id="calendar-item-context-menu-attend-needsaction-menuitem"
                    type="radio"
                    scope="this-occurrence"
                    name="calendar-item-context-attendance"
                    label="&read.only.needs.action.label;" value="NEEDS-ACTION"/>
          <label id="calendar-item-context-attendance-alloccurrence-label"
                 class="calendar-context-heading-label"
                 scope="all-occurrences"
                 value="&calendar.context.attendance.all.label;"/>
          <menuitem id="calendar-item-context-menu-attend-accept-all-menuitem"
                    type="radio"
                    scope="all-occurrences"
                    name="calendar-item-context-attendance-all"
                    label="&read.only.accept.label;" value="ACCEPTED"/>
          <menuitem id="calendar-item-context-menu-attend-tentative-all-menuitem"
                    type="radio"
                    scope="all-occurrences"
                    name="calendar-item-context-attendance-all"
                    label="&read.only.tentative.label;" value="TENTATIVE"/>
          <menuitem id="calendar-item-context-menu-attend-declined-all-menuitem"
                    type="radio"
                    scope="all-occurrences"
                    name="calendar-item-context-attendance-all"
                    label="&read.only.decline.label;" value="DECLINED"/>
          <menuitem id="calendar-item-context-menu-attend-needsaction-all-menuitem"
                    type="radio"
                    scope="all-occurrences"
                    name="calendar-item-context-attendance-all"
                    label="&read.only.needs.action.label;" 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;"
                observes="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;"
                observes="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=""
                observes="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=""
                observes="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"
                observes="cmd_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"
                observes="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"
                observes="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"
                observes="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"
                observes="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"
                observes="cmd_cut"
                command="cmd_cut"/>
      <menuitem id="task-context-menu-copy-menuitem"
                label="&calendar.context.copyevent.label;"
                accesskey="&calendar.context.copyevent.accesskey;"
                key="key_copy"
                observes="cmd_copy"
                command="cmd_copy"/>
      <menuitem id="task-context-menu-paste-menuitem"
                label="&calendar.context.pasteevent.label;"
                accesskey="&calendar.context.pasteevent.accesskey;"
                key="key_paste"
                observes="cmd_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;"
                observes="calendar_toggle_completed_command"
                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"
            observes="calendar_general-progress_command">
        <menupopup id="progress-menupopup" type="task-progress"/>
      </menu>
      <menu id="task-context-menu-priority"
            label="&calendar.context.priority.label;"
            accesskey="&calendar.context.priority.accesskey;"
            command="calendar_general-priority_command"
            observes="calendar_general-priority_command">
        <menupopup id="priority-menupopup" type="task-priority"/>
      </menu>
      <menu id="task-context-menu-postpone"
            label="&calendar.context.postpone.label;"
            accesskey="&calendar.context.postpone.accesskey;"
            command="calendar_general-postpone_command"
            observes="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;"
                    observes="calendar_postpone-1hour_command"/>
          <menuitem id="task-context-postpone-1day"
                    label="&calendar.context.postpone.1day.label;"
                    accesskey="&calendar.context.postpone.1day.accesskey;"
                    observes="calendar_postpone-1day_command"/>
          <menuitem id="task-context-postpone-1week"
                    label="&calendar.context.postpone.1week.label;"
                    accesskey="&calendar.context.postpone.1week.accesskey;"
                    observes="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"
                observes="calendar_delete_todo_command"/>
      <menu id="task-context-menu-attendance-menu"
            class="attendance-menu"
            label="&calendar.context.attendance.menu.label;"
            accesskey="&calendar.context.attendance.menu.accesskey;"
            oncommand="setContextPartstat(event.target.value, event.target.getAttribute('scope'), 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="all-occurrences"
                 value="&calendar.context.attendance.occurrence.label;"/>
          <menuitem id="task-context-menu-attend-accept-menuitem"
                    type="radio"
                    scope="this-occurrence"
                    name="task-context-attendance"
                    label="&read.only.accept.label;" value="ACCEPTED"/>
          <menuitem id="task-context-menu-attend-tentative-menuitem"
                    type="radio"
                    scope="this-occurrence"
                    name="task-context-attendance"
                    label="&read.only.tentative.label;" value="TENTATIVE"/>
          <menuitem id="task-context-menu-attend-declined-menuitem"
                    type="radio"
                    scope="this-occurrence"
                    name="task-context-attendance"
                    label="&read.only.decline.label;" value="DECLINED"/>
          <menuitem id="task-context-menu-attend-needsaction-menuitem"
                    type="radio"
                    scope="this-occurrence"
                    name="task-context-attendance"
                    label="&read.only.needs.action.label;" value="NEEDS-ACTION"/>
          <label id="task-context-attendance-alloccurrence-label"
                 class="calendar-context-heading-label"
                 scope="all-occurrences"
                 value="&calendar.context.attendance.all.label;"/>
          <menuitem id="task-context-menu-attend-accept-all-menuitem"
                    type="radio"
                    scope="all-occurrences"
                    name="task-context-attendance-all"
                    label="&read.only.accept.label;" value="ACCEPTED"/>
          <menuitem id="task-context-menu-attend-tentative-all-menuitem"
                    type="radio"
                    scope="all-occurrences"
                    name="task-context-attendance-all"
                    label="&read.only.tentative.label;" value="TENTATIVE"/>
          <menuitem id="task-context-menu-attend-declined-all-menuitem"
                    type="radio"
                    scope="all-occurrences"
                    name="task-context-attendance-all"
                    label="&read.only.decline.label;" value="DECLINED"/>
          <menuitem id="task-context-menu-attend-needsaction-all-menuitem"
                    type="radio"
                    scope="all-occurrences"
                    name="task-context-attendance-all"
                    label="&read.only.needs.action.label;" 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">
          <observes element="unifinder-todo-filter-broadcaster"
                    attribute="value"
                    onbroadcast="checkRadioControl(this.parentNode, document.getElementById(this.getAttribute('element')).getAttribute('value'));"/>
          <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>
  </popupset>
</overlay>
