Fix bug 456385 - Thunderbird3: Integrate Calendar and Task mode menu items into new menu. r=mschroeder
This commit is contained in:
Родитель
f662b9409e
Коммит
bece7b9212
|
@ -354,6 +354,8 @@
|
|||
<property name="rotated"
|
||||
onget="return (this.orient == 'horizontal')"
|
||||
onset="return (this.orient = (val ? 'horizontal' : 'vertical'))"/>
|
||||
<property name="supportsRotation" readonly="true"
|
||||
onget="return false"/>
|
||||
<property name="displayDaysOff"
|
||||
onget="return this.mDisplayDaysOff;"
|
||||
onset="return (this.mDisplayDaysOff = val);"/>
|
||||
|
@ -375,6 +377,8 @@
|
|||
<property name="workdaysOnly"
|
||||
onget="return this.mWorkdaysOnly;"
|
||||
onset="return (this.mWorkdaysOnly = val);"/>
|
||||
<property name="supportsWorkdaysOnly" readonly="true"
|
||||
onget="return true;"/>
|
||||
<property name="selectionObserver" readonly="true"
|
||||
onget="return this.mSelectionObserver;"/>
|
||||
<property name="startDay" readonly="true"
|
||||
|
|
|
@ -66,19 +66,27 @@ var calendarController = {
|
|||
"calendar_publish_calendar_command": true,
|
||||
"calendar_publish_selected_events_command": true,
|
||||
|
||||
"calendar_view_next_command": true,
|
||||
"calendar_view_prev_command": true,
|
||||
|
||||
"calendar_toggle_orientation_command": true,
|
||||
"calendar_toggle_workdays_only_command": true,
|
||||
|
||||
"calendar_task_filter_command": true,
|
||||
"calendar_reload_remote_calendars": true,
|
||||
"calendar_show_unifinder_command": true,
|
||||
"calendar_toggle_completed_command": true,
|
||||
"calendar_percentComplete-0_command": true,
|
||||
"calendar_percentComplete-25_command": true,
|
||||
"calendar_percentComplete-50_command": true,
|
||||
"calendar_percentComplete-75_command": true,
|
||||
"calendar_percentComplete-100_command": true,
|
||||
"calendar_percentComplete-100_command2": true,
|
||||
"calendar_priority-0_command": true,
|
||||
"calendar_priority-9_command": true,
|
||||
"calendar_priority-5_command": true,
|
||||
"calendar_priority-1_command": true,
|
||||
"calendar_general-priority_command": true,
|
||||
"calendar_general-progress_command": true,
|
||||
"calendar_task_category_command": true,
|
||||
"cmd_cut": true,
|
||||
"cmd_copy": true,
|
||||
|
@ -93,7 +101,20 @@ var calendarController = {
|
|||
"cmd_printpreview": true,
|
||||
"button_print": true,
|
||||
"button_delete": true,
|
||||
"cmd_delete": true
|
||||
"cmd_delete": true,
|
||||
"cmd_properties": true,
|
||||
"cmd_runJunkControls": true,
|
||||
"cmd_deleteJunk": true,
|
||||
"cmd_applyFilters": true,
|
||||
"cmd_applyFiltersToSelection": true,
|
||||
"cmd_goForward": true,
|
||||
"cmd_goBack": true,
|
||||
|
||||
// Pseudo commands
|
||||
"calendar_in_foreground": true,
|
||||
"calendar_in_background": true,
|
||||
"calendar_mode_calendar": true,
|
||||
"calendar_mode_task": true
|
||||
},
|
||||
|
||||
updateCommands: function cC_updateCommands() {
|
||||
|
@ -131,37 +152,71 @@ var calendarController = {
|
|||
// This code is temporarily commented out due to
|
||||
// bug 469684 Unifinder-todo: raising of the context menu fires blur-event
|
||||
// this.todo_tasktree_focused;
|
||||
case "calendar_edit_calendar_command":
|
||||
return this.isCalendarInForeground();
|
||||
case "calendar_task_filter_command":
|
||||
return true;
|
||||
case "calendar_delete_todo_command":
|
||||
case "calendar_toggle_completed_command":
|
||||
case "calendar_percentComplete-0_command":
|
||||
case "calendar_percentComplete-25_command":
|
||||
case "calendar_percentComplete-50_command":
|
||||
case "calendar_percentComplete-75_command":
|
||||
case "calendar_percentComplete-100_command":
|
||||
case "calendar_percentComplete-100_command2":
|
||||
case "calendar_priority-0_command":
|
||||
case "calendar_priority-9_command":
|
||||
case "calendar_priority-5_command":
|
||||
case "calendar_priority-1_command":
|
||||
case "calendar_task_category_command":
|
||||
case "calendar_general-progress_command":
|
||||
case "calendar_general-priority_command":
|
||||
return this.writable &&
|
||||
return this.isCalendarInForeground() &&
|
||||
this.writable &&
|
||||
this.todo_items_selected &&
|
||||
this.todo_items_writable;
|
||||
case "calendar_delete_calendar_command":
|
||||
return !this.last_calendar;
|
||||
|
||||
return this.isCalendarInForeground() && !this.last_calendar;
|
||||
case "calendar_import_command":
|
||||
return this.writable;
|
||||
case "calendar_export_selection_command":
|
||||
return this.item_selected;
|
||||
|
||||
case "calendar_toggle_orientation_command":
|
||||
return this.isCalendarInForeground() &&
|
||||
gCurrentMode &&
|
||||
gCurrentMode == "calendar" &&
|
||||
currentView().supportsRotation;
|
||||
case "calendar_toggle_workdays_only_command":
|
||||
return this.isCalendarInForeground() &&
|
||||
gCurrentMode &&
|
||||
gCurrentMode == "calendar" &&
|
||||
currentView().supportsWorkdaysOnly;
|
||||
case "calendar_publish_selected_events_command":
|
||||
return this.item_selected;
|
||||
|
||||
case "calendar_reload_remote_calendar":
|
||||
return !this.no_network_calendars && !this.offline;
|
||||
|
||||
// The following commands all just need the calendar in foreground,
|
||||
// make sure you take care when changing things here.
|
||||
case "calendar_view_next_command":
|
||||
case "calendar_view_prev_command":
|
||||
case "calendar_in_foreground":
|
||||
return this.isCalendarInForeground();
|
||||
case "calendar_in_background":
|
||||
return !this.isCalendarInForeground();
|
||||
|
||||
// The following commands need calendar mode, be careful when
|
||||
// changing things.
|
||||
case "calendar_show_unifinder_command":
|
||||
case "calendar_mode_calendar":
|
||||
return this.isCalendarInForeground() &&
|
||||
gCurrentMode &&
|
||||
gCurrentMode == "calendar";
|
||||
|
||||
case "calendar_mode_task":
|
||||
return this.isCalendarInForeground() &&
|
||||
gCurrentMode &&
|
||||
gCurrentMode == "task";
|
||||
default:
|
||||
if (this.defaultController && !this.isCalendarInForeground()) {
|
||||
// The delete-button demands a special handling in mail-mode
|
||||
|
@ -205,6 +260,12 @@ var calendarController = {
|
|||
case "button_delete":
|
||||
case "cmd_delete":
|
||||
return this.item_selected;
|
||||
case "cmd_properties":
|
||||
case "cmd_runJunkControls":
|
||||
case "cmd_deleteJunk":
|
||||
case "cmd_applyFilters":
|
||||
case "cmd_applyFiltersToSelection":
|
||||
return false;
|
||||
}
|
||||
if (aCommand in this.commands) {
|
||||
// All other commands we support should be enabled by default
|
||||
|
@ -305,6 +366,21 @@ var calendarController = {
|
|||
case "calendar_reload_remote_calendars":
|
||||
getCompositeCalendar().refresh();
|
||||
break;
|
||||
case "calendar_show_unifinder_command":
|
||||
toggleUnifinder();
|
||||
break;
|
||||
case "calendar_view_next_command":
|
||||
currentView().moveView(1);
|
||||
break;
|
||||
case "calendar_view_prev_command":
|
||||
currentView().moveView(-1);
|
||||
break;
|
||||
case "calendar_toggle_orientation_command":
|
||||
toggleOrientation();
|
||||
break;
|
||||
case "calendar_toggle_workdays_only_command":
|
||||
toggleWorkdaysOnly();
|
||||
break;
|
||||
default:
|
||||
if (this.defaultController && !this.isCalendarInForeground()) {
|
||||
// If calendar is not in foreground, let the default controller take
|
||||
|
@ -342,6 +418,13 @@ var calendarController = {
|
|||
break;
|
||||
|
||||
// Thunderbird commands
|
||||
case "cmd_goForward":
|
||||
currentView().moveView(1);
|
||||
break;
|
||||
case "cmd_goBack":
|
||||
currentView().moveView(-1);
|
||||
break;
|
||||
|
||||
// For these commands, nothing should happen in calendar mode.
|
||||
case "cmd_printpreview":
|
||||
case "button_delete":
|
||||
|
@ -554,7 +637,6 @@ function injectCalendarCommandController() {
|
|||
return;
|
||||
} else {
|
||||
calendarController.defaultController = tbController;
|
||||
ltnInitializeMenus();
|
||||
}
|
||||
}
|
||||
top.controllers.insertControllerAt(0, calendarController);
|
||||
|
|
|
@ -84,42 +84,51 @@
|
|||
|
||||
<command id="calendar_reload_remote_calendars" oncommand="goDoCommand('calendar_reload_remote_calendars')"/>
|
||||
|
||||
<command id="calendar_show_unifinder_command" oncommand="toggleUnifinder()"/>
|
||||
<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="showCalendarView('day')"/>
|
||||
<command id="calendar_week-view_command" oncommand="showCalendarView('week')"/>
|
||||
<command id="calendar_multiweek-view_command" oncommand="showCalendarView('multiweek')"/>
|
||||
<command id="calendar_month-view_command" oncommand="showCalendarView('month')"/>
|
||||
<command id="calendar_task_category_command" oncommand="contextChangeTaskCategory(event);"/>
|
||||
<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_percentComplete-100_command2" oncommand="contextChangeTaskProgress2(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_toggle_orientation_command" persist="checked" oncommand="toggleOrientation()" disabled="true"/>
|
||||
<command id="calendar_toggle_workdays_only_command" persist="checked" oncommand="toggleWorkdaysOnly()"/>
|
||||
<command id="calendar_general-progress_command" oncommand="goDoCommand('calendar_general-priority_command')"/>
|
||||
<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_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_toggle_filter_command" oncommand="document.getElementById('task-filter-pane').togglePane(event)"/>
|
||||
<command id="calendar_view_next_command" oncommand="currentView().moveView(1)"/>
|
||||
<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="currentView().moveView(-1)"/>
|
||||
<command id="calendar_go_to_today_command" oncommand="goToDate(now())"/>
|
||||
<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"/>
|
||||
</commandset>
|
||||
|
||||
<keyset id="calendar-keys">
|
||||
#ifdef XP_MACOSX
|
||||
// The following Mac specific code-lines are necessary, because you can't
|
||||
// just use the OPTION key on Mac OSX. So we will use SHIFT+OPTION on the
|
||||
// The following Mac specific code-lines are necessary, because you can't
|
||||
// just use the OPTION key on Mac OSX. So we will use SHIFT+OPTION on the
|
||||
// Mac, but just ALT on all other platforms. See bug 448946.
|
||||
<key id="calendar-day-view-key" key="&calendar.dayView.key;" observes="calendar_day-view_command" modifiers="shift alt"/>
|
||||
<key id="calendar-week-view-key" key="&calendar.weekView.key;" observes="calendar_week-view_command" modifiers="shift alt"/>
|
||||
|
@ -281,7 +290,8 @@
|
|||
type="checkbox"
|
||||
label="&calendar.context.markcompleted.label;"
|
||||
accesskey="&calendar.context.markcompleted.accesskey;"
|
||||
oncommand="toggleCompleted(event)"/>
|
||||
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;">
|
||||
|
|
|
@ -168,4 +168,4 @@
|
|||
]]></constructor>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
||||
</bindings>
|
||||
|
|
|
@ -2192,6 +2192,9 @@
|
|||
]]></getter>
|
||||
</property>
|
||||
|
||||
<property name="supportsRotation" readonly="true"
|
||||
onget="return true"/>
|
||||
|
||||
<method name="handlePreference">
|
||||
<parameter name="aSubject"/>
|
||||
<parameter name="aTopic"/>
|
||||
|
|
|
@ -96,31 +96,28 @@ function addCategoryNames(aEvent) {
|
|||
* @param aEvent The popupshowing event of the opening menu.
|
||||
*/
|
||||
function changeContextMenuForTask(aEvent) {
|
||||
var tasks = getSelectedTasks(aEvent);
|
||||
var task = null;
|
||||
var tasksSelected = (tasks.length > 0);
|
||||
let tasksSelected = (getSelectedTasks(aEvent).length > 0);
|
||||
applyAttributeToMenuChildren(aEvent.target, "disabled", (!tasksSelected));
|
||||
document.getElementById("calendar_new_todo_command").removeAttribute("disabled");
|
||||
if (tasksSelected) {
|
||||
if (isPropertyValueSame(tasks, "isCompleted")) {
|
||||
setBooleanAttribute(document.getElementById("calendar-context-markcompleted"), "checked", tasks[0].isCompleted);
|
||||
} else {
|
||||
document.getElementById("calendar-context-markcompleted").setAttribute("checked", false);
|
||||
}
|
||||
}
|
||||
changeMenuForTask(aEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler function to mark selected tasks as completed.
|
||||
* Change the opening menu for the selected tasks.
|
||||
*
|
||||
* XXXberend Please explain more and rename to something easier to understand.
|
||||
*
|
||||
* @param aEvent The DOM event that triggered this command.
|
||||
* @param aProgress The progress percentage to set.
|
||||
* @param aEvent The popupshowing event of the opening menu.
|
||||
*/
|
||||
function contextChangeTaskProgress2(aEvent, aProgress) {
|
||||
contextChangeTaskProgress(aEvent, aProgress);
|
||||
document.getElementById("calendar_percentComplete-100_command2").checked = false;
|
||||
function changeMenuForTask(aEvent) {
|
||||
let tasks = getSelectedTasks(aEvent);
|
||||
let tasksSelected = (tasks.length > 0);
|
||||
if (tasksSelected) {
|
||||
let cmd = document.getElementById("calendar_toggle_completed_command");
|
||||
if (isPropertyValueSame(tasks, "isCompleted")) {
|
||||
setBooleanAttribute(cmd, "checked", tasks[0].isCompleted);
|
||||
} else {
|
||||
setBooleanAttribute(cmd, "checked", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -286,16 +283,14 @@ function tasksToEvents(aEvent) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Toggle the completed state on tasks retrieved from the given event.
|
||||
* Toggle the completed state on selected tasks.
|
||||
*
|
||||
* XXXberend Please clarify if this is correct and describe more clearly.
|
||||
*
|
||||
* @param aEvent The command event that holds information about the tasks.
|
||||
* @param aEvent The originating event, can be null.
|
||||
*/
|
||||
function toggleCompleted(aEvent) {
|
||||
if (aEvent.target.getAttribute("checked") == "true") {
|
||||
contextChangeTaskProgress(aEvent, 100);
|
||||
} else {
|
||||
contextChangeTaskProgress(aEvent, 0);
|
||||
} else {
|
||||
contextChangeTaskProgress(aEvent, 100);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,8 +163,8 @@
|
|||
type="menu-button"
|
||||
label="&calendar.context.markcompleted.label;"
|
||||
tooltiptext="&calendar.task.complete.button.tooltip;"
|
||||
command="calendar_percentComplete-100_command2"
|
||||
observes="calendar_percentComplete-100_command2"
|
||||
command="calendar_toggle_completed_command"
|
||||
observes="calendar_toggle_completed_command"
|
||||
class="msgHeaderView-button">
|
||||
<menupopup id="task-actions-markcompleted-menupopup" type="task-progress"/>
|
||||
</button>
|
||||
|
|
|
@ -346,23 +346,18 @@ function switchToView(aViewType) {
|
|||
|
||||
// Set up the labels for the context menu
|
||||
["calendar-view-context-menu-next",
|
||||
"calendar-view-context-menu-previous"].forEach(function(x) setupViewNode(x, "label"));
|
||||
"calendar-view-context-menu-previous",
|
||||
"calendar-go-menu-next",
|
||||
"calendar-go-menu-previous"].forEach(function(x) setupViewNode(x, "label"));
|
||||
|
||||
["calendar-go-menu-next",
|
||||
"calendar-go-menu-previous"].forEach(function(x) setupViewNode(x, "accesskey"));
|
||||
|
||||
// Set up the labels for the view navigation
|
||||
["previous-view-button",
|
||||
"today-view-button",
|
||||
"next-view-button"].forEach(function(x) setupViewNode(x, "tooltiptext"));
|
||||
|
||||
|
||||
|
||||
// Disable the menuitem when not in day or week view.
|
||||
var rotated = document.getElementById("calendar_toggle_orientation_command");
|
||||
if (aViewType == "day" || aViewType == "week") {
|
||||
rotated.removeAttribute("disabled");
|
||||
} else {
|
||||
rotated.setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
try {
|
||||
selectedDay = viewDeck.selectedPanel.selectedDay;
|
||||
currentSelection = viewDeck.selectedPanel.getSelectedItems({});
|
||||
|
|
|
@ -56,6 +56,9 @@
|
|||
return "day-view-observer";
|
||||
]]></getter>
|
||||
</property>
|
||||
<property name="supportsWorkdaysOnly"
|
||||
readonly="true"
|
||||
onget="return false;"/>
|
||||
|
||||
<!--Public methods-->
|
||||
<method name="goToDay">
|
||||
|
|
|
@ -268,16 +268,13 @@ var TodayPane = {
|
|||
/**
|
||||
* Display a certain section in the minday/minimonth part of the todaypane.
|
||||
*
|
||||
* @param aIndex A numeric value:
|
||||
* - 1: Show the miniday
|
||||
* - 2: show the minimonth
|
||||
* - 3: show none of both
|
||||
* @param aSection The section to display
|
||||
*/
|
||||
displayMiniSection: function displayMiniSection(aIndex) {
|
||||
document.getElementById("today-minimonth-box").setVisible(aIndex == 2);
|
||||
document.getElementById("mini-day-box").setVisible(aIndex == 1);
|
||||
document.getElementById("today-none-box").setVisible(aIndex == 3);
|
||||
setBooleanAttribute(document.getElementById("today-Minimonth"), "freebusy", aIndex == 2);
|
||||
displayMiniSection: function displayMiniSection(aSection) {
|
||||
document.getElementById("today-minimonth-box").setVisible(aSection == 'minimonth');
|
||||
document.getElementById("mini-day-box").setVisible(aSection == 'miniday');
|
||||
document.getElementById("today-none-box").setVisible(aSection == 'none');
|
||||
setBooleanAttribute(document.getElementById("today-Minimonth"), "freebusy", aSection == 'minimonth');
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -287,9 +284,9 @@ var TodayPane = {
|
|||
* @param disable If true, items will be disabled, otherwise enabled.
|
||||
*/
|
||||
disableMenuItems: function disableMenuItems(disable) {
|
||||
var menu = document.getElementById("today-pane-menu");
|
||||
let menu = document.getElementById("ltnTodayPaneMenuPopup");
|
||||
if (menu) {
|
||||
setAttributeToChildren(menu.firstChild, "disabled", disable, "name", "minidisplay");
|
||||
setAttributeToChildren(menu, "disabled", disable, "name", "minidisplay");
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
mode="mail,calendar,task"
|
||||
collapsedinmodes="mail,calendar,task"
|
||||
broadcaster="modeBroadcaster"
|
||||
refcontrol="today-pane-displaynone"
|
||||
refcontrol="ltnTodayPaneDisplayNone"
|
||||
persist="collapsedinmodes"/>
|
||||
<modehbox id="today-minimonth-box"
|
||||
pack="center"
|
||||
|
@ -104,14 +104,14 @@
|
|||
mode="mail,calendar,task"
|
||||
broadcaster="modeBroadcaster"
|
||||
collapsedinmodes="mail,calendar,task"
|
||||
refcontrol="today-pane-displayminimonth"
|
||||
refcontrol="ltnTodayPaneDisplayMinimonth"
|
||||
persist="collapsedinmodes">
|
||||
<minimonth id="today-Minimonth" freebusy="true" onchange="TodayPane.setDaywithjsDate(this.value);"/>
|
||||
</modehbox>
|
||||
<modebox id="mini-day-box"
|
||||
mode="mail,calendar,task"
|
||||
class="today-subpane"
|
||||
refcontrol="today-pane-displayminiday"
|
||||
refcontrol="ltnTodayPaneDisplayMiniday"
|
||||
broadcaster="modeBroadcaster"
|
||||
collapsedinmodes=""
|
||||
persist="collapsedinmodes">
|
||||
|
|
|
@ -185,7 +185,8 @@
|
|||
if ((aVisible === true) && (pushModeCollapsedAttribute == false)){
|
||||
display = (aVisible === true) && (!collapsedInMode);
|
||||
}
|
||||
setBooleanAttribute(this, "collapsed", (!display));
|
||||
|
||||
setBooleanAttribute(this, "collapsed", (!display || !this.isVisibleInMode()));
|
||||
if (pushModeCollapsedAttribute) {
|
||||
if (!display) {
|
||||
if (modeIndex == -1) {
|
||||
|
@ -213,6 +214,7 @@
|
|||
var command = document.getElementById(this.getAttribute("refcontrol"))
|
||||
if (command) {
|
||||
command.setAttribute("checked", display);
|
||||
setBooleanAttribute(command, "disabled", !this.isVisibleInMode());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,7 +81,12 @@ interface calICalendarView : nsISupports
|
|||
*/
|
||||
attribute calICalendarViewController controller;
|
||||
|
||||
/**
|
||||
/**
|
||||
* If true, the view supports workdays only
|
||||
*/
|
||||
readonly attribute boolean supportsWorkdaysOnly;
|
||||
|
||||
/**
|
||||
* If this is set to 'true', the view should not display days specified to be
|
||||
* non-workdays. The implementor is responsible for obtaining what those
|
||||
* days are on its own.
|
||||
|
@ -98,6 +103,11 @@ interface calICalendarView : nsISupports
|
|||
*/
|
||||
attribute boolean rotated;
|
||||
|
||||
/**
|
||||
* If true, the view is rotatable
|
||||
*/
|
||||
readonly attribute boolean supportsRotation;
|
||||
|
||||
/**
|
||||
* Whether or not completed tasks are shown in the calICalendarView
|
||||
*/
|
||||
|
|
|
@ -44,13 +44,4 @@
|
|||
|
||||
<script type="application/javascript" src="chrome://lightning/content/lightning-utils.js"/>
|
||||
<script type="application/javascript" src="chrome://lightning/content/messenger-overlay-sidebar.js"/>
|
||||
<script type="application/javascript" src="chrome://lightning/content/messenger-overlay-toolbar.js"/>
|
||||
<script type="application/javascript" src="chrome://calendar/content/calendar-invitations-manager.js"/>
|
||||
<script type="application/javascript">
|
||||
var calendarmenulabel = "&lightning.calendar.label;";
|
||||
var calendarmenuaccesskey = "&lightning.calendar.accesskey;";
|
||||
var messagemenulabel = "&msgMenu.label;";
|
||||
var messagemenuaccesskey = "&msgMenu.accesskey;";
|
||||
var tasksmenulabel = "&lightning.tasks.label;";
|
||||
var tasksmenuaccesskey = "&lightning.tasks.accesskey;";
|
||||
</script>
|
||||
|
|
|
@ -130,9 +130,10 @@ function ltnOnLoad(event) {
|
|||
scheduleInvitationsUpdate(FIRST_DELAY_STARTUP);
|
||||
getCalendarManager().addObserver(gInvitationsCalendarManagerObserver);
|
||||
|
||||
var filter = document.getElementById("task-tree-filtergroup");
|
||||
let filter = document.getElementById("task-tree-filtergroup");
|
||||
filter.value = filter.value || "all";
|
||||
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
|
||||
document.getElementById("modeBroadcaster").setAttribute("checked", "true");
|
||||
|
||||
let mailContextPopup = document.getElementById("mailContext");
|
||||
if (mailContextPopup)
|
||||
|
@ -264,280 +265,6 @@ function findMailSearchBox() {
|
|||
return null;
|
||||
}
|
||||
|
||||
var calendarpopuplist = new Array();
|
||||
var taskpopuplist = new Array();
|
||||
var mailpopuplist = new Array();
|
||||
var menulist = new Array();
|
||||
#ifdef XP_MACOSX
|
||||
var quitMenu = null;
|
||||
var prefMenu = null;
|
||||
#endif
|
||||
|
||||
function ltnInitializeMenus(){
|
||||
#ifdef XP_MACOSX
|
||||
// The following Mac specific code-lines became necessary due to bug 409845
|
||||
prefMenu = document.getElementById("menu_preferences");
|
||||
prefMenu.setAttribute("mode", "system");
|
||||
quitMenu = document.getElementById("menu_FileQuitItem");
|
||||
quitMenu.setAttribute("mode", "system");
|
||||
#endif
|
||||
copyPopupMenus();
|
||||
ltnRemoveMailOnlyItems(calendarpopuplist, "calendar");
|
||||
ltnRemoveMailOnlyItems(taskpopuplist, "task");
|
||||
document.getElementById("modeBroadcaster").setAttribute("checked", true);
|
||||
}
|
||||
|
||||
function getMenuElementById(aElementId, aMenuPopup) {
|
||||
var element = null;
|
||||
var elements = aMenuPopup.getElementsByAttribute("id", aElementId);
|
||||
if (elements.length > 0) {
|
||||
element = elements[0];
|
||||
}
|
||||
return element;
|
||||
}
|
||||
|
||||
/** removes all succeedingmenu elements of a container up to the next
|
||||
* menuseparator that thus denotes the end of the section. Elements with the
|
||||
* attribute mode == 'calendar' are ignored
|
||||
*/
|
||||
function removeMenuElementsInSection(aElement, aExcludeMode) {
|
||||
var element = aElement;
|
||||
if (element) {
|
||||
var bleaveloop = false;
|
||||
while (!bleaveloop) {
|
||||
var ignore = false;
|
||||
bleaveloop = element.localName == "menuseparator";
|
||||
if (bleaveloop) {
|
||||
// we delete the menuseparator only if it's the last element
|
||||
// within its container
|
||||
bleaveloop = (element.nextSibling != null);
|
||||
}
|
||||
if (element.hasAttribute("mode")) {
|
||||
ignore = element.getAttribute("mode") == aExcludeMode ||
|
||||
element.getAttribute("mode") == "calendar,task";
|
||||
}
|
||||
var nextMenuElement = element.nextSibling;
|
||||
if (!ignore) {
|
||||
try {
|
||||
element.parentNode.removeChild(element);
|
||||
} catch (e) {
|
||||
dump("Element '" + element.getAttribute("id") + "' could not be removed\n");
|
||||
}
|
||||
}
|
||||
if (!bleaveloop) {
|
||||
element = nextMenuElement;
|
||||
bleaveloop = (element == null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function removeElements(aElementList) {
|
||||
aElementList.forEach(function(element) {
|
||||
try {
|
||||
if (element) {
|
||||
element.parentNode.removeChild(element);
|
||||
}
|
||||
} catch (e) {
|
||||
dump("Element '" + element.getAttribute("id") + "' could not be removed\n");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addToPopupList(aMenuElement, aNewPopupMenu, aPopupList, aExcludedModes, aClone, aRemovePopupShowing) {
|
||||
var child = aMenuElement.firstChild;
|
||||
if (child) {
|
||||
if (child.localName == "menupopup") {
|
||||
if (aNewPopupMenu) {
|
||||
var newPopupMenu = aNewPopupMenu;
|
||||
} else {
|
||||
var newPopupMenu = child;
|
||||
}
|
||||
if (aClone) {
|
||||
newPopupMenu = newPopupMenu.cloneNode(true);
|
||||
if (aRemovePopupShowing) {
|
||||
newPopupMenu.removeAttribute("onpopupshowing");
|
||||
}
|
||||
}
|
||||
removeMenuElements(newPopupMenu, aExcludedModes);
|
||||
aPopupList.push(newPopupMenu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function copyPopupMenus() {
|
||||
// define menuList...
|
||||
menulist.push(document.getElementById("menu_File"));
|
||||
menulist.push(document.getElementById("menu_Edit"));
|
||||
var menuView = document.getElementById("menu_View");
|
||||
menulist.push(menuView);
|
||||
menulist.push(menuView.nextSibling); // id-less menu_Go
|
||||
menulist.push(document.getElementById("messageMenu"));
|
||||
menulist.push(document.getElementById("tasksMenu"));
|
||||
|
||||
// define PopupMenus for calendar mode...
|
||||
var excludeList = new Array("mail", "task", "system");
|
||||
addToPopupList(menulist[0], null, calendarpopuplist, excludeList, true, true);
|
||||
addToPopupList(menulist[1], null, calendarpopuplist, excludeList, true, false);
|
||||
addToPopupList(menulist[2], null, calendarpopuplist, excludeList, true, true);
|
||||
addToPopupList(menulist[3], document.getElementById("calendar-GoPopupMenu"), calendarpopuplist, excludeList, true, false);
|
||||
addToPopupList(menulist[4], document.getElementById("calendarCalendarPopupMenu"), calendarpopuplist, excludeList, true, false);
|
||||
addToPopupList(menulist[5], null, calendarpopuplist, excludeList, true, false);
|
||||
|
||||
// define PopupMenus for task mode...
|
||||
var excludeList = new Array("mail", "calendar", "system");
|
||||
addToPopupList(menulist[0], null, taskpopuplist, excludeList, true, true);
|
||||
addToPopupList(menulist[1], null, taskpopuplist, excludeList, true, false);
|
||||
addToPopupList(menulist[2], null, taskpopuplist, excludeList, true, true);
|
||||
addToPopupList(menulist[3], document.getElementById("calendar-GoPopupMenu"), taskpopuplist, excludeList, true, false);
|
||||
var tasksViewMenuPopup = clonePopupMenu("taskitem-context-menu", "taskitem-menu", "menu-");
|
||||
tasksViewMenuPopup.removeChild(getMenuElementById("menu-" + "task-context-menu-modify", tasksViewMenuPopup));
|
||||
tasksViewMenuPopup.removeChild(getMenuElementById("menu-" + "task-context-menu-delete", tasksViewMenuPopup));
|
||||
addToPopupList(menulist[4], tasksViewMenuPopup, taskpopuplist, excludeList, false, false);
|
||||
addToPopupList(menulist[5], null, taskpopuplist, excludeList, true, true);
|
||||
|
||||
// define PopupMenus for mail mode...
|
||||
var excludeList = new Array("calendar", "task", "calendar,task");
|
||||
addToPopupList(menulist[0], null, mailpopuplist, excludeList, false, false);
|
||||
addToPopupList(menulist[1], null, mailpopuplist, excludeList, false, false);
|
||||
addToPopupList(menulist[2], null, mailpopuplist, excludeList, false, false);
|
||||
// copy calendar-GoPopupMenu into Thunderbird's GoPopupMenu to switch modes
|
||||
var tbGoPopupMenu = menulist[3].lastChild;
|
||||
var calGoPopupMenu = document.getElementById("calendar-GoPopupMenu").cloneNode(true);
|
||||
var calGoItem;
|
||||
while ((calGoItem = calGoPopupMenu.firstChild)) {
|
||||
tbGoPopupMenu.appendChild(calGoPopupMenu.removeChild(calGoItem));
|
||||
}
|
||||
addToPopupList(menulist[3], null, mailpopuplist, excludeList, false, false);
|
||||
addToPopupList(menulist[4], null, mailpopuplist, excludeList, false, false);
|
||||
addToPopupList(menulist[5], null, mailpopuplist, excludeList, false, false);
|
||||
}
|
||||
|
||||
function removeNeedlessSeparators(aMenuPopupList) {
|
||||
aMenuPopupList.forEach(function(aMenuPopup) {
|
||||
var child = aMenuPopup.firstChild;
|
||||
if (child) {
|
||||
if (child.localName == "menuseparator") {
|
||||
try {
|
||||
aMenuPopup.removeChild(child)
|
||||
} catch (e) {
|
||||
dump("Element '" + child.getAttribute("id") + "' could not be removed\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
child = aMenuPopup.lastChild;
|
||||
if (child) {
|
||||
if (child.localName == "menuseparator") {
|
||||
try {
|
||||
aMenuPopup.removeChild(child)
|
||||
} catch (e) {
|
||||
dump("Element '" + child.getAttribute("id") + "' could not be removed\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ltnRemoveMailOnlyItems(aMenuPopupList, aExcludeMode) {
|
||||
removeElements(
|
||||
// "File" - menu
|
||||
[getMenuElementById("openMessageFileMenuitem", aMenuPopupList[0]),
|
||||
getMenuElementById("newAccountMenuItem", aMenuPopupList[0]),
|
||||
getMenuElementById("fileAttachmentMenu", aMenuPopupList[0]),
|
||||
getAdjacentSibling(getMenuElementById("menu_saveAs", aMenuPopupList[0]), 2),
|
||||
|
||||
// "Edit" - menu
|
||||
getMenuElementById("menu_find", aMenuPopupList[1]),
|
||||
getMenuElementById("menu_favoriteFolder", aMenuPopupList[1]),
|
||||
getMenuElementById("menu_properties", aMenuPopupList[1]),
|
||||
getMenuElementById("menu_accountmgr", aMenuPopupList[1]),
|
||||
|
||||
// "View"-menu
|
||||
getMenuElementById("menu_showMessengerToolbar", aMenuPopupList[2]),
|
||||
|
||||
// "Tools"-menu
|
||||
getMenuElementById("tasksMenuMail", aMenuPopupList[5]),
|
||||
getMenuElementById("menu_import", aMenuPopupList[5])]);
|
||||
|
||||
removeNeedlessSeparators(aMenuPopupList);
|
||||
|
||||
// "File" - menu
|
||||
[getMenuElementById("menu_newFolder", aMenuPopupList[0]),
|
||||
getMenuElementById("menu_saveAs", aMenuPopupList[0]),
|
||||
getMenuElementById("menu_getnextnmsg", aMenuPopupList[0]),
|
||||
getMenuElementById("menu_renameFolder", aMenuPopupList[0]),
|
||||
// getMenuElementById("offlineMenuItem", aMenuPopupList[0]),
|
||||
|
||||
// "Edit" - menu
|
||||
getMenuElementById("menu_delete", aMenuPopupList[1]),
|
||||
getMenuElementById("menu_select", aMenuPopupList[1]),
|
||||
|
||||
// "View"-menu
|
||||
getMenuElementById("menu_MessagePaneLayout", aMenuPopupList[2]),
|
||||
getMenuElementById("viewSortMenu", aMenuPopupList[2]),
|
||||
getMenuElementById("viewheadersmenu", aMenuPopupList[2]),
|
||||
getMenuElementById("viewTextSizeMenu", aMenuPopupList[2]),
|
||||
getMenuElementById("pageSourceMenuItem", aMenuPopupList[2]),
|
||||
|
||||
// "Tools"-menu
|
||||
getMenuElementById("filtersCmd", aMenuPopupList[5]),
|
||||
getMenuElementById("runJunkControls", aMenuPopupList[5])].forEach(function(element){
|
||||
removeMenuElementsInSection(element, aExcludeMode);
|
||||
});
|
||||
}
|
||||
|
||||
function swapPopupMenus() {
|
||||
var showStatusbar = document.getElementById("menu_showTaskbar").getAttribute("checked");
|
||||
var newmenupopuplist = null;
|
||||
if (gCurrentMode == "mail") {
|
||||
newmenupopuplist = mailpopuplist;
|
||||
} else if (gCurrentMode == "calendar") {
|
||||
newmenupopuplist = calendarpopuplist;
|
||||
} else if (gCurrentMode == "task") {
|
||||
newmenupopuplist = taskpopuplist;
|
||||
}
|
||||
for (var i = 0; i < menulist.length; i++) {
|
||||
var menu = menulist[i];
|
||||
var oldmenupopup = menu.firstChild;
|
||||
if (oldmenupopup) {
|
||||
menu.replaceChild(newmenupopuplist[i], oldmenupopup);
|
||||
}
|
||||
}
|
||||
#ifdef XP_MACOSX
|
||||
document.getElementById("menu_File").firstChild.appendChild(quitMenu);
|
||||
document.getElementById("tasksMenu").firstChild.appendChild(prefMenu);
|
||||
#endif
|
||||
document.getElementById("menu_showTaskbar").setAttribute("checked", showStatusbar);
|
||||
var messageMenu = document.getElementById("messageMenu");
|
||||
if (gCurrentMode == "mail") {
|
||||
messageMenu.setAttribute("label", messagemenulabel);
|
||||
messageMenu.setAttribute("accesskey", messagemenuaccesskey);
|
||||
} else if (gCurrentMode == "calendar"){
|
||||
messageMenu.setAttribute("label", calendarmenulabel);
|
||||
messageMenu.setAttribute("accesskey", calendarmenuaccesskey);
|
||||
} else if (gCurrentMode == "task"){
|
||||
messageMenu.setAttribute("label", tasksmenulabel);
|
||||
messageMenu.setAttribute("accesskey", tasksmenuaccesskey);
|
||||
}
|
||||
}
|
||||
|
||||
function removeMenuElements(aRoot, aModeValue) {
|
||||
for (var n = 0; n < aModeValue.length; n++) {
|
||||
var modeElements = aRoot.getElementsByAttribute("mode", aModeValue[n]);
|
||||
if (modeElements.length > 0) {
|
||||
for (var i = modeElements.length-1; i >=0; i--) {
|
||||
var element = modeElements[i];
|
||||
if (element) {
|
||||
var localName = element.localName;
|
||||
if (localName =="menuitem" || localName == "menuseparator" || localName == "menu"){
|
||||
element.parentNode.removeChild(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// == invitations link
|
||||
const FIRST_DELAY_STARTUP = 100;
|
||||
const FIRST_DELAY_RESCHEDULE = 100;
|
||||
|
@ -611,4 +338,112 @@ function openInvitationsDialog() {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* the current mode is set to a string defining the current
|
||||
* mode we're in. allowed values are:
|
||||
* - 'mode'
|
||||
* - 'mail'
|
||||
* - 'calendar'
|
||||
* - 'task'
|
||||
*/
|
||||
var gCurrentMode = 'mail';
|
||||
|
||||
/**
|
||||
* ltnSwitch2Mail() switches to the mail mode
|
||||
*/
|
||||
|
||||
function ltnSwitch2Mail() {
|
||||
if (gCurrentMode != 'mail') {
|
||||
var switch2mail = document.getElementById("switch2mail");
|
||||
var switch2calendar = document.getElementById("switch2calendar");
|
||||
var switch2task = document.getElementById("switch2task");
|
||||
switch2mail.setAttribute("checked", "true");
|
||||
switch2calendar.removeAttribute("checked");
|
||||
switch2task.removeAttribute("checked");
|
||||
|
||||
gCurrentMode = 'mail';
|
||||
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
|
||||
|
||||
document.commandDispatcher.updateCommands('calendar_commands');
|
||||
window.setCursor("auto");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ltnSwitch2Calendar() switches to the calendar mode
|
||||
*/
|
||||
|
||||
function ltnSwitch2Calendar() {
|
||||
if (gCurrentMode != 'calendar') {
|
||||
var switch2mail = document.getElementById("switch2mail");
|
||||
var switch2calendar = document.getElementById("switch2calendar");
|
||||
var switch2task = document.getElementById("switch2task");
|
||||
switch2mail.removeAttribute("checked");
|
||||
switch2calendar.setAttribute("checked", "true");
|
||||
switch2task.removeAttribute("checked");
|
||||
|
||||
gCurrentMode = 'calendar';
|
||||
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
|
||||
|
||||
// display the calendar panel on the display deck
|
||||
var viewBox = document.getElementById("calendar-view-box");
|
||||
uncollapseElement(viewBox);
|
||||
var deck = document.getElementById("calendarDisplayDeck");
|
||||
deck.selectedPanel = viewBox;
|
||||
|
||||
// show the last displayed type of calendar view
|
||||
showCalendarView(gLastShownCalendarView);
|
||||
|
||||
document.commandDispatcher.updateCommands('calendar_commands');
|
||||
window.setCursor("auto");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ltnSwitch2Task() switches to the task mode
|
||||
*/
|
||||
|
||||
function ltnSwitch2Task() {
|
||||
if (gCurrentMode != 'task') {
|
||||
var switch2mail = document.getElementById("switch2mail");
|
||||
var switch2calendar = document.getElementById("switch2calendar");
|
||||
var switch2task = document.getElementById("switch2task");
|
||||
switch2mail.removeAttribute("checked");
|
||||
switch2calendar.removeAttribute("checked");
|
||||
switch2task.setAttribute("checked", "true");
|
||||
|
||||
gCurrentMode = 'task';
|
||||
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
|
||||
|
||||
// display the task panel on the display deck
|
||||
var taskBox = document.getElementById("calendar-task-box");
|
||||
uncollapseElement(taskBox);
|
||||
var deck = document.getElementById("calendarDisplayDeck");
|
||||
deck.selectedPanel = taskBox;
|
||||
|
||||
document.commandDispatcher.updateCommands('calendar_commands');
|
||||
window.setCursor("auto");
|
||||
}
|
||||
}
|
||||
|
||||
const gCalSetupMailContext = {
|
||||
popup: function gCalSetupMailContext_popup() {
|
||||
var hasSelection = (GetFirstSelectedMessage() != null);
|
||||
// Disable the convert menu altogether.
|
||||
setElementValue("mailContext-calendar-convert-menu",
|
||||
!hasSelection && "true", "hidden");
|
||||
}
|
||||
};
|
||||
|
||||
// Overwrite the InitMessageMenu function, since we never know in which order
|
||||
// the popupshowing event will be processed. This function takes care of
|
||||
// disabling the message menu when in calendar or task mode.
|
||||
function calInitMessageMenu() {
|
||||
calInitMessageMenu.origFunc();
|
||||
|
||||
document.getElementById("markMenu").disabled = (gCurrentMode != 'mail');
|
||||
}
|
||||
calInitMessageMenu.origFunc = InitMessageMenu;
|
||||
InitMessageMenu = calInitMessageMenu;
|
||||
|
||||
document.addEventListener("load", ltnOnLoad, true);
|
||||
|
|
|
@ -76,67 +76,45 @@
|
|||
#include ../../base/content/calendar-scripts.inc
|
||||
#include lightning-scripts.inc
|
||||
|
||||
<menupopup id="menu_FilePopup">
|
||||
<menu id="menu_Open"
|
||||
mode="calendar"
|
||||
label="&lightning.menupopup.open.label;"
|
||||
accesskey="&lightning.menupopup.open.accesskey;"
|
||||
insertafter="menu_New">
|
||||
<menupopup id="menu_OpenPopup">
|
||||
<menuitem id="ltnOpenMessageFileMenuitem"
|
||||
mode="calendar"
|
||||
label="&lightning.menupopup.open.message.label;"
|
||||
accesskey="&lightning.menupopup.open.message.accesskey;"
|
||||
oncommand="MsgOpenFromFile();"/>
|
||||
<menuitem id="ltnOpenCalendarFileMenuitem"
|
||||
mode="calendar"
|
||||
label="&lightning.menupopup.open.calendar.label;"
|
||||
accesskey="&lightning.menupopup.open.calendar.accesskey;"
|
||||
oncommand="openLocalCalendar();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuitem id="calendar-export-selection-menu"
|
||||
mode="calendar"
|
||||
label="&calendar.export.selection.label;"
|
||||
accesskey="&calendar.export.selection.accesskey;"
|
||||
command="calendar_export_selection_command"
|
||||
observes="calendar_export_selection_command"
|
||||
insertafter="menu_close"/>
|
||||
<menuitem id="calendar-export-menu"
|
||||
mode="calendar"
|
||||
label="&calendar.export.calendar;"
|
||||
accesskey="&calendar.export.calendar.accesskey;"
|
||||
command="calendar_export_command"
|
||||
observes="calendar_export_command"
|
||||
insertafter="menu_close"/>
|
||||
<menuitem id="calendar-import-menu"
|
||||
label="&calendar.importcalendar.label;"
|
||||
accesskey="&calendar.import.accesskey;"
|
||||
command="calendar_import_command"
|
||||
observes="calendar_import_command"
|
||||
mode="calendar"
|
||||
insertafter="menu_close"/>
|
||||
<menuseparator id="afterMenu_close"
|
||||
mode="calendar"
|
||||
insertafter="menu_close"/>
|
||||
</menupopup>
|
||||
<menupopup id="menu_FilePopup">
|
||||
<menu id="menu_Open"
|
||||
mode="calendar"
|
||||
label="&lightning.menupopup.open.label;"
|
||||
accesskey="&lightning.menupopup.open.accesskey;"
|
||||
insertafter="menu_New">
|
||||
<menupopup id="menu_OpenPopup">
|
||||
<menuitem id="ltnOpenMessageFileMenuitem"
|
||||
label="&lightning.menupopup.open.message.label;"
|
||||
accesskey="&lightning.menupopup.open.message.accesskey;"
|
||||
oncommand="MsgOpenFromFile();"/>
|
||||
<menuitem id="ltnOpenCalendarFileMenuitem"
|
||||
label="&lightning.menupopup.open.calendar.label;"
|
||||
accesskey="&lightning.menupopup.open.calendar.accesskey;"
|
||||
oncommand="openLocalCalendar();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
<menuitem id="openMessageFileMenuitem" hidden="true"/>
|
||||
|
||||
<menupopup id="menu_NewPopup">
|
||||
<menuitem id="ltnNewEvent" label="&lightning.menupopup.new.event.label;"
|
||||
accesskey="&event.new.event.accesskey;"
|
||||
key="calendar-new-event-key"
|
||||
command="calendar_new_event_command"
|
||||
observes="calendar_new_event_command"
|
||||
position="2"/>
|
||||
<menuitem id="ltnNewTask" label="&lightning.menupopup.new.task.label;"
|
||||
accesskey="&event.new.todo.accesskey;"
|
||||
key="calendar-new-todo-key"
|
||||
command="calendar_new_todo_command"
|
||||
observes="calendar_new_todo_command"
|
||||
position="3"/>
|
||||
<menuseparator id="afterltnNewTask" position="4"/>
|
||||
<menuitem id="ltnNewEvent"
|
||||
label="&lightning.menupopup.new.event.label;"
|
||||
insertbefore="menu_newFolder"
|
||||
accesskey="&event.new.event.accesskey;"
|
||||
key="calendar-new-event-key"
|
||||
command="calendar_new_event_command"
|
||||
observes="calendar_new_event_command"/>
|
||||
<menuitem id="ltnNewTask"
|
||||
label="&lightning.menupopup.new.task.label;"
|
||||
insertbefore="menu_newFolder"
|
||||
accesskey="&event.new.todo.accesskey;"
|
||||
key="calendar-new-todo-key"
|
||||
command="calendar_new_todo_command"
|
||||
observes="calendar_new_todo_command"/>
|
||||
<menuseparator id="afterltnNewTask"
|
||||
insertbefore="menu_newFolder"/>
|
||||
|
||||
<menuseparator id="beforenewAccountMenuItem"
|
||||
mode="mail"
|
||||
insertbefore="newAccountMenuItem"/>
|
||||
<menuitem id="ltnNewCalendar" label="&lightning.menupopup.new.calendar.label;"
|
||||
command="calendar_new_calendar_command"
|
||||
|
@ -144,198 +122,327 @@
|
|||
accesskey="&calendar.new.server.accesskey;"
|
||||
insertafter="newAccountMenuItem"/>
|
||||
</menupopup>
|
||||
|
||||
<menupopup id="menu_EditPopup">
|
||||
<menuitem id="ltnCalendarProperties"
|
||||
insertafter="menu_properties"
|
||||
label="&calendar.properties.label;"
|
||||
accesskey="&calendar.properties.accesskey;"
|
||||
command="calendar_edit_calendar_command"
|
||||
observes="calendar_edit_calendar_command"/>
|
||||
</menupopup>
|
||||
|
||||
<menupopup id="menu_View_Popup">
|
||||
<menu label="&showCurrentView.label;"
|
||||
mode="calendar,task"
|
||||
accesskey="&showCurrentView.accesskey;">
|
||||
<menupopup>
|
||||
<menuitem type="checkbox"
|
||||
id="ltn-workdays-only-menuitem"
|
||||
label="&calendar.onlyworkday.checkbox.label;"
|
||||
accesskey="&calendar.onlyworkday.checkbox.accesskey;"
|
||||
mode="calendar"
|
||||
observes="calendar_toggle_workdays_only_command"/>
|
||||
<menuitem type="checkbox"
|
||||
id="ltn-tasks-in-view-menuitem"
|
||||
label="&calendar.displaytodos.checkbox.label;"
|
||||
accesskey="&calendar.displaytodos.checkbox.accesskey;"
|
||||
mode="calendar"
|
||||
observes="calendar_toggle_tasks_in_view_command"/>
|
||||
<menuitem type="checkbox"
|
||||
id="ltn-show-completed-in-view"
|
||||
persist="checked"
|
||||
label="&calendar.completedtasks.checkbox.label;"
|
||||
accesskey="&calendar.completedtasks.checkbox.accesskey;"
|
||||
mode="calendar"
|
||||
observes="calendar_toggle_show_completed_in_view_command"/>
|
||||
<menuitem type="checkbox"
|
||||
id="ltn-multiday-rotated"
|
||||
label="&calendar.orientation.label;"
|
||||
accesskey="&calendar.orientation.accesskey;"
|
||||
mode="calendar"
|
||||
command="calendar_toggle_orientation_command"
|
||||
observes="calendar_toggle_orientation_command"/>
|
||||
<observes element="filterBroadcaster" attribute="value" onbroadcast="checkRadioControl(this.parentNode, document.getElementById(this.getAttribute('element')).getAttribute('value'));"/>
|
||||
<menuitem id="tasks-view-filter-all"
|
||||
name="filtergroup"
|
||||
value="all"
|
||||
type="radio"
|
||||
command="calendar_task_filter_command"
|
||||
mode="task"
|
||||
label="&calendar.task.filter.all.label;"
|
||||
accesskey="&calendar.task.filter.all.accesskey;"/>
|
||||
<menuitem id="tasks-view-filter-today"
|
||||
name="filtergroup"
|
||||
value="today"
|
||||
type="radio"
|
||||
command="calendar_task_filter_command"
|
||||
mode="task"
|
||||
label="&calendar.task.filter.today.label;"
|
||||
accesskey="&calendar.task.filter.today.accesskey;"/>
|
||||
<menuitem id="tasks-view-filter-next7days"
|
||||
name="filtergroup"
|
||||
value="next7days"
|
||||
type="radio"
|
||||
command="calendar_task_filter_command"
|
||||
mode="task"
|
||||
label="&calendar.task.filter.next7days.label;"
|
||||
accesskey="&calendar.task.filter.next7days.accesskey;"/>
|
||||
<menuitem id="tasks-view-filter-notstartedtasks"
|
||||
name="filtergroup"
|
||||
value="notstarted"
|
||||
type="radio"
|
||||
command="calendar_task_filter_command"
|
||||
mode="task"
|
||||
label="&calendar.task.filter.notstarted.label;"
|
||||
accesskey="&calendar.task.filter.notstarted.accesskey;"/>
|
||||
<menuitem id="tasks-view-filter-overdue"
|
||||
name="filtergroup"
|
||||
value="overdue"
|
||||
type="radio"
|
||||
command="calendar_task_filter_command"
|
||||
mode="task"
|
||||
label="&calendar.task.filter.overdue.label;"
|
||||
accesskey="&calendar.task.filter.overdue.accesskey;"/>
|
||||
<menuitem id="tasks-view-filter-completed"
|
||||
name="filtergroup"
|
||||
type="radio"
|
||||
value="completed"
|
||||
command="calendar_task_filter_command"
|
||||
mode="task"
|
||||
label="&calendar.task.filter.completed.label;"
|
||||
accesskey="&calendar.task.filter.completed.accesskey;"/>
|
||||
<menuitem id="tasks-view-filter-open"
|
||||
name="filtergroup"
|
||||
type="radio"
|
||||
value="open"
|
||||
command="calendar_task_filter_command"
|
||||
mode="task"
|
||||
label="&calendar.task.filter.open.label;"
|
||||
accesskey="&calendar.task.filter.open.accesskey;"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator id="before-Unifinder-Section" mode="calendar"/>
|
||||
<menuitem id="calendar-show-unifinder-menu"
|
||||
type="checkbox"
|
||||
checked="true"
|
||||
label="&showUnifinderCmd.label;"
|
||||
accesskey="&showUnifinderCmd.accesskey;"
|
||||
mode="calendar"
|
||||
command="calendar_show_unifinder_command"/>
|
||||
<menuseparator id="before-Calendar-View-Section" mode="calendar"/>
|
||||
<menuitem id="ltnChangeViewDay"
|
||||
label="&lightning.toolbar.day.label;"
|
||||
accesskey="&lightning.toolbar.day.accesskey;"
|
||||
type="radio"
|
||||
name="calendarMenuViews"
|
||||
mode="calendar"
|
||||
key="calendar-day-view-key"
|
||||
observes="calendar_day-view_command"/>
|
||||
<menuitem id="ltnChangeViewWeek"
|
||||
label="&lightning.toolbar.week.label;"
|
||||
accesskey="&lightning.toolbar.week.accesskey;"
|
||||
type="radio"
|
||||
name="calendarMenuViews"
|
||||
mode="calendar"
|
||||
key="calendar-week-view-key"
|
||||
observes="calendar_week-view_command"/>
|
||||
<menuitem id="ltnChangeViewMultiweek"
|
||||
label="&lightning.toolbar.multiweek.label;"
|
||||
accesskey="&lightning.toolbar.multiweek.accesskey;"
|
||||
type="radio"
|
||||
name="calendarMenuViews"
|
||||
mode="calendar"
|
||||
key="calendar-multiweek-view-key"
|
||||
observes="calendar_multiweek-view_command"/>
|
||||
<menuitem id="ltnChangeViewMonth"
|
||||
label="&lightning.toolbar.month.label;"
|
||||
accesskey="&lightning.toolbar.month.accesskey;"
|
||||
type="radio"
|
||||
name="calendarMenuViews"
|
||||
mode="calendar"
|
||||
key="calendar-month-view-key"
|
||||
observes="calendar_month-view_command"/>
|
||||
<menuseparator id="before-task-View-Section" mode="mail,calendar,task"/>
|
||||
<menuitem id="tasks-view-minimonth"
|
||||
type="checkbox"
|
||||
mode="calendar,task"
|
||||
label="&calendar.tasks.view.minimonth.label;"
|
||||
accesskey="&calendar.tasks.view.minimonth.accesskey;"
|
||||
command="calendar_toggle_minimonthpane_command"/>
|
||||
<menuitem id="tasks-view-filtertasks"
|
||||
type="checkbox"
|
||||
mode="task"
|
||||
label="&calendar.tasks.view.filtertasks.label;"
|
||||
accesskey="&calendar.tasks.view.filtertasks.accesskey;"
|
||||
command="calendar_toggle_filter_command"/>
|
||||
<menuitem id="tasks-view-calendarlist"
|
||||
type="checkbox"
|
||||
mode="calendar,task"
|
||||
label="&calendar.tasks.view.calendarlist.label;"
|
||||
accesskey="&calendar.tasks.view.calendarlist.accesskey;"
|
||||
command="calendar_toggle_calendarlist_command"/>
|
||||
<menuseparator id="before-today-pane"/>
|
||||
<menu id="today-pane-menu"
|
||||
<menuseparator id="ltnViewMenuSeparator"
|
||||
insertbefore="viewSortMenuSeparator"/>
|
||||
<menu id="ltnTodayPaneMenu"
|
||||
observes="calendar_in_foreground"
|
||||
insertbefore="viewSortMenuSeparator"
|
||||
label="&calendar.context.button.label;"
|
||||
accesskey="&calendar.context.button.accesskey;">
|
||||
<menupopup>
|
||||
<menupopup id="ltnTodayPaneMenuPopup">
|
||||
<menuitem id="ltnShowTodayPane-2"
|
||||
label="&todaypane.showTodayPane.label;"
|
||||
accesskey="&todaypane.showTodayPane.accesskey;"
|
||||
type="checkbox"
|
||||
key="todaypanekey"
|
||||
command="calendar_toggle_todaypane_command"/>
|
||||
<menuseparator id="before-displayminiday"/>
|
||||
<menuitem id="today-pane-displayminiday"
|
||||
<menuseparator id="ltnSeparatorBeforeDisplayMiniday"/>
|
||||
<menuitem id="ltnTodayPaneDisplayMiniday"
|
||||
name="minidisplay"
|
||||
value="miniday"
|
||||
type="radio"
|
||||
oncommand="TodayPane.displayMiniSection(1)"
|
||||
oncommand="TodayPane.displayMiniSection('miniday')"
|
||||
label="&todaypane.showMiniday.label;"
|
||||
accesskey="&todaypane.showMiniday.accesskey;"/>
|
||||
<menuitem id="today-pane-displayminimonth"
|
||||
<menuitem id="ltnTodayPaneDisplayMinimonth"
|
||||
name="minidisplay"
|
||||
value="minimonth"
|
||||
type="radio"
|
||||
oncommand="TodayPane.displayMiniSection(2)"
|
||||
oncommand="TodayPane.displayMiniSection('minimonth')"
|
||||
label="&todaypane.showMinimonth.label;"
|
||||
accesskey="&todaypane.showMinimonth.accesskey;"/>
|
||||
<menuitem id="today-pane-displaynone"
|
||||
<menuitem id="ltnTodayPaneDisplayNone"
|
||||
name="minidisplay"
|
||||
value="none"
|
||||
type="radio"
|
||||
oncommand="TodayPane.displayMiniSection(3)"
|
||||
oncommand="TodayPane.displayMiniSection('none')"
|
||||
label="&todaypane.showNone.label;"
|
||||
accesskey="&todaypane.showNone.accesskey;"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu id="ltnCalendarMenu"
|
||||
insertbefore="viewSortMenuSeparator"
|
||||
label="&lightning.menu.view.calendar.label;"
|
||||
accesskey="&lightning.menu.view.calendar.accesskey;">
|
||||
<menupopup id="ltnTasksMenuPopup">
|
||||
<menuitem id="ltnChangeViewDay"
|
||||
label="&lightning.toolbar.day.label;"
|
||||
accesskey="&lightning.toolbar.day.accesskey;"
|
||||
type="radio"
|
||||
name="calendarMenuViews"
|
||||
key="calendar-day-view-key"
|
||||
observes="calendar_day-view_command"/>
|
||||
<menuitem id="ltnChangeViewWeek"
|
||||
label="&lightning.toolbar.week.label;"
|
||||
accesskey="&lightning.toolbar.week.accesskey;"
|
||||
type="radio"
|
||||
name="calendarMenuViews"
|
||||
key="calendar-week-view-key"
|
||||
observes="calendar_week-view_command"/>
|
||||
<menuitem id="ltnChangeViewMultiweek"
|
||||
label="&lightning.toolbar.multiweek.label;"
|
||||
accesskey="&lightning.toolbar.multiweek.accesskey;"
|
||||
type="radio"
|
||||
name="calendarMenuViews"
|
||||
key="calendar-multiweek-view-key"
|
||||
observes="calendar_multiweek-view_command"/>
|
||||
<menuitem id="ltnChangeViewMonth"
|
||||
label="&lightning.toolbar.month.label;"
|
||||
accesskey="&lightning.toolbar.month.accesskey;"
|
||||
type="radio"
|
||||
name="calendarMenuViews"
|
||||
key="calendar-month-view-key"
|
||||
observes="calendar_month-view_command"/>
|
||||
<menuseparator id="ltnBeforeCalendarViewSection"/>
|
||||
<menuitem id="ltnTasksViewMinimonth"
|
||||
type="checkbox"
|
||||
label="&calendar.tasks.view.minimonth.label;"
|
||||
accesskey="&calendar.tasks.view.minimonth.accesskey;"
|
||||
command="calendar_toggle_minimonthpane_command"/>
|
||||
<menuitem id="ltnTasksViewCalendarlist"
|
||||
type="checkbox"
|
||||
label="&calendar.tasks.view.calendarlist.label;"
|
||||
accesskey="&calendar.tasks.view.calendarlist.accesskey;"
|
||||
command="calendar_toggle_calendarlist_command"/>
|
||||
<menuseparator id="ltnBeforeCurrentViewMenu"/>
|
||||
<menu id="ltnCalendarCurrentViewMenu"
|
||||
observes="calendar_mode_calendar"
|
||||
label="&showCurrentView.label;"
|
||||
accesskey="&showCurrentView.accesskey;">
|
||||
<menupopup id="ltnCalendarCurrentViewMenuPopup">
|
||||
<menuitem type="checkbox"
|
||||
id="ltnWorkdaysOnlyMenuitem"
|
||||
label="&calendar.onlyworkday.checkbox.label;"
|
||||
accesskey="&calendar.onlyworkday.checkbox.accesskey;"
|
||||
observes="calendar_toggle_workdays_only_command"/>
|
||||
<menuitem type="checkbox"
|
||||
id="ltnTasksInViewMenuitem"
|
||||
label="&calendar.displaytodos.checkbox.label;"
|
||||
accesskey="&calendar.displaytodos.checkbox.accesskey;"
|
||||
observes="calendar_toggle_tasks_in_view_command"/>
|
||||
<menuitem type="checkbox"
|
||||
id="ltnShowCompletedInViewMenuItem"
|
||||
label="&calendar.completedtasks.checkbox.label;"
|
||||
accesskey="&calendar.completedtasks.checkbox.accesskey;"
|
||||
observes="calendar_toggle_show_completed_in_view_command"/>
|
||||
<menuitem type="checkbox"
|
||||
id="ltnViewRotated"
|
||||
label="&calendar.orientation.label;"
|
||||
accesskey="&calendar.orientation.accesskey;"
|
||||
command="calendar_toggle_orientation_command"
|
||||
observes="calendar_toggle_orientation_command"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu id="ltnTasksMenu"
|
||||
observes="calendar_mode_task"
|
||||
insertbefore="viewSortMenuSeparator"
|
||||
label="&lightning.menu.view.tasks.label;"
|
||||
accesskey="&lightning.menu.view.tasks.accesskey;">
|
||||
<menupopup id="ltnTasksMenuPopup">
|
||||
<observes element="filterBroadcaster"
|
||||
attribute="value"
|
||||
onbroadcast="checkRadioControl(this.parentNode, document.getElementById(this.getAttribute('element')).getAttribute('value'));"/>
|
||||
<menuitem id="ltnTasksViewFilterTasks"
|
||||
type="checkbox"
|
||||
label="&calendar.tasks.view.filtertasks.label;"
|
||||
accesskey="&calendar.tasks.view.filtertasks.accesskey;"
|
||||
command="calendar_toggle_filter_command"/>
|
||||
<menuseparator id="ltnTasksViewSeparator"/>
|
||||
<menuitem id="ltnTasksViewFilterAll"
|
||||
name="filtergroup"
|
||||
value="all"
|
||||
type="radio"
|
||||
command="calendar_task_filter_command"
|
||||
label="&calendar.task.filter.all.label;"
|
||||
accesskey="&calendar.task.filter.all.accesskey;"/>
|
||||
<menuitem id="ltnTasksViewFilterToday"
|
||||
name="filtergroup"
|
||||
value="today"
|
||||
type="radio"
|
||||
command="calendar_task_filter_command"
|
||||
label="&calendar.task.filter.today.label;"
|
||||
accesskey="&calendar.task.filter.today.accesskey;"/>
|
||||
<menuitem id="ltnTasksViewFilterNext7days"
|
||||
name="filtergroup"
|
||||
value="next7days"
|
||||
type="radio"
|
||||
command="calendar_task_filter_command"
|
||||
label="&calendar.task.filter.next7days.label;"
|
||||
accesskey="&calendar.task.filter.next7days.accesskey;"/>
|
||||
<menuitem id="ltnTasksViewFilterNotstartedtasks"
|
||||
name="filtergroup"
|
||||
value="notstarted"
|
||||
type="radio"
|
||||
command="calendar_task_filter_command"
|
||||
label="&calendar.task.filter.notstarted.label;"
|
||||
accesskey="&calendar.task.filter.notstarted.accesskey;"/>
|
||||
<menuitem id="ltnTasksViewFilterOverdue"
|
||||
name="filtergroup"
|
||||
value="overdue"
|
||||
type="radio"
|
||||
command="calendar_task_filter_command"
|
||||
label="&calendar.task.filter.overdue.label;"
|
||||
accesskey="&calendar.task.filter.overdue.accesskey;"/>
|
||||
<menuitem id="ltnTasksViewFilterCompleted"
|
||||
name="filtergroup"
|
||||
type="radio"
|
||||
value="completed"
|
||||
command="calendar_task_filter_command"
|
||||
label="&calendar.task.filter.completed.label;"
|
||||
accesskey="&calendar.task.filter.completed.accesskey;"/>
|
||||
<menuitem id="ltnTasksViewFilterOpen"
|
||||
name="filtergroup"
|
||||
type="radio"
|
||||
value="open"
|
||||
command="calendar_task_filter_command"
|
||||
label="&calendar.task.filter.open.label;"
|
||||
accesskey="&calendar.task.filter.open.accesskey;"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
|
||||
<window id="messengerWindow">
|
||||
<menupopup id="menu_GoPopup">
|
||||
<menuitem id="ltnGoToToday"
|
||||
insertafter="goNextSeparator"
|
||||
label="&goTodayCmd.label;"
|
||||
accesskey="&goTodayCmd.accesskey;"
|
||||
observes="calendar_go_to_today_command"
|
||||
key="calendar-go-to-today-key"/>
|
||||
</menupopup>
|
||||
|
||||
<broadcasterset id="calendar_broadcasters">
|
||||
<broadcaster id="filterBroadcaster" value="all"/>
|
||||
</broadcasterset>
|
||||
<menupopup id="menu_GoNextPopup">
|
||||
<menuseparator id="ltnGoNextSeparator"/>
|
||||
<!-- Label is set up automatically using the view id. When writing a
|
||||
view extension, overlay this menuitem and add a label-<myviewtype>
|
||||
attribute with the correct label -->
|
||||
<menuitem id="calendar-go-menu-next"
|
||||
label=""
|
||||
label-day="&lightning.toolbar.day.label;"
|
||||
label-week="&lightning.toolbar.week.label;"
|
||||
label-multiweek="&lightning.toolbar.week.label;"
|
||||
label-month="&lightning.toolbar.month.label;"
|
||||
accesskey-day="&lightning.toolbar.day.accesskey;"
|
||||
accesskey-week="&lightning.toolbar.week.accesskey;"
|
||||
accesskey-multiweek="&lightning.toolbar.week.accesskey;"
|
||||
accesskey-month="&lightning.toolbar.month.accesskey;"
|
||||
observes="calendar_view_next_command"/>
|
||||
</menupopup>
|
||||
<menupopup id="menu_GoPreviousPopup">
|
||||
<menuseparator id="ltnGoPreviousSeparator"/>
|
||||
<!-- Label is set up automatically using the view id. When writing a
|
||||
view extension, overlay this menuitem and add a label-<myviewtype>
|
||||
attribute with the correct label -->
|
||||
<menuitem id="calendar-go-menu-previous"
|
||||
label=""
|
||||
label-day="&lightning.toolbar.day.label;"
|
||||
label-week="&lightning.toolbar.week.label;"
|
||||
label-multiweek="&lightning.toolbar.week.label;"
|
||||
label-month="&lightning.toolbar.month.label;"
|
||||
accesskey-day="&lightning.toolbar.day.accesskey;"
|
||||
accesskey-week="&lightning.toolbar.week.accesskey;"
|
||||
accesskey-multiweek="&lightning.toolbar.week.accesskey;"
|
||||
accesskey-month="&lightning.toolbar.month.accesskey;"
|
||||
observes="calendar_view_prev_command"/>
|
||||
</menupopup>
|
||||
|
||||
<menubar id="mail-menubar">
|
||||
<menu id="menu_Event_Task"
|
||||
label="&lightning.menu.eventtask.label;"
|
||||
accesskey="&lightning.menu.eventtask.accesskey;"
|
||||
insertafter="messageMenu">
|
||||
<menupopup id="menu_Event_Task_Popup" onpopupshowing="changeMenuForTask(event)">
|
||||
<menuitem id="ltnNewEvent2"
|
||||
label="&event.new.event;"
|
||||
accesskey="&event.new.event.accesskey;"
|
||||
key="calendar-new-event-key"
|
||||
command="calendar_new_event_command"
|
||||
observes="calendar_new_event_command"/>
|
||||
<menuitem id="ltnNewTask2"
|
||||
label="&event.new.todo;"
|
||||
accesskey="&event.new.todo.accesskey;"
|
||||
key="calendar-new-todo-key"
|
||||
command="calendar_new_todo_command"
|
||||
observes="calendar_new_todo_command"/>
|
||||
<menuseparator id="before-Calendar-Mode-Section"/>
|
||||
<menuitem id="ltnMenuSwitchToCalendar"
|
||||
label="&lightning.toolbar.calendar.label;"
|
||||
accesskey="&lightning.toolbar.calendar.accesskey;"
|
||||
command="switch2calendar"
|
||||
key="openLightningKey"/>
|
||||
<menuitem id="ltnMenuSwitchToTask"
|
||||
label="&lightning.toolbar.task.label;"
|
||||
accesskey="&lightning.toolbar.task.accesskey;"
|
||||
command="switch2task"
|
||||
key="openTasksKey"/>
|
||||
<menuseparator id="ltnBeforeCalendarSection"/>
|
||||
<!-- Menuitems have different schema just to match sunbird -->
|
||||
<menuitem id="calendar-export-menu"
|
||||
label="&calendar.export.label;"
|
||||
accesskey="&calendar.export.accesskey;"
|
||||
command="calendar_export_command"
|
||||
observes="calendar_export_command"/>
|
||||
<menuitem id="calendar-import-menu"
|
||||
label="&calendar.import.label;"
|
||||
accesskey="&calendar.import.accesskey;"
|
||||
command="calendar_import_command"
|
||||
observes="calendar_import_command"/>
|
||||
<menuitem id="ltnPublishCalendar"
|
||||
label="&calendar.publish.label;"
|
||||
accesskey="&calendar.publish.accesskey;"
|
||||
commmand="calendar_publish_calendar_command"
|
||||
observes="calendar_publish_calendar_command"/>
|
||||
<menuitem id="ltnDeleteSelectedCalendar"
|
||||
label="&calendar.deletecalendar.label;"
|
||||
accesskey="&calendar.deletecalendar.accesskey;"
|
||||
command="calendar_delete_calendar_command"
|
||||
observes="calendar_delete_calendar_command"/>
|
||||
<menuseparator id="ltnBeforeTaskActions"/>
|
||||
<menuitem id="ltnTaskActionsMarkCompletedMenuitem"
|
||||
type="checkbox"
|
||||
label="&calendar.context.markcompleted.label;"
|
||||
accesskey="&calendar.context.markcompleted.accesskey;"
|
||||
command="calendar_toggle_completed_command"
|
||||
observes="calendar_toggle_completed_command"/>
|
||||
<menu id="ltnTaskActionsPriorityMenuitem"
|
||||
label="&calendar.context.priority.label;"
|
||||
accesskey="&calendar.context.priority.accesskey;"
|
||||
command="calendar_general-priority_command"
|
||||
observes="calendar_general-priority_command">
|
||||
<menupopup type="task-priority"/>
|
||||
</menu>
|
||||
<menu id="ltnTaskActionsProgressMenuitem"
|
||||
label="&calendar.context.progress.label;"
|
||||
accesskey="&calendar.context.progress.accesskey;"
|
||||
command="calendar_general-progress_command"
|
||||
observes="calendar_general-progress_command">
|
||||
<menupopup type="task-progress"/>
|
||||
</menu>
|
||||
<menuseparator id="ltnBeforeUnifinderSection" />
|
||||
<!-- menuitem has different schema just to match sunbird -->
|
||||
<menuitem id="calendar-show-unifinder-menu"
|
||||
type="checkbox"
|
||||
checked="true"
|
||||
label="&showUnifinderCmd.label;"
|
||||
accesskey="&showUnifinderCmd.accesskey;"
|
||||
command="calendar_show_unifinder_command"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menubar>
|
||||
|
||||
<window id="messengerWindow">
|
||||
|
||||
<!-- Be sure to keep these sets, since they will be overlayed by
|
||||
calendar/base/content/calendar-common-sets.xul -->
|
||||
|
@ -352,6 +459,8 @@
|
|||
oncommand="document.getElementById('tabmail').openTab('calendar', document.getElementById('calendar-tab-button').getAttribute('tooltiptext'))"/>
|
||||
<command id="new_task_tab"
|
||||
oncommand="document.getElementById('tabmail').openTab('tasks', document.getElementById('task-tab-button').getAttribute('tooltiptext'))"/>
|
||||
<command id="calendar_go_to_today_command"
|
||||
oncommand="document.getElementById('tabmail').openTab('calendar', document.getElementById('calendar-tab-button').getAttribute('tooltiptext')); goToDate(now())"/>
|
||||
</commandset>
|
||||
|
||||
<keyset id="calendar-keys">
|
||||
|
@ -362,80 +471,11 @@
|
|||
<key id="calendar-new-todo-key" key="&lightning.keys.todo.new;" modifiers="accel" command="calendar_new_todo_command"/>
|
||||
</keyset>
|
||||
|
||||
<popupset id="calendar-popupset">
|
||||
<menupopup id="calendar-GoPopupMenu">
|
||||
<menuitem id="ltnGoToToday"
|
||||
label="&goTodayCmd.label;"
|
||||
accesskey="&goTodayCmd.accesskey;"
|
||||
mode="calendar"
|
||||
observes="calendar_go_to_today_command"
|
||||
key="calendar-go-to-today-key"/>
|
||||
<menuseparator id="before-ModeMenuItems"/>
|
||||
<menuitem id="ltnMenu_mail"
|
||||
type="radio"
|
||||
name="modemenu"
|
||||
label="&lightning.toolbar.mail.label;"
|
||||
accesskey="&lightning.toolbar.mail.accesskey;"
|
||||
command="switch2mail"
|
||||
key="key_mail" modifiers="accel"/>
|
||||
<menuitem id="ltnMenu_calendar"
|
||||
type="radio"
|
||||
name="modemenu"
|
||||
label="&lightning.toolbar.calendar.label;"
|
||||
accesskey="&lightning.toolbar.calendar.accesskey;"
|
||||
command="switch2calendar"
|
||||
key="openLightningKey"/>
|
||||
<menuitem id="ltnMenu_tasks"
|
||||
type="radio"
|
||||
name="modemenu"
|
||||
label="&lightning.toolbar.task.label;"
|
||||
accesskey="&lightning.toolbar.task.accesskey;"
|
||||
command="switch2task"
|
||||
key="openTasksKey"/>
|
||||
<menuseparator id="before-AddressBook"/>
|
||||
<menuitem id="addressBook-calendar" label="&addressBookCmd.label;"
|
||||
accesskey="&addressBookCmd.accesskey;"
|
||||
key="key_addressbook"
|
||||
oncommand="toAddressBook();"/>
|
||||
</menupopup>
|
||||
<menupopup id="calendarCalendarPopupMenu">
|
||||
<menuitem id="ltnNewEvent2" label="&event.new.event;"
|
||||
accesskey="&event.new.event.accesskey;"
|
||||
key="calendar-new-event-key"
|
||||
observes="calendar_new_event_command"
|
||||
command="calendar_new_event_command"
|
||||
position="2"/>
|
||||
<menuitem id="ltnNewTask2" label="&event.new.todo;"
|
||||
accesskey="&event.new.todo.accesskey;"
|
||||
key="calendar-new-todo-key"
|
||||
observes="calendar_new_todo_command"
|
||||
command="calendar_new_todo_command"
|
||||
position="3"/>
|
||||
<menuseparator id="firstCalendarSeparator" mode="calendar"/>
|
||||
<menuitem id="publishCalendar"
|
||||
label="&calendar.publish.label;"
|
||||
accesskey="&calendar.publish.accesskey;"
|
||||
commmand="calendar_publish_calendar_command"
|
||||
observes="calendar_publish_calendar_command"/>
|
||||
<menuseparator id="afterSubscription"/>
|
||||
<menuitem label="&calendar.context.newserver.label;"
|
||||
id="calpopup-new"
|
||||
accesskey="&calendar.context.newserver.accesskey;"
|
||||
command="calendar_new_calendar_command"
|
||||
observes="calendar_new_calendar_command"/>
|
||||
<menuitem id="ltnDeleteSelectedCalendar"
|
||||
label="&calendar.context.deleteserver.label;"
|
||||
accesskey="&calendar.context.deleteserver.accesskey;"
|
||||
command="calendar_delete_calendar_command"
|
||||
observes="calendar_delete_calendar_command"/>
|
||||
<menuseparator id="beforeProperties"/>
|
||||
<menuitem label="&calendar.properties.label;"
|
||||
id="calendarproperties"
|
||||
accesskey="&calendar.properties.accesskey;"
|
||||
command="calendar_edit_calendar_command"
|
||||
observes="calendar_edit_calendar_command"/>
|
||||
</menupopup>
|
||||
</popupset>
|
||||
<broadcasterset id="calendar_broadcasters">
|
||||
<broadcaster id="filterBroadcaster" value="all"/>
|
||||
</broadcasterset>
|
||||
|
||||
<popupset id="calendar-popupset"/>
|
||||
</window>
|
||||
|
||||
<hbox id="tabmail-buttons">
|
||||
|
@ -444,6 +484,7 @@
|
|||
<toolbarbutton id="task-tab-button" command="new_task_tab"
|
||||
tooltiptext="&lightning.toolbar.task.label;"/>
|
||||
</hbox>
|
||||
|
||||
<tabpanels id="tabpanelcontainer">
|
||||
<vbox id="calendarTabPanel">
|
||||
<hbox id="calendarContent" flex="1">
|
||||
|
|
|
@ -1,150 +0,0 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Sun Microsystems code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Sun Microsystems.
|
||||
* Portions created by the Initial Developer are Copyright (C) 2007
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Michael Buettner <michael.buettner@sun.com>
|
||||
* Philipp Kewisch <mozilla@kewis.ch>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/**
|
||||
* Global variables
|
||||
*/
|
||||
var gCustomizeId;
|
||||
|
||||
/**
|
||||
* the current mode is set to a string defining the current
|
||||
* mode we're in. allowed values are:
|
||||
* - 'mode'
|
||||
* - 'mail'
|
||||
* - 'calendar'
|
||||
* - 'task'
|
||||
*/
|
||||
var gCurrentMode = 'mail';
|
||||
|
||||
/**
|
||||
* ltnSwitch2Mail() switches to the mail mode
|
||||
*/
|
||||
|
||||
function ltnSwitch2Mail() {
|
||||
if (gCurrentMode != 'mail') {
|
||||
var switch2mail = document.getElementById("switch2mail");
|
||||
var switch2calendar = document.getElementById("switch2calendar");
|
||||
var switch2task = document.getElementById("switch2task");
|
||||
switch2mail.setAttribute("checked", "true");
|
||||
switch2calendar.removeAttribute("checked");
|
||||
switch2task.removeAttribute("checked");
|
||||
|
||||
gCurrentMode = 'mail';
|
||||
swapPopupMenus();
|
||||
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
|
||||
|
||||
document.commandDispatcher.updateCommands('calendar_commands');
|
||||
|
||||
// Disable the rotate view menuitem
|
||||
document.getElementById("calendar_toggle_orientation_command")
|
||||
.setAttribute("disabled", "true");
|
||||
window.setCursor("auto");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ltnSwitch2Calendar() switches to the calendar mode
|
||||
*/
|
||||
|
||||
function ltnSwitch2Calendar() {
|
||||
if (gCurrentMode != 'calendar') {
|
||||
var switch2mail = document.getElementById("switch2mail");
|
||||
var switch2calendar = document.getElementById("switch2calendar");
|
||||
var switch2task = document.getElementById("switch2task");
|
||||
switch2mail.removeAttribute("checked");
|
||||
switch2calendar.setAttribute("checked", "true");
|
||||
switch2task.removeAttribute("checked");
|
||||
|
||||
gCurrentMode = 'calendar';
|
||||
swapPopupMenus();
|
||||
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
|
||||
|
||||
// display the calendar panel on the display deck
|
||||
var viewBox = document.getElementById("calendar-view-box");
|
||||
uncollapseElement(viewBox);
|
||||
var deck = document.getElementById("calendarDisplayDeck");
|
||||
deck.selectedPanel = viewBox;
|
||||
|
||||
// show the last displayed type of calendar view
|
||||
showCalendarView(gLastShownCalendarView);
|
||||
|
||||
document.commandDispatcher.updateCommands('calendar_commands');
|
||||
|
||||
window.setCursor("auto");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ltnSwitch2Task() switches to the task mode
|
||||
*/
|
||||
|
||||
function ltnSwitch2Task() {
|
||||
if (gCurrentMode != 'task') {
|
||||
var switch2mail = document.getElementById("switch2mail");
|
||||
var switch2calendar = document.getElementById("switch2calendar");
|
||||
var switch2task = document.getElementById("switch2task");
|
||||
switch2mail.removeAttribute("checked");
|
||||
switch2calendar.removeAttribute("checked");
|
||||
switch2task.setAttribute("checked", "true");
|
||||
|
||||
gCurrentMode = 'task';
|
||||
swapPopupMenus();
|
||||
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
|
||||
|
||||
// display the task panel on the display deck
|
||||
var taskBox = document.getElementById("calendar-task-box");
|
||||
uncollapseElement(taskBox);
|
||||
var deck = document.getElementById("calendarDisplayDeck");
|
||||
deck.selectedPanel = taskBox;
|
||||
|
||||
document.commandDispatcher.updateCommands('calendar_commands');
|
||||
|
||||
window.setCursor("auto");
|
||||
}
|
||||
}
|
||||
|
||||
const gCalSetupMailContext = {
|
||||
popup: function gCalSetupMailContext_popup() {
|
||||
var hasSelection = (GetFirstSelectedMessage() != null);
|
||||
// Disable the convert menu altogether.
|
||||
setElementValue("mailContext-calendar-convert-menu",
|
||||
!hasSelection && "true", "hidden");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -40,7 +40,6 @@ lightning.jar:
|
|||
* content/lightning/messenger-overlay-sidebar.xul (content/messenger-overlay-sidebar.xul)
|
||||
content/lightning/messenger-overlay-preferences.js (content/messenger-overlay-preferences.js)
|
||||
content/lightning/messenger-overlay-preferences.xul (content/messenger-overlay-preferences.xul)
|
||||
content/lightning/messenger-overlay-toolbar.js (content/messenger-overlay-toolbar.js)
|
||||
* content/lightning/messenger-overlay-toolbar.xul (content/messenger-overlay-toolbar.xul)
|
||||
% skin lightning classic/1.0 %skin/lightning/
|
||||
skin/lightning/imip.css (themes/@THEME@/imip.css)
|
||||
|
|
|
@ -62,14 +62,17 @@
|
|||
<!ENTITY calendar.import.key "I">
|
||||
<!ENTITY calendar.import.accesskey "I">
|
||||
|
||||
<!ENTITY calendar.export.calendar.label "Export Calendar…">
|
||||
<!ENTITY calendar.export.calendar.accesskey "E">
|
||||
<!ENTITY calendar.export.label "Export…">
|
||||
<!ENTITY calendar.export.accesskey "E">
|
||||
<!ENTITY calendar.export.selection.label "Export Selection…">
|
||||
<!ENTITY calendar.export.selection.accesskey "S">
|
||||
|
||||
<!ENTITY calendar.publish.label "Publish…">
|
||||
<!ENTITY calendar.publish.accesskey "b">
|
||||
|
||||
<!ENTITY calendar.deletecalendar.label "Delete Selected Calendar…">
|
||||
<!ENTITY calendar.deletecalendar.accesskey "D">
|
||||
|
||||
<!ENTITY calendar.menu.customize.label "Customize…">
|
||||
<!ENTITY calendar.menu.customize.accesskey "C">
|
||||
|
||||
|
@ -99,11 +102,6 @@
|
|||
<!ENTITY goNextCmd.month.label "Next Month">
|
||||
<!ENTITY goNextCmd.all.accesskey "e">
|
||||
|
||||
<!ENTITY addressBookCmd.label "Address Book">
|
||||
<!ENTITY addressBookCmd.accesskey "A">
|
||||
|
||||
<!ENTITY calendar.importcalendar.label "Import Calendar…">
|
||||
|
||||
<!ENTITY showCurrentView.label "Current View">
|
||||
<!ENTITY showCurrentView.accesskey "V">
|
||||
|
||||
|
|
|
@ -61,11 +61,15 @@
|
|||
<!ENTITY lightning.menupopup.open.calendar.label "Calendar File…">
|
||||
<!ENTITY lightning.menupopup.open.calendar.accesskey "C">
|
||||
|
||||
<!-- Messenger Sidebar -->
|
||||
<!ENTITY lightning.calendar.label "Calendar">
|
||||
<!ENTITY lightning.calendar.accesskey "C">
|
||||
<!ENTITY lightning.tasks.label "Tasks">
|
||||
<!ENTITY lightning.tasks.accesskey "T">
|
||||
<!-- View Menu -->
|
||||
<!ENTITY lightning.menu.view.calendar.label "Calendar">
|
||||
<!ENTITY lightning.menu.view.calendar.accesskey "n">
|
||||
<!ENTITY lightning.menu.view.tasks.label "Tasks">
|
||||
<!ENTITY lightning.menu.view.tasks.accesskey "k">
|
||||
|
||||
<!-- Events and Tasks menu -->
|
||||
<!ENTITY lightning.menu.eventtask.label "Events and Tasks">
|
||||
<!ENTITY lightning.menu.eventtask.accesskey "n">
|
||||
|
||||
<!-- Mode Toolbar -->
|
||||
<!ENTITY lightning.toolbar.mail.label "Mail">
|
||||
|
|
|
@ -164,6 +164,9 @@
|
|||
<!ENTITY updateCmd.label "Check for Updates…">
|
||||
<!ENTITY updateCmd.accesskey "o">
|
||||
|
||||
<!ENTITY sunbird.export.calendar.label "Export Calendar…">
|
||||
<!ENTITY sunbird.export.calendar.accesskey "E">
|
||||
|
||||
<!-- Mac OS X "Window" menu items -->
|
||||
<!ENTITY windowMenu.label "Window">
|
||||
<!ENTITY minimizeWindow.label "Minimize">
|
||||
|
|
|
@ -245,10 +245,4 @@ function sbSwitchToView(newView) {
|
|||
|
||||
// Call the common view switching code in calendar-views.js
|
||||
switchToView(newView);
|
||||
|
||||
var labelAttribute = "label-" + newView + "-view";
|
||||
var prevCommand = document.getElementById("calendar-go-menu-previous");
|
||||
prevCommand.setAttribute("label", prevCommand.getAttribute(labelAttribute));
|
||||
var nextCommand = document.getElementById("calendar-go-menu-next");
|
||||
nextCommand.setAttribute("label", nextCommand.getAttribute(labelAttribute));
|
||||
}
|
||||
|
|
|
@ -90,8 +90,8 @@
|
|||
accesskey="&calendar.export.selection.accesskey;"
|
||||
observes="calendar_export_selection_command"/>
|
||||
<menuitem id="calendar-export-calendar-menu"
|
||||
label="&calendar.export.calendar.label;"
|
||||
accesskey="&calendar.export.calendar.accesskey;"
|
||||
label="&sunbird.export.calendar.label;"
|
||||
accesskey="&sunbird.export.calendar.accesskey;"
|
||||
observes="calendar_export_command"/>
|
||||
<menuseparator id="calendar-importexport-sep"/>
|
||||
<menuitem id="calendar-publish-menu"
|
||||
|
@ -350,22 +350,23 @@
|
|||
accesskey="&goDateCmd.accesskey;"
|
||||
observes="go_date_command"/>
|
||||
<menuseparator/>
|
||||
<!-- Label is set appropriate to the variable newView in
|
||||
sbSwitchToView(newView) of calendar.js -->
|
||||
<!-- Label is set up automatically using the view id. When writing a
|
||||
view extension, overlay this menuitem and add a label-<myviewtype>
|
||||
attribute with the correct label -->
|
||||
<menuitem id="calendar-go-menu-previous"
|
||||
label=""
|
||||
label-day-view="&goPreviousCmd.day.label;"
|
||||
label-week-view="&goPreviousCmd.week.label;"
|
||||
label-multiweek-view="&goPreviousCmd.week.label;"
|
||||
label-month-view="&goPreviousCmd.month.label;"
|
||||
label-day="&goPreviousCmd.day.label;"
|
||||
label-week="&goPreviousCmd.week.label;"
|
||||
label-multiweek="&goPreviousCmd.week.label;"
|
||||
label-month="&goPreviousCmd.month.label;"
|
||||
accesskey="&goPreviousCmd.accesskey;"
|
||||
observes="calendar_view_prev_command"/>
|
||||
<menuitem id="calendar-go-menu-next"
|
||||
label=""
|
||||
label-day-view="&goNextCmd.day.label;"
|
||||
label-week-view="&goNextCmd.week.label;"
|
||||
label-multiweek-view="&goNextCmd.week.label;"
|
||||
label-month-view="&goNextCmd.month.label;"
|
||||
label-day="&goNextCmd.day.label;"
|
||||
label-week="&goNextCmd.week.label;"
|
||||
label-multiweek="&goNextCmd.week.label;"
|
||||
label-month="&goNextCmd.month.label;"
|
||||
accesskey="&goNextCmd.all.accesskey;"
|
||||
observes="calendar_view_next_command"/>
|
||||
</menupopup>
|
||||
|
|
|
@ -71,6 +71,7 @@
|
|||
<command id="cmd_quitApplication" oncommand="goQuitApplication()"/>
|
||||
|
||||
<command id="close_calendar_command" oncommand="closeCalendar()"/>
|
||||
<command id="calendar_go_to_today_command" oncommand="goToDate(now())"/>
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
<command id="minimizeWindowCmd" oncommand="window.minimize();"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче