Bug 429687-Follow-up features for the mode dependent today-pane;r=philipp;ui-r=christian

This commit is contained in:
Berend.Cornelius%sun.com 2008-07-15 10:23:18 +00:00
Родитель e399be7ed4
Коммит 274d5cbf2a
11 изменённых файлов: 298 добавлений и 174 удалений

Просмотреть файл

@ -21,6 +21,7 @@
-
- Contributor(s):
- Simon Paquet <bugzilla@babylonsounds.com>
- Berend Cornelius <berend.cornelius@sun.com>
-
- 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
@ -101,12 +102,13 @@
<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_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_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_toggle_todaypane_command" oncommand="document.getElementById('today-pane-panel').togglePane(event)"/>
<command id="calendar_toggle_todaypane_command"
oncommand="document.getElementById('today-pane-panel').togglePane(event); TodayPane.setTodayHeader()"/>
<command id="calendar_toggle_invitations_command" oncommand="document.getElementById('invitations-pane').togglePane(event)"/>
<command id="calendar_view_next_command" oncommand="moveView(1)"/>
<command id="calendar_view_prev_command" oncommand="moveView(-1)"/>

Просмотреть файл

@ -336,6 +336,32 @@ function addMenuItem(aParent, aLabel, aValue, aCommand) {
return item;
}
/**
* sets a given attribute value on the children of a passed node
*
* @param aParent the parent node.
* @param aAttribute the name of the attribute to be set.
* @param aValue the value of the attribute.
* @param aFilterAttribute The name of an attribute that the child nodes used
* to filter the childnodes.
* @param aFilterValue The value of the filterattribute. If set only those
* childnodes are modified that have an attribute
* 'aFilterAttribute' with the given value
* 'aFilterValue' set.
*/
function setAttributeToChildren(aParent, aAttribute, aValue, aFilterAttribute, aFilterValue) {
for (var i = 0; i < aParent.childNodes.length; i++) {
var element = aParent.childNodes[i];
if (aFilterAttribute == null || element.hasAttribute(aFilterAttribute)) {
var compValue = element.getAttribute(aFilterAttribute);
if (compValue === aFilterValue) {
setElementValue(element, aValue, aAttribute);
}
}
}
}
/**
* checks a radio control or a radio-menuitem.
*

Просмотреть файл

@ -41,10 +41,6 @@ var TodayPane = {
paneViews: null,
start: null,
cwlabel: null,
dateFormatter: Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
.getService(Components.interfaces.calIDateTimeFormatter),
weekFormatter: Components.classes["@mozilla.org/calendar/weektitle-service;1"]
.getService(Components.interfaces.calIWeekTitleService),
onLoad: function onLoad() {
this.paneViews = [ calGetString("calendar", "eventsandtasks"), calGetString("calendar", "tasksonly"), calGetString("calendar", "eventsonly") ];
@ -55,22 +51,36 @@ var TodayPane = {
this.setTodayHeader();
},
onUnload: function onUnload() {
document.getElementById("modeBroadcaster").removeEventListener("DOMAttrModified", this.onModeModified, false);
},
setTodayHeader: function setTodayHeader() {
var currentMode = document.getElementById("modeBroadcaster").getAttribute("mode");
var agendaIsVisible = document.getElementById("agenda-panel").isVisible(currentMode);
var todoIsVisible = document.getElementById("todo-tab-panel").isVisible(currentMode);
var index = 2;
if (agendaIsVisible && todoIsVisible) {
var index = 0;
index = 0;
} else if (!agendaIsVisible && (todoIsVisible)) {
var index = 1;
index = 1;
} else if (agendaIsVisible && (!todoIsVisible)) {
var index = 2;
index = 2;
} else { // agendaIsVisible == false && todoIsVisible == false:
// In this case something must have gone wrong
// - probably in the previous session - and no pane is displayed.
// We set a default by only displaying agenda-pane.
agendaIsVisible = true;
document.getElementById("agenda-panel").setVisible(agendaIsVisible);
index = 2;
}
var todayHeader = document.getElementById("today-pane-header");
todayHeader.setAttribute("index", index);
todayHeader.setAttribute("value", this.paneViews[index]);
var todayPaneSplitter = document.getElementById("today-pane-splitter");
setBooleanAttribute(todayPaneSplitter, "hidden", (index != 0));
var todayIsVisible = document.getElementById("today-pane-panel").isVisible();
this.disableMenuItems(!todayIsVisible || !agendaIsVisible);
},
initializeMiniday: function initializeMiniday() {
@ -95,7 +105,7 @@ var TodayPane = {
if (this.cwlabel == null) {
this.cwlabel = calGetString("calendar", "shortcalendarweek");
}
return aMonthLabel.value = this.dateFormatter.shortMonthName(aIndex)
return aMonthLabel.value = getDateFormatter().shortMonthName(aIndex)
+ " " + aYear + ", " + this.cwlabel + " " + aCalWeek;
},
@ -115,8 +125,10 @@ var TodayPane = {
var agendaPanel = document.getElementById("agenda-panel");
var todoPanel = document.getElementById("todo-tab-panel");
var currentMode = document.getElementById("modeBroadcaster").getAttribute("mode");
agendaPanel.setVisible(index != 1 && agendaPanel.isVisibleInMode(currentMode));
todoPanel.setVisible(index != 2 && todoPanel.isVisibleInMode(currentMode));
var isTodoPanelVisible = (index != 2 && todoPanel.isVisibleInMode(currentMode));
var isAgendaPanelVisible = (index != 1 && agendaPanel.isVisibleInMode(currentMode));
todoPanel.setVisible(isTodoPanelVisible);
agendaPanel.setVisible(isAgendaPanelVisible);
this.setTodayHeader();
},
@ -132,14 +144,14 @@ var TodayPane = {
var newdatetime = jsDateToDateTime(aNewDate, floating());
newdatetime = newdatetime.getInTimezone(calendarDefaultTimezone());
document.getElementById("aMinimonthPopupset").hidePopup();
return this.setDay(newdatetime);
return this.setDay(newdatetime, true);
},
getDay: function getDay(aNewDate) {
return this.start;
},
setDay: function setDay(aNewDate) {
setDay: function setDay(aNewDate, aDontUpdateMinimonth) {
this.start = aNewDate.clone();
var daylabel = document.getElementById("datevalue-label");
@ -151,10 +163,14 @@ var TodayPane = {
monthnamedeck.selectedIndex = this.start.month;
var selMonthPanel = monthnamedeck.selectedPanel;
this.setMonthDescription(selMonthPanel,
this.start.month,
this.start.year,
getWeekFormatter().getWeekTitle(this.start));
if (!aDontUpdateMinimonth || !aDontUpdateMinimonth) {
document.getElementById("today-Minimonth").value = this.start.jsDate;
}
this.updatePeriod();
return this.setMonthDescription(selMonthPanel, this.start.month,
this.start.year,
this.weekFormatter.getWeekTitle(this.start));
},
advance: function advance(dir) {
@ -175,6 +191,19 @@ var TodayPane = {
return agendaListbox.refreshPeriodDates(date);
},
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);
},
disableMenuItems: function disableMenuItems(disable) {
var menu = document.getElementById("today-pane-menu");
if (menu) {
setAttributeToChildren(menu.firstChild, "disabled", disable, "name", "minidisplay");
}
},
// DOMAttrModified handler that listens to the todaypane-splitter
onModeModified: function onModeModified(aEvent) {
if (aEvent.attrName == "mode") {
@ -190,4 +219,4 @@ function loadTodayPane() {
TodayPane.onLoad();
}
window.addEventListener("load", loadTodayPane, false);
window.addEventListener("load", loadTodayPane, false);

Просмотреть файл

@ -76,134 +76,174 @@
</modehbox>
<spacer id="buttonspacer"/>
<toolbarbutton id="today-closer" class="today-closebutton"
oncommand="document.getElementById('today-pane-panel').setVisible(false, true, true);"/>
oncommand="document.getElementById('today-pane-panel').setVisible(false, true, true);
TodayPane.setTodayHeader()"/>
</sidebarheader>
<box id="mini-day-box" class="today-subpane">
<stack flex="1">
<image id="mini-day-image" flex="1"/>
<hbox flex="1">
<deck id="dateContainer" selectedIndex="0">
<hbox pack="center">
<label id="datevalue-label" text="55" class="dateValue"/>
</hbox>
<label class="dateValue"/>
</deck>
<vbox flex="1">
<hbox pack="center">
<deck id="weekdayNameContainer"
pack="center">
<label/>
<label/>
<label/>
<label/>
<label/>
<label/>
<label/>
</deck>
<spacer id="weekspacer" flex="1"/>
<hbox pack="end">
<toolbarbutton id="previous-day-button"
class="miniday-nav-buttons"
tooltiptext="&onedaybackward.tooltip;"
oncommand="TodayPane.advance(parseInt(this.getAttribute('dir')));"
dir="-1"/>
<toolbarbutton id="today-button"
class="miniday-nav-buttons"
tooltiptext="&showToday.tooltip;"
oncommand="TodayPane.setDay(now());"/>
<toolbarbutton id="next-day-button"
class="miniday-nav-buttons"
tooltiptext="&onedayforward.tooltip;"
oncommand="TodayPane.advance(parseInt(this.getAttribute('dir')));"
dir="1"/>
</hbox>
</hbox>
<hbox pack="start">
<deck id ="monthNameContainer">
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
</deck>
<spacer flex="1"/>
</hbox>
</vbox>
<toolbarbutton id="miniday-dropdown-button"
tooltiptext="&showselectedday.tooltip;"
popup="aMinimonthPopupset"
class="toolbarbutton-menubutton-dropmarker"/>
<popupset>
<popup id="aMinimonthPopupset" position="after_start">
<minimonth id="todayMinimonth" flex="1"
onchange="TodayPane.setDaywithjsDate(this.value);"/>
</popup>
</popupset>
</hbox>
</stack>
</box>
<vbox flex="1">
<modevbox id="agenda-panel" mode="mail,calendar,task"
broadcaster="modeBroadcaster"
height="200" persist="collapsed height" flex="1"
ondraggesture="nsDragAndDrop.startDrag(event, calendarCalendarButtonDNDObserver);"
ondragover="nsDragAndDrop.dragOver(event, calendarCalendarButtonDNDObserver);"
ondragdrop="nsDragAndDrop.drop(event, calendarCalendarButtonDNDObserver);">
<toolbar id="agenda-toolbar" iconsize="small">
<toolbarbutton id="calendar-new-event-button"
mode="mail"
iconsize="small"
orient="horizontal"
class="cal-toolbarbutton-1"
label="&calendar.newevent.button.label;"
tooltiptext="&calendar.newevent.button.tooltip;"
oncommand="agendaListbox.createNewEvent(event)"/>
</toolbar>
<popup id="agenda-menu" onpopupshowing="if (event.target == event.currentTarget) { agendaListbox.buildAgendaPopupMenu(this) }"/>
<vbox id="agenda-menu-box" hidden="true">
<menuitem label="&calendar.context.modifyitem.label;"
accesskey="&calendar.context.modifyitem.accesskey;"
observes="agenda_edit_event_command"/>
<menuitem label="&calendar.context.deleteitem.label;"
accesskey="&calendar.context.deleteitem.accesskey;"
observes="agenda_delete_event_command"/>
<menu id="agenda-context-menu-convert-menu"
label="&calendar.context.convertmenu.label;"
accesskey="&calendar.context.convertmenu.accesskey.calendar;">
<menupopup id="agenda-context-menu-convert-menupopup">
<menuitem id="agenda-context-menu-convert-message-menuitem"
label="&calendar.context.convertmenu.message.label;"
accesskey="&calendar.context.convertmenu.message.accesskey;"
oncommand="calendarMailButtonDNDObserver.onDropItems(agendaListbox.getSelectedItems())"/>
<menuitem id="agenda-context-menu-convert-task-menuitem"
class="event-only"
label="&calendar.context.convertmenu.task.label;"
accesskey="&calendar.context.convertmenu.task.accesskey;"
oncommand="calendarTaskButtonDNDObserver.onDropItems(agendaListbox.getSelectedItems())"/>
</menupopup>
</menu>
</vbox>
<vbox id="richlistitem-container" hidden="true">
<agenda-checkbox-richlist-item id="today-header-hidden" title="&calendar.today.button.label;" checked="true" persist="checked"/>
<agenda-checkbox-richlist-item id="tomorrow-header-hidden" title="&calendar.tomorrow.button.label;" checked="false" persist="checked"/>
<agenda-checkbox-richlist-item id="nextweek-header-hidden" title="&calendar.soon.button.label;" checked="false" persist="checked"/>
</vbox>
<richlistbox id="agenda-listbox" flex="1" context="agenda-menu"
onblur="agendaListbox.onBlur();"
onfocus="agendaListbox.onFocus();"
onkeypress="agendaListbox.onKeyPress(event);"
ondblclick="agendaListbox.createNewEvent(event);"/>
<modevbox id="agenda-panel"
flex="1"
mode="mail,calendar,task"
collapsedinmodes="calendar"
persist="collapsed height collapsedinmodes"
broadcaster="modeBroadcaster">
<modebox id="today-none-box"
mode="mail,calendar,task"
collapsedinmodes="mail,calendar,task"
broadcaster="modeBroadcaster"
refcontrol="today-pane-displaynone"
persist="collapsedinmodes"/>
<modehbox id="today-minimonth-box"
class="today-subpane"
mode="mail,calendar,task"
broadcaster="modeBroadcaster"
collapsedinmodes="mail,calendar,task"
refcontrol="today-pane-displayminimonth"
persist="collapsedinmodes">
<spacer flex="1"/>
<minimonth id="today-Minimonth" onchange="TodayPane.setDaywithjsDate(this.value);"/>
<spacer flex="1"/>
</modehbox>
<modebox id="mini-day-box"
mode="mail,calendar,task"
class="today-subpane"
refcontrol="today-pane-displayminiday"
broadcaster="modeBroadcaster"
collapsedinmodes=""
persist="collapsedinmodes">
<stack flex="1">
<image id="mini-day-image" flex="1"/>
<hbox flex="1">
<deck id="dateContainer" selectedIndex="0">
<hbox pack="center">
<label id="datevalue-label" text="55" class="dateValue"/>
</hbox>
<label class="dateValue"/>
</deck>
<vbox flex="1">
<hbox pack="center">
<deck id="weekdayNameContainer"
pack="center">
<label/>
<label/>
<label/>
<label/>
<label/>
<label/>
<label/>
</deck>
<spacer id="weekspacer" flex="1"/>
<hbox pack="end">
<toolbarbutton id="previous-day-button"
class="miniday-nav-buttons"
tooltiptext="&onedaybackward.tooltip;"
oncommand="TodayPane.advance(parseInt(this.getAttribute('dir')));"
dir="-1"/>
<toolbarbutton id="today-button"
class="miniday-nav-buttons"
tooltiptext="&showToday.tooltip;"
oncommand="TodayPane.setDay(now());"/>
<toolbarbutton id="next-day-button"
class="miniday-nav-buttons"
tooltiptext="&onedayforward.tooltip;"
oncommand="TodayPane.advance(parseInt(this.getAttribute('dir')));"
dir="1"/>
</hbox>
</hbox>
<hbox pack="start">
<deck id ="monthNameContainer">
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
<label class="monthlabel"/>
</deck>
<spacer flex="1"/>
</hbox>
</vbox>
<toolbarbutton id="miniday-dropdown-button"
tooltiptext="&showselectedday.tooltip;"
popup="aMinimonthPopupset"
class="toolbarbutton-menubutton-dropmarker"/>
<popupset>
<popup id="aMinimonthPopupset" position="after_start">
<minimonth id="todayMinimonth" flex="1"
onchange="TodayPane.setDaywithjsDate(this.value);"/>
</popup>
</popupset>
</hbox>
</stack>
</modebox>
<vbox flex="1"
ondraggesture="nsDragAndDrop.startDrag(event, calendarCalendarButtonDNDObserver);"
ondragover="nsDragAndDrop.dragOver(event, calendarCalendarButtonDNDObserver);"
ondragdrop="nsDragAndDrop.drop(event, calendarCalendarButtonDNDObserver);">
<toolbar id="agenda-toolbar" iconsize="small">
<toolbarbutton id="calendar-new-event-button"
mode="mail"
iconsize="small"
orient="horizontal"
class="cal-toolbarbutton-1"
label="&calendar.newevent.button.label;"
tooltiptext="&calendar.newevent.button.tooltip;"
oncommand="agendaListbox.createNewEvent(event)"/>
</toolbar>
<popup id="agenda-menu" onpopupshowing="if (event.target == event.currentTarget) { agendaListbox.buildAgendaPopupMenu(this) }"/>
<vbox id="agenda-menu-box" hidden="true">
<menuitem label="&calendar.context.modifyitem.label;"
accesskey="&calendar.context.modifyitem.accesskey;"
observes="agenda_edit_event_command"/>
<menuitem label="&calendar.context.deleteitem.label;"
accesskey="&calendar.context.deleteitem.accesskey;"
observes="agenda_delete_event_command"/>
<menu id="agenda-context-menu-convert-menu"
label="&calendar.context.convertmenu.label;"
accesskey="&calendar.context.convertmenu.accesskey.calendar;">
<menupopup id="agenda-context-menu-convert-menupopup">
<menuitem id="agenda-context-menu-convert-message-menuitem"
label="&calendar.context.convertmenu.message.label;"
accesskey="&calendar.context.convertmenu.message.accesskey;"
oncommand="calendarMailButtonDNDObserver.onDropItems(agendaListbox.getSelectedItems())"/>
<menuitem id="agenda-context-menu-convert-task-menuitem"
class="event-only"
label="&calendar.context.convertmenu.task.label;"
accesskey="&calendar.context.convertmenu.task.accesskey;"
oncommand="calendarTaskButtonDNDObserver.onDropItems(agendaListbox.getSelectedItems())"/>
</menupopup>
</menu>
</vbox>
<vbox id="richlistitem-container" hidden="true">
<agenda-checkbox-richlist-item id="today-header-hidden"
title="&calendar.today.button.label;"
checked="true"
persist="checked"/>
<agenda-checkbox-richlist-item id="tomorrow-header-hidden"
title="&calendar.tomorrow.button.label;"
checked="false"
persist="checked"/>
<agenda-checkbox-richlist-item id="nextweek-header-hidden"
title="&calendar.soon.button.label;"
checked="false"
persist="checked"/>
</vbox>
<richlistbox id="agenda-listbox" flex="1" context="agenda-menu"
onblur="agendaListbox.onBlur();"
onfocus="agendaListbox.onFocus();"
onkeypress="agendaListbox.onKeyPress(event);"
ondblclick="agendaListbox.createNewEvent(event);"/>
</vbox>
</modevbox>
<splitter id="today-pane-splitter" persist="hidden"/>
<modevbox id="todo-tab-panel" flex="1" mode="mail,calendar"
broadcaster="modeBroadcaster" persist="height"
collapsedinmodes="mail,task"
broadcaster="modeBroadcaster"
persist="height collapsedinmodes"
ondraggesture="nsDragAndDrop.startDrag(event, calendarTaskButtonDNDObserver);"
ondragover="nsDragAndDrop.dragOver(event, calendarTaskButtonDNDObserver);"
ondragdrop="nsDragAndDrop.drop(event, calendarTaskButtonDNDObserver);"/>

Просмотреть файл

@ -59,7 +59,8 @@
list-style-image: url("chrome://calendar/skin/mini-day-background.png");
}
#mini-day-box {
#mini-day-box,
#today-minimonth-box {
background-color: white;
}

Просмотреть файл

@ -58,7 +58,8 @@
list-style-image: url("chrome://calendar/skin/mini-day-background.png");
}
#mini-day-box {
#mini-day-box,
#today-minimonth-box {
background-color: white;
}

Просмотреть файл

@ -56,20 +56,6 @@ function ltnAddButtonToSetString(toolbarSetString) {
* initializes TodayPane for Lightning and adds a toolbarbutton to mail-toolbar once
*/
function ltnInitTodayPane() {
// set Lightning attributes for current mode and restore last PaneView
// add a menuitem to the 'View/Layout' -menu. As the respective "Layout" menupopup
// carries no 'id' attribute it cannot be overlaid
var todayMenuItem = document.getElementById("ltnShowTodayPane");
todayMenuItem = todayMenuItem.cloneNode(false);
todayMenuItem.setAttribute("id", "ltnShowTodayPaneMailMode");
todayMenuItem.removeAttribute("mode");
var messagePaneMenu = document.getElementById("menu_MessagePaneLayout");
if (messagePaneMenu != null) {
var messagePanePopupMenu = messagePaneMenu.firstChild;
messagePanePopupMenu.appendChild(todayMenuItem);
}
// add toolbar-button to mail-toolbar
var mailToolbar = getMailBar();
var addToolbarbutton = false;

Просмотреть файл

@ -71,7 +71,7 @@ function nextMonth(dt)
var gMiniMonthLoading = false;
function ltnMinimonthPick(minimonth) {
if (gMiniMonthLoading) {
if (gMiniMonthLoading || gCurrentMode != "calendar") {
return;
}
if (document.getElementById("displayDeck").selectedPanel !=
@ -493,7 +493,7 @@ function copyPopupMenus() {
menulist.push(document.getElementById("tasksMenu"));
// define PopupMenus for calendar mode...
var excludeList = new Array("task");
var excludeList = new Array("mail", "task");
addToPopupList(menulist[0], null, calendarpopuplist, excludeList, true, true);
addToPopupList(menulist[1], null, calendarpopuplist, excludeList, true, false);
addToPopupList(menulist[2], null, calendarpopuplist, excludeList, true, true);
@ -502,7 +502,7 @@ function copyPopupMenus() {
addToPopupList(menulist[5], null, calendarpopuplist, excludeList, true, false);
// define PopupMenus for task mode...
var excludeList = new Array("calendar");
var excludeList = new Array("mail", "calendar");
addToPopupList(menulist[0], null, taskpopuplist, excludeList, true, true);
addToPopupList(menulist[1], null, taskpopuplist, excludeList, true, false);
addToPopupList(menulist[2], null, taskpopuplist, excludeList, true, true);

Просмотреть файл

@ -300,16 +300,43 @@
label="&lightning.sidebar.invitations.label;"
accesskey="&lightning.sidebar.invitations.accesskey;"
command="calendar_toggle_invitations_command"/>
<menuseparator id="before-today-pane" mode="mail,calendar,task"/>
<menuitem id="ltnShowTodayPane"
label="&calendar.context.button.label;"
accesskey="&calendar.context.button.accesskey;"
type="checkbox"
key="todaypanekey"
mode="mail,calendar,task"
command="calendar_toggle_todaypane_command"/>
<menuseparator id="before-today-pane"/>
<menu id="today-pane-menu"
label="&calendar.context.button.label;"
accesskey="&calendar.context.button.accesskey;">
<menupopup>
<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"
name="minidisplay"
value="miniday"
type="radio"
oncommand="TodayPane.displayMiniSection(1)"
label="&todaypane.showMiniday.label;"
accesskey="&todaypane.showMiniday.accesskey;"/>
<menuitem id="today-pane-displayminimonth"
name="minidisplay"
value="minimonth"
type="radio"
oncommand="TodayPane.displayMiniSection(2)"
label="&todaypane.showMinimonth.label;"
accesskey="&todaypane.showMinimonth.accesskey;"/>
<menuitem id="today-pane-displaynone"
name="minidisplay"
value="none"
type="radio"
oncommand="TodayPane.displayMiniSection(3)"
label="&todaypane.showNone.label;"
accesskey="&todaypane.showNone.accesskey;"/>
</menupopup>
</menu>
</menupopup>
<menupopup id="view_toolbars_popup">
<menuitem id="ltnCalendarToolbar"
type="checkbox"

Просмотреть файл

@ -97,8 +97,8 @@ function ltnSwitch2Mail() {
switch2task.removeAttribute("checked");
gCurrentMode = 'mail';
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
swapPopupMenus();
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
var mailToolbar = getMailBar();
var mailToolbarMenuItem = document.getElementById("menu_showMessengerToolbar");
@ -153,10 +153,9 @@ function ltnSwitch2Calendar() {
switch2calendar.setAttribute("checked", "true");
switch2task.removeAttribute("checked");
gCurrentMode = 'calendar';
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
gCurrentMode = 'calendar';
swapPopupMenus();
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
var mailToolbar = getMailBar();
mailToolbar.setAttribute("collapsed", "true");
@ -203,8 +202,8 @@ function ltnSwitch2Task() {
toggleControlDisplay("cmd_toggleCalendarToolbar", "calendar-toolbar", "calendar");
toggleControlDisplay("cmd_toggleTaskToolbar", "task-toolbar", "task");
gCurrentMode = 'task';
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
swapPopupMenus();
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
var mailToolbar = getMailBar();
var calendarToolbar = document.getElementById("calendar-toolbar");
mailToolbar.setAttribute("collapsed", "true");

Просмотреть файл

@ -24,6 +24,7 @@
- Matthew Willis <mattwillis@mac.com>
- Philipp Kewisch <mozilla@kewis.ch>
- Martin Schroeder <mschroeder@mozilla.x-home.org>
- Berend Cornelius <berend.cornelius@sun.com>
-
- 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
@ -110,3 +111,15 @@
<!-- Account Central page -->
<!ENTITY lightning.acctCentral.newCalendar.label "Create a new calendar">
<!-- today-pane-specific -->
<!ENTITY todaypane.showTodaypane.label "Show Today Pane">
<!ENTITY todaypane.showTodaypane.accesskey "o">
<!ENTITY todaypane.showMinimonth.label "Show Mini-Month">
<!ENTITY todaypane.showMinimonth.accesskey "M">
<!ENTITY todaypane.showMiniday.label "Show Mini-Day">
<!ENTITY todaypane.showMiniday.accesskey "d">
<!ENTITY todaypane.showNone.label "Show None">
<!ENTITY todaypane.showNone.accesskey "N">
<!ENTITY todaypane.showTodayPane.label "Show Today Pane">
<!ENTITY todaypane.showTodayPane.accesskey "o">