Bug 468420 - Consolidation of the navigation bar;r=philipp
This commit is contained in:
Родитель
81c444a44b
Коммит
05a86c93c3
|
@ -112,8 +112,9 @@
|
|||
<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); TodayPane.setTodayHeader()"/>
|
||||
<command id="calendar_view_next_command" oncommand="moveView(1)"/>
|
||||
<command id="calendar_view_prev_command" oncommand="moveView(-1)"/>
|
||||
<command id="calendar_view_next_command" oncommand="currentView().moveView(1)"/>
|
||||
<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())"/>
|
||||
</commandset>
|
||||
|
@ -318,4 +319,30 @@
|
|||
observes="calendar_delete_todo_command"/>
|
||||
</menupopup>
|
||||
</popupset>
|
||||
|
||||
<vbox id="calendar-view-box" context="calendar-view-context-menu">
|
||||
<calendar-navigation-buttons id="nav-control"/>
|
||||
<deck flex="1"
|
||||
id="view-deck"
|
||||
persist="selectedIndex"
|
||||
ondraggesture="nsDragAndDrop.startDrag(event, calendarViewDNDObserver);"
|
||||
ondragover="nsDragAndDrop.dragOver(event, calendarViewDNDObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, calendarViewDNDObserver);">
|
||||
<!-- Note: the "id" attributes of the decorated panes **must** follow the
|
||||
notation 'type + "-" + "view"', where "type" should refer to the
|
||||
displayed time period as described in base/public/calIDecoratedView.idl -->
|
||||
<calendar-decorated-day-view id="day-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-week-view id="week-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-multiweek-view id="multiweek-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-month-view id="month-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
</deck>
|
||||
</vbox>
|
||||
</overlay>
|
||||
|
|
|
@ -54,15 +54,15 @@
|
|||
<xul:toolbarbutton anonid="previous-view-button"
|
||||
class="view-navigation-button"
|
||||
type="prev"
|
||||
oncommand="moveView(-1)"/>
|
||||
command="calendar_view_prev_command"/>
|
||||
<xul:toolbarbutton anonid="today-view-button"
|
||||
class="today-navigation-button"
|
||||
label="&calendar.today.button.label;"
|
||||
oncommand="moveView();"/>
|
||||
command="calendar_view_today_command"/>
|
||||
<xul:toolbarbutton anonid="next-view-button"
|
||||
class="view-navigation-button"
|
||||
type="next"
|
||||
oncommand="moveView(1)"/>
|
||||
command="calendar_view_next_command"/>
|
||||
<xul:label anonid="intervalDescription"
|
||||
class="view-header"
|
||||
crop="end"
|
||||
|
@ -409,7 +409,7 @@
|
|||
var viewElement = this.viewElem;
|
||||
viewElement.tasksInView = this.mTasksInView;
|
||||
viewElement.showCompleted = this.mShowCompleted;
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "nav-control").
|
||||
document.getElementById("nav-control").
|
||||
setDateRange(this.rangeStartDate, this.rangeEndDate, aToolTipTexts, this);
|
||||
]]></body>
|
||||
</method>
|
||||
|
|
|
@ -48,13 +48,8 @@
|
|||
|
||||
<binding id="calendar-decorated-day-view"
|
||||
extends="chrome://calendar/content/calendar-decorated-multiday-base-view.xml#calendar-decorated-multiday-base-view">
|
||||
<content>
|
||||
<xul:vbox anonid="main-box" flex="1">
|
||||
<xul:calendar-navigation-buttons anonid="nav-control" selectedIndex="0"/>
|
||||
<xul:box flex="1">
|
||||
<xul:calendar-multiday-view anonid="view-element" flex="1" orient="vertical" xbl:inherits="context,item-context"/>
|
||||
</xul:box>
|
||||
</xul:vbox>
|
||||
<content flex="1" orient="vertical">
|
||||
<xul:calendar-multiday-view anonid="view-element" flex="1" orient="vertical" xbl:inherits="context,item-context"/>
|
||||
</content>
|
||||
|
||||
<implementation implements="calIDecoratedView">
|
||||
|
|
|
@ -47,13 +47,8 @@
|
|||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="calendar-decorated-month-view" extends="chrome://calendar/content/calendar-decorated-month-view.xml#calendar-decorated-month-view-parent">
|
||||
<content>
|
||||
<xul:vbox anonid="main-box" flex="1">
|
||||
<xul:calendar-navigation-buttons anonid="nav-control" selectedIndex="3"/>
|
||||
<xul:box style="overflow: auto;" flex="1">
|
||||
<xul:calendar-month-view anonid="view-element" flex="1" xbl:inherits="context,item-context"/>
|
||||
</xul:box>
|
||||
</xul:vbox>
|
||||
<content flex="1" orient="vertical">
|
||||
<xul:calendar-month-view style="overflow: auto;" anonid="view-element" flex="1" xbl:inherits="context,item-context"/>
|
||||
</content>
|
||||
|
||||
<implementation implements="calIDecoratedView">
|
||||
|
|
|
@ -48,13 +48,8 @@
|
|||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="calendar-decorated-multiweek-view" extends="chrome://calendar/content/calendar-decorated-month-view.xml#calendar-decorated-month-view-parent">
|
||||
<content>
|
||||
<xul:vbox anonid="main-box" flex="1">
|
||||
<xul:calendar-navigation-buttons anonid="nav-control" selectedIndex="2"/>
|
||||
<xul:box style="overflow: auto;" flex="1">
|
||||
<xul:calendar-month-view anonid="view-element" flex="1" xbl:inherits="context,item-context"/>
|
||||
</xul:box>
|
||||
</xul:vbox>
|
||||
<content flex="1" orient="vertical">
|
||||
<xul:calendar-month-view anonid="view-element" style="overflow: auto;" flex="1" xbl:inherits="context,item-context"/>
|
||||
</content>
|
||||
|
||||
<implementation implements="calIDecoratedView">
|
||||
|
|
|
@ -48,13 +48,8 @@
|
|||
|
||||
<binding id="calendar-decorated-week-view"
|
||||
extends="chrome://calendar/content/calendar-decorated-multiday-base-view.xml#calendar-decorated-multiday-base-view">
|
||||
<content>
|
||||
<xul:vbox anonid="main-box" flex="1">
|
||||
<xul:calendar-navigation-buttons anonid="nav-control" selectedIndex="1"/>
|
||||
<xul:box flex="1">
|
||||
<xul:calendar-multiday-view anonid="view-element" flex="1" orient="vertical" xbl:inherits="context,item-context"/>
|
||||
</xul:box>
|
||||
</xul:vbox>
|
||||
<content flex="1" orient="vertical">
|
||||
<xul:calendar-multiday-view anonid="view-element" flex="1" orient="vertical" xbl:inherits="context,item-context"/>
|
||||
</content>
|
||||
|
||||
<implementation implements="calIDecoratedView">
|
||||
|
|
|
@ -288,6 +288,7 @@ function switchToView(aViewType) {
|
|||
var command = document.getElementById(commandId);
|
||||
if (view.id == aViewType + "-view") {
|
||||
command.setAttribute("checked", "true");
|
||||
document.getElementById("nav-control").setAttribute("selectedIndex", i);
|
||||
} else {
|
||||
command.removeAttribute("checked");
|
||||
}
|
||||
|
@ -334,10 +335,6 @@ function switchToView(aViewType) {
|
|||
view.setSelectedItems(currentSelection.length, currentSelection);
|
||||
}
|
||||
|
||||
function moveView(aNumber) {
|
||||
currentView().moveView(aNumber);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the calendar view deck.
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- ***** 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 Mozilla Calendar code.
|
||||
-
|
||||
- The Initial Developer of the Original Code is
|
||||
- Berend Cornelius <berend.cornelius@sun.com>
|
||||
- Portions created by the Initial Developer are Copyright (C) 2009
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
-
|
||||
- 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 LGPL or the GPL. 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 ***** -->
|
||||
|
||||
<!DOCTYPE overlay [
|
||||
]>
|
||||
|
||||
<overlay id="calendar-views-overlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<stringbundleset id="calendar_stringbundles">
|
||||
<stringbundle id="bundle_branding" src="chrome://branding/locale/brand.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
<vbox id="calendar-view-box" context="calendar-view-context-menu">
|
||||
<calendar-navigation-buttons id="nav-control"/>
|
||||
<deck flex="1"
|
||||
id="view-deck"
|
||||
persist="selectedIndex"
|
||||
ondraggesture="nsDragAndDrop.startDrag(event, calendarViewDNDObserver);"
|
||||
ondragover="nsDragAndDrop.dragOver(event, calendarViewDNDObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, calendarViewDNDObserver);">
|
||||
<!-- Note: the "id" attributes of the decorated panes **must** follow the
|
||||
notation 'type + "-" + "view"', where "type" should refer to the
|
||||
displayed time period as described in base/public/calIDecoratedView.idl -->
|
||||
<calendar-decorated-day-view id="day-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-week-view id="week-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-multiweek-view id="multiweek-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-month-view id="month-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
</deck>
|
||||
</vbox>
|
||||
</overlay>
|
|
@ -31,6 +31,7 @@ calendar.jar:
|
|||
content/calendar/calendar-item-bindings.xml (content/calendar-item-bindings.xml)
|
||||
content/calendar/calendar-management.js (content/calendar-management.js)
|
||||
content/calendar/calendar-menus.xml (content/calendar-menus.xml)
|
||||
content/calendar/calendar-views.xul (content/calendar-views.xul)
|
||||
content/calendar/calendar-month-view.xml (content/calendar-month-view.xml)
|
||||
content/calendar/calendar-multiday-view.xml (content/calendar-multiday-view.xml)
|
||||
content/calendar/calendar-base-view.xml (content/calendar-base-view.xml)
|
||||
|
|
|
@ -161,49 +161,6 @@ function ltnSelectCalendarView(type) {
|
|||
|
||||
}
|
||||
|
||||
function toggleControlDisplay(aCommandId, aControlId) {
|
||||
var control = document.getElementById(aControlId);
|
||||
var command = document.getElementById(aCommandId);
|
||||
if (control.getAttribute("collapsedinMode") == "false") {
|
||||
if (control.hasAttribute("collapsed")) {
|
||||
control.removeAttribute("collapsed");
|
||||
command.setAttribute("checked", "true");
|
||||
return;
|
||||
}
|
||||
}
|
||||
command.setAttribute("checked", "false");
|
||||
}
|
||||
|
||||
function toggleControlinMode(aCommandId, aControlId) {
|
||||
var control = document.getElementById(aControlId);
|
||||
var command = document.getElementById(aCommandId);
|
||||
if (control.hasAttribute("collapsed")) {
|
||||
control.removeAttribute("collapsed");
|
||||
control.setAttribute("collapsedinMode", "false");
|
||||
command.setAttribute("checked","true");
|
||||
}
|
||||
else {
|
||||
control.setAttribute("collapsed", "true");
|
||||
control.setAttribute("collapsedinMode", "true");
|
||||
command.setAttribute("checked", "false");
|
||||
}
|
||||
}
|
||||
|
||||
function toggleToolbar(aCommandId, aToolbarId) {
|
||||
var toolBar = document.getElementById(aToolbarId);
|
||||
var command = document.getElementById(aCommandId);
|
||||
if (toolBar.hasAttribute("collapsed")) {
|
||||
toolBar.removeAttribute("collapsed");
|
||||
command.setAttribute("checked", "true");
|
||||
}
|
||||
else {
|
||||
toolBar.setAttribute("collapsed", "true");
|
||||
command.setAttribute("checked", "false");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Show the calendar view, also switching to calendar mode if in mail mode
|
||||
*/
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
|
||||
<?xul-overlay href="chrome://calendar/content/calendar-calendars-list.xul"?>
|
||||
<?xul-overlay href="chrome://calendar/content/calendar-common-sets.xul"?>
|
||||
<?xul-overlay href="chrome://calendar/content/calendar-views.xul"?>
|
||||
|
||||
<overlay id="ltnSidebarOverlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
@ -500,32 +501,10 @@
|
|||
</vbox>
|
||||
|
||||
<splitter id="calsidebar_splitter" collapse="before" persist="state"/>
|
||||
|
||||
|
||||
<deck id="calendarDisplayDeck" flex="1">
|
||||
<vbox id="calendar-view-box" context="calendar-view-context-menu">
|
||||
<deck flex="1"
|
||||
id="view-deck"
|
||||
persist="selectedIndex"
|
||||
ondraggesture="nsDragAndDrop.startDrag(event, calendarViewDNDObserver);"
|
||||
ondragover="nsDragAndDrop.dragOver(event, calendarViewDNDObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, calendarViewDNDObserver);">
|
||||
<!-- Note: the "id" attributes of the decorated panes **must** follow the
|
||||
notation 'type + "-" + "view"', where "type" should refer to the
|
||||
displayed time period as described in base/public/calIDecoratedView.idl -->
|
||||
<calendar-decorated-day-view id="day-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-week-view id="week-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-multiweek-view id="multiweek-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-month-view id="month-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
</deck>
|
||||
</vbox>
|
||||
<!-- vbox "calendar-view-box will be overlayed..." -->
|
||||
<vbox id="calendar-view-box"/>
|
||||
</deck>
|
||||
|
||||
<splitter id="today-splitter" collapse="after" resizebefore="closest" state="collapsed">
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
<?xul-overlay href="chrome://calendar/content/calendar-unifinder.xul"?>
|
||||
<?xul-overlay href="chrome://calendar/content/calendar-unifinder-todo.xul"?>
|
||||
<?xul-overlay href="chrome://calendar/content/calendar-common-sets.xul"?>
|
||||
<?xul-overlay href="chrome://calendar/content/calendar-views.xul"?>
|
||||
|
||||
<!-- All DTD information is stored in a separate file so that it can be shared by
|
||||
hiddenWindow.xul. -->
|
||||
|
@ -190,26 +191,8 @@
|
|||
persist="state" orient="horizontal">
|
||||
<grippy/>
|
||||
</splitter>
|
||||
|
||||
<vbox id="calendar-view-box" flex="1">
|
||||
<!-- Note: the "id" attributes of the decorated panes **must** follow the
|
||||
notation 'type + "-" + "view"', where "type" should refer to the
|
||||
displayed time period as described in base/public/calIDecoratedView.idl -->
|
||||
<deck id="view-deck" flex="1" persist="selectedIndex">
|
||||
<calendar-decorated-day-view id="day-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-week-view id="week-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-multiweek-view id="multiweek-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
<calendar-decorated-month-view id="month-view" flex="1"
|
||||
context="calendar-view-context-menu"
|
||||
item-context="calendar-item-context-menu"/>
|
||||
</deck>
|
||||
</vbox>
|
||||
<!-- vbox "calendar-view-box will be overlayed..." -->
|
||||
<vbox id="calendar-view-box" flex="1"/>
|
||||
</hbox> <!-- End: box with unifinder on left, calendar on right -->
|
||||
</vbox>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче