Bug 422640-enable View menu-items;r=philipp
git-svn-id: svn://10.0.0.236/trunk@249784 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
0e6cd00ebd
commit
cbffc213bf
@ -99,7 +99,9 @@
|
||||
<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_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_toggle_filter_command" oncommand="document.getElementById('task-filter-pane').togglePane(event)"/>
|
||||
<command id="calendar_view_next_command" oncommand="moveView(1)"/>
|
||||
<command id="calendar_view_prev_command" oncommand="moveView(-1)"/>
|
||||
|
||||
|
||||
@ -46,6 +46,8 @@
|
||||
]>
|
||||
|
||||
<?xml-stylesheet href="chrome://calendar/skin/today-pane.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://calendar/skin/widgets/calendar-widgets.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://calendar/content/widgets/calendar-widget-bindings.css" type="text/css"?>
|
||||
<?xml-stylesheet href="chrome://calendar/content/datetimepickers/minimonth.css" type="text/css"?>
|
||||
|
||||
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
@ -53,7 +55,7 @@
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/today-pane.js"/>
|
||||
<script type="application/x-javascript" src="chrome://lightning/content/agenda-listbox.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calendar-management.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calendar-dnd-listener.js"/>
|
||||
<script type="application/x-javascript" src="chrome://calendar/content/calendar-dnd-listener.js"/>
|
||||
|
||||
<script type="application/x-javascript">
|
||||
var todaylabel = "&calendar.context.button.label;";
|
||||
|
||||
@ -0,0 +1,54 @@
|
||||
/* ***** 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 Oracle Corporation
|
||||
* Portions created by the Initial Developer are Copyright (C) 2008
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* 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
|
||||
* 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 ***** */
|
||||
|
||||
treenode-checkbox {
|
||||
-moz-binding: url("chrome://calendar/content/widgets/calendar-widgets.xml#treenode-checkbox");
|
||||
}
|
||||
|
||||
modebox {
|
||||
-moz-binding: url(chrome://calendar/content/widgets/calendar-widgets.xml#modebox);
|
||||
-moz-user-focus: normal;
|
||||
}
|
||||
|
||||
modevbox {
|
||||
-moz-binding: url(chrome://calendar/content/widgets/calendar-widgets.xml#modevbox);
|
||||
-moz-user-focus: normal;
|
||||
}
|
||||
|
||||
modehbox {
|
||||
-moz-binding: url(chrome://calendar/content/widgets/calendar-widgets.xml#modehbox);
|
||||
-moz-user-focus: normal;
|
||||
}
|
||||
251
mozilla/calendar/base/content/widgets/calendar-widgets.xml
Normal file
251
mozilla/calendar/base/content/widgets/calendar-widgets.xml
Normal file
@ -0,0 +1,251 @@
|
||||
<?xml version="1.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) 2008
|
||||
- the Initial Developer. All Rights Reserved.
|
||||
-
|
||||
- Contributor(s):
|
||||
- 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
|
||||
- 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 ***** -->
|
||||
|
||||
<bindings id="modeBindings"
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<!-- this binding directly extends to a checkbox but is visualized as
|
||||
a treenode in a treecontrol-->
|
||||
<binding id="treenode-checkbox" extends="chrome://global/content/bindings/checkbox.xml#checkbox-baseline">
|
||||
<resources>
|
||||
<stylesheet src="chrome://calendar/skin/widgets/calendar-widgets.css"/>
|
||||
</resources>
|
||||
</binding>
|
||||
|
||||
<!-- this binding directly extends to a xul:box element and automatically
|
||||
sets the "orient" attribute to "vertical" thus behaving like a vbox-->
|
||||
<binding id="modevbox" extends="chrome://calendar/content/widgets/calendar-widgets.xml#modebox">
|
||||
<resources>
|
||||
<stylesheet src="chrome://calendar/skin/widgets/calendar-widgets.css"/>
|
||||
</resources>
|
||||
<implementation>
|
||||
<constructor><![CDATA[
|
||||
this.setAttribute("orient", "vertical");
|
||||
]]></constructor>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<!-- this binding directly extends to a xul:box element and automatically
|
||||
sets the "orient" attribute to "horizontal" thus behaving like a vbox-->
|
||||
<binding id="modehbox" extends="chrome://calendar/content/widgets/calendar-widgets.xml#modebox">
|
||||
<resources>
|
||||
<stylesheet src="chrome://calendar/skin/widgets/calendar-widgets.css"/>
|
||||
</resources>
|
||||
<implementation>
|
||||
<constructor><![CDATA[
|
||||
this.setAttribute("orient", "horizontal");
|
||||
]]></constructor>
|
||||
</implementation>
|
||||
</binding>
|
||||
|
||||
<!-- this binding directly extends to a xul:box element and enriches this with some functionality: It is designed
|
||||
to be displayed only 1) in given application modes (e.g "task" mode, "calendar" mode) and 2) only in relation
|
||||
to the "checked" attribute of command or a checkbox control.
|
||||
- The attribute "mode" denotes a coma-separated list of all modes that the binding should not be collapsed in,
|
||||
e.g. mode="calendar,task"
|
||||
- The attribute "broadcaster" points to the id of a broadcaster that is supposed to be notified (by the application)
|
||||
as soon as the mode changes. When this happens the modebox" will be notified and will check if it should
|
||||
collapse itself or not.
|
||||
- The attribute "refcontrol" points to a control either a "command", "checkbox" or a "treenode-checkbox" or other
|
||||
elements that support a "checked" attribute that is often used to denote whether a modebox is supposed to be
|
||||
displayed or not. If "refcontrol" is set to the id of a command you can there set the oncommend attribute like:
|
||||
"oncommand='document.getElementById('my-mode-pane').togglePane(event)'. In case it is a checkbox element or derived
|
||||
checkbox element this is done automatically by listening to the event "CheckboxChange";
|
||||
So if the current application mode is one of the modes listed in the "mode" attribute it is
|
||||
additionally verified if the xul-element denoted by "refcontrol" is checked or not. During runtime an attribute named
|
||||
"collapsedinmodes" with the collpsed modes comma-separated e.g. "mail,calendar,task. This attribute is also made
|
||||
persistent-->
|
||||
<binding id="modebox" extends="xul:box">
|
||||
<resources>
|
||||
<stylesheet src="chrome://calendar/skin/widgets/calendar-widgets.css"/>
|
||||
</resources>
|
||||
<implementation>
|
||||
<field name="mBroadcaster">null</field>;
|
||||
<field name="mModHandler">null</field>;
|
||||
<field name="mRefControl">null</field>;
|
||||
<field name="mControlHandler">null</field>;
|
||||
<constructor><![CDATA[
|
||||
if (this.hasAttribute("broadcaster")) {
|
||||
this.setAttribute("broadcaster", this.getAttribute("broadcaster"));
|
||||
}
|
||||
if (this.hasAttribute("refcontrol")) {
|
||||
this.mRefControl = document.getElementById(this.getAttribute("refcontrol"));
|
||||
if (this.mRefControl && ((this.mRefControl.localName == "treenode-checkbox") ||
|
||||
(this.mRefControl.localName == "checkbox"))){
|
||||
this.mControlHandler = {
|
||||
binding: this,
|
||||
handleEvent : function(aEvent, aHandled) {
|
||||
return this.binding.onCheckboxStateChange(aEvent, this.binding);
|
||||
}
|
||||
};
|
||||
this.mRefControl.addEventListener("CheckboxStateChange", this.mControlHandler, true);
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</constructor>
|
||||
<destructor><![CDATA[
|
||||
if (this.mBroadcaster) {
|
||||
this.mBroadcaster.removeEventListener("DOMAttrModified", this.mModHandler, true);
|
||||
}
|
||||
if (this.mRefControl) {
|
||||
this.mRefControl.removeEventListener("CheckboxStateChange", this.mControlHandler, true);
|
||||
}
|
||||
]]></destructor>
|
||||
|
||||
<property name="currentMode">
|
||||
<getter><![CDATA[
|
||||
if (this.mBroadcaster && this.mBroadcaster.hasAttribute("mode")) {
|
||||
return this.mBroadcaster.getAttribute("mode");
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
]]></getter>
|
||||
</property>
|
||||
|
||||
<method name="setVisible">
|
||||
<parameter name="aVisible"/>
|
||||
<parameter name="aCheckModeCollapsed"/>
|
||||
<body><![CDATA[
|
||||
var collapsedModes = [];
|
||||
var modeIndex = -1;
|
||||
var display = aVisible;
|
||||
var collapsedInMode = false;
|
||||
if (this.hasAttribute("collapsedinmodes")) {
|
||||
var collapsedModes = this.getAttribute("collapsedinmodes").split(",");
|
||||
var modeIndex = collapsedModes.indexOf(this.currentMode);
|
||||
collapsedInMode = (modeIndex > -1);
|
||||
}
|
||||
if ((aVisible === true) && (aCheckModeCollapsed)){
|
||||
display = (aVisible === true) && (!collapsedInMode);
|
||||
}
|
||||
setBooleanAttribute(this, "collapsed", (!display));
|
||||
if (aCheckModeCollapsed == null) {
|
||||
if (!display) {
|
||||
if (modeIndex == -1) {
|
||||
collapsedModes.push(this.currentMode);
|
||||
}
|
||||
} else {
|
||||
if (modeIndex > -1) {
|
||||
collapsedModes.splice(modeIndex, 1);
|
||||
}
|
||||
}
|
||||
this.setAttribute("collapsedinmodes", collapsedModes.join(","));
|
||||
var id = this.getAttribute("id");
|
||||
if (id) {
|
||||
document.persist(id, "collapsedinmodes");
|
||||
}
|
||||
} else if (aCheckModeCollapsed === true) {
|
||||
if (this.hasAttribute("refcontrol")) {
|
||||
var command = document.getElementById(this.getAttribute("refcontrol"))
|
||||
if (command) {
|
||||
command.setAttribute("checked", display);
|
||||
}
|
||||
}
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="_isVisibleInCurrentMode">
|
||||
<parameter name="aMode"/>
|
||||
<body><![CDATA[
|
||||
var lMode = aMode || currentMode;
|
||||
var display = true;
|
||||
var lModes = new Array();
|
||||
if (this.hasAttribute("mode")) {
|
||||
var modeString = this.getAttribute("mode");
|
||||
lModes = modeString.split(",");
|
||||
}
|
||||
if (lModes && lModes.length > 0) {
|
||||
display = lModes.indexOf(lMode) > -1;
|
||||
}
|
||||
return display;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="onModeModified">
|
||||
<parameter name="aEvent"/>
|
||||
<parameter name="aBinding"/>
|
||||
<body><![CDATA[
|
||||
if (aEvent.attrName == "mode") {
|
||||
var display = aBinding._isVisibleInCurrentMode(aEvent.newValue);
|
||||
aBinding.setVisible(display, true);
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="togglePane">
|
||||
<parameter name="aEvent"/>
|
||||
<body><![CDATA[
|
||||
var command = aEvent.target;
|
||||
var newValue = (command.getAttribute("checked") == "true" ? "false" : "true");
|
||||
command.setAttribute("checked", newValue);
|
||||
this.setVisible(newValue == "true");
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
<method name="onCheckboxStateChange">
|
||||
<parameter name="aEvent"/>
|
||||
<parameter name="aBinding"/>
|
||||
<body><![CDATA[
|
||||
var newValue = aEvent.target.checked;
|
||||
this.setVisible(newValue);
|
||||
]]></body>
|
||||
</method>
|
||||
<method name="setAttribute">
|
||||
<parameter name="aAttr"/>
|
||||
<parameter name="aVal"/>
|
||||
<body><![CDATA[
|
||||
if (aAttr == "broadcaster") {
|
||||
this.mBroadcaster = document.getElementById(aVal);
|
||||
if (this.mBroadcaster) {
|
||||
this.mModHandler = {
|
||||
binding: this,
|
||||
handleEvent : function(aEvent, aHandled) {
|
||||
return this.binding.onModeModified(aEvent, this.binding);
|
||||
}
|
||||
};
|
||||
this.mBroadcaster.addEventListener("DOMAttrModified", this.mModHandler, true);
|
||||
}
|
||||
}
|
||||
var ret = XULElement.prototype.setAttribute.call(this, aAttr, aVal);
|
||||
]]></body>
|
||||
</method>
|
||||
</implementation>
|
||||
</binding>
|
||||
</bindings>
|
||||
@ -63,6 +63,8 @@ calendar.jar:
|
||||
content/calendar/import-export.js (content/import-export.js)
|
||||
* content/calendar/migration.js (content/migration.js)
|
||||
content/calendar/migration.xul (content/migration.xul)
|
||||
content/calendar/widgets/calendar-widgets.xml (content/widgets/calendar-widgets.xml)
|
||||
content/calendar/widgets/calendar-widget-bindings.css (content/widgets/calendar-widget-bindings.css)
|
||||
content/calendar/preferences/alarms.xul (content/preferences/alarms.xul)
|
||||
content/calendar/preferences/alarms.js (content/preferences/alarms.js)
|
||||
content/calendar/preferences/categories.xul (content/preferences/categories.xul)
|
||||
@ -100,6 +102,7 @@ calendar.jar:
|
||||
#expand skin/classic/calendar/calendar-alarm-dialog.css (themes/__THEME__/calendar-alarm-dialog.css)
|
||||
#expand skin/classic/calendar/calendar-toolbar.css (themes/__THEME__/calendar-toolbar.css)
|
||||
#expand skin/classic/calendar/today-pane.css (themes/__THEME__/today-pane.css)
|
||||
#expand skin/classic/calendar/widgets/calendar-widgets.css (themes/__THEME__/widgets/calendar-widgets.css)
|
||||
#expand skin/classic/calendar/calendar-event-dialog.css (themes/__THEME__/calendar-event-dialog.css)
|
||||
#expand skin/classic/calendar/calendar-unifinder.css (themes/__THEME__/calendar-unifinder.css)
|
||||
#expand skin/classic/calendar/calendar-views.css (themes/__THEME__/calendar-views.css)
|
||||
|
||||
@ -208,11 +208,6 @@ agenda-allday-richlist-item {
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.agenda-checkbox {
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.agenda-container-box[selected="true"],
|
||||
.agenda-allday-container-box[selected="true"],
|
||||
.agenda-checkbox[selected="true"],
|
||||
@ -263,40 +258,4 @@ agenda-allday-richlist-item {
|
||||
margin-left: 4px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
agenda-checkbox {
|
||||
-moz-binding: url("chrome://lightning/content/agenda-listbox.xml#agenda-checkbox");
|
||||
}
|
||||
|
||||
agenda-checkbox {
|
||||
-moz-box-align: center;
|
||||
padding: 4px 2px 4px 4px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px dotted #c0c0c0;
|
||||
}
|
||||
|
||||
.checkbox-label-box {
|
||||
-moz-margin-start: 4px;
|
||||
}
|
||||
|
||||
.checkbox-icon {
|
||||
-moz-margin-end: 2px;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
agenda-checkbox > .checkbox-label-center-box > .checkbox-label-box > .checkbox-label {
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid -moz-Dialog;
|
||||
}
|
||||
|
||||
agenda-checkbox[checked="true"] > .checkbox-check {
|
||||
-moz-appearance: treetwistyopen;
|
||||
}
|
||||
|
||||
agenda-checkbox > .checkbox-check {
|
||||
-moz-appearance: treetwisty;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
/* ***** 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 Oracle Corporation
|
||||
* Portions created by the Initial Developer are Copyright (C) 2008
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* 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
|
||||
* 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 ***** */
|
||||
|
||||
|
||||
treenode-checkbox {
|
||||
-moz-box-align: center;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
-moz-padding-start: 4px;
|
||||
-moz-padding-end: 4px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px dotted #c0c0c0;
|
||||
}
|
||||
|
||||
.checkbox-label-box {
|
||||
-moz-margin-start: 4px;
|
||||
}
|
||||
|
||||
.checkbox-icon {
|
||||
-moz-margin-end: 2px;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
treenode-checkbox > .checkbox-label-center-box > .checkbox-label-box > .checkbox-label {
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid -moz-Dialog;
|
||||
}
|
||||
|
||||
treenode-checkbox[checked="true"] > .checkbox-check {
|
||||
-moz-appearance: treetwistyopen;
|
||||
}
|
||||
|
||||
treenode-checkbox > .checkbox-check {
|
||||
-moz-appearance: treetwisty;
|
||||
}
|
||||
|
||||
.treenode-checkbox {
|
||||
-moz-margin-start: 4px;
|
||||
-moz-margin-end: 4px;
|
||||
}
|
||||
@ -211,10 +211,6 @@ agenda-allday-richlist-item {
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.agenda-checkbox {
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.agenda-container-box[selected="true"],
|
||||
.agenda-allday-container-box[selected="true"],
|
||||
@ -266,45 +262,4 @@ agenda-allday-richlist-item {
|
||||
margin-left: 4px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
agenda-checkbox {
|
||||
-moz-binding: url("chrome://lightning/content/agenda-listbox.xml#agenda-checkbox");
|
||||
}
|
||||
|
||||
agenda-checkbox {
|
||||
-moz-box-align: center;
|
||||
padding: 4px 2px 4px 4px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px dotted #c0c0c0;
|
||||
}
|
||||
|
||||
.checkbox-label-box {
|
||||
-moz-margin-start: 4px;
|
||||
}
|
||||
|
||||
.checkbox-icon {
|
||||
-moz-margin-end: 2px;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
agenda-checkbox > .checkbox-label-center-box > .checkbox-label-box > .checkbox-label {
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid -moz-Dialog;
|
||||
}
|
||||
|
||||
agenda-checkbox[checked="true"] > .checkbox-check {
|
||||
background-image: url("chrome://global/skin/tree/twisty-open.png");
|
||||
}
|
||||
|
||||
agenda-checkbox > .checkbox-check {
|
||||
-moz-appearance: none;
|
||||
-moz-box-align: center;
|
||||
border: none;
|
||||
width: 9px; /* The image's width is 9 pixels */
|
||||
height: 9px;
|
||||
background-image: url("chrome://global/skin/tree/twisty-clsd.png");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,81 @@
|
||||
/* ***** 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 Oracle Corporation
|
||||
* Portions created by the Initial Developer are Copyright (C) 2008
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* 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
|
||||
* 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 ***** */
|
||||
|
||||
|
||||
treenode-checkbox {
|
||||
-moz-box-align: center;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
-moz-padding-start: 4px;
|
||||
-moz-padding-end: 4px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px dotted #c0c0c0;
|
||||
}
|
||||
|
||||
.checkbox-label-box {
|
||||
-moz-margin-start: 4px;
|
||||
}
|
||||
|
||||
.checkbox-icon {
|
||||
-moz-margin-end: 2px;
|
||||
}
|
||||
|
||||
.checkbox-label {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
treenode-checkbox > .checkbox-label-center-box > .checkbox-label-box > .checkbox-label {
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid -moz-Dialog;
|
||||
}
|
||||
|
||||
treenode-checkbox[checked="true"] > .checkbox-check {
|
||||
background-image: url("chrome://global/skin/tree/twisty-open.png");
|
||||
}
|
||||
|
||||
treenode-checkbox > .checkbox-check {
|
||||
-moz-appearance: none;
|
||||
-moz-box-align: center;
|
||||
border: none;
|
||||
width: 9px; /* The image's width is 9 pixels */
|
||||
height: 9px;
|
||||
background-image: url("chrome://global/skin/tree/twisty-clsd.png");
|
||||
}
|
||||
|
||||
.treenode-checkbox {
|
||||
-moz-margin-start: 4px;
|
||||
-moz-margin-end: 4px;
|
||||
}
|
||||
@ -42,35 +42,13 @@
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="agenda-checkbox" extends="chrome://global/content/bindings/checkbox.xml#checkbox-baseline">
|
||||
<resources>
|
||||
<stylesheet src="chrome://calendar/skin/today-pane.css"/>
|
||||
</resources>
|
||||
<handlers>
|
||||
<handler event="CheckboxStateChange">
|
||||
<![CDATA[
|
||||
// it would be a far better approach to make use of the <children>
|
||||
// tag in this binding instead of walking the outside hierarchy
|
||||
// and relying on custom attributes, but i don't want to introduce
|
||||
// a new binding on the one hand and also don't want to be too
|
||||
// invasive on the other hand.
|
||||
var target = event.target.nextSibling;
|
||||
if (target && target.hasAttribute("collapsable")) {
|
||||
if (event.target.checked) {
|
||||
target.removeAttribute("collapsed");
|
||||
} else {
|
||||
target.setAttribute("collapsed", "true");
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
</binding>
|
||||
|
||||
<binding id="agenda-checkbox-richlist-item"
|
||||
extends="chrome://global/content/bindings/richlistbox.xml#richlistitem">
|
||||
<resources>
|
||||
<stylesheet src="chrome://calendar/skin/widgets/calendar-widgets.css"/>
|
||||
</resources>
|
||||
<content>
|
||||
<xul:agenda-checkbox class="agenda-checkbox" anonid="agenda-checkbox-widget"
|
||||
<xul:treenode-checkbox class="agenda-checkbox" anonid="agenda-checkbox-widget"
|
||||
flex="1"
|
||||
xbl:inherits="selected,label,hidden,disabled"/>
|
||||
</content>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
-
|
||||
- ***** END LICENSE BLOCK ***** -->
|
||||
|
||||
<!DOCTYPE overlay
|
||||
<!DOCTYPE overlay
|
||||
[
|
||||
<!ENTITY % dtd1 SYSTEM "chrome://lightning/locale/lightning.dtd" > %dtd1;
|
||||
<!ENTITY % dtd2 SYSTEM "chrome://calendar/locale/menuOverlay.dtd" > %dtd2;
|
||||
@ -70,8 +70,8 @@
|
||||
<overlay id="ltnSidebarOverlay"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<!-- All JS files that messenger-overlay-sidebar.xul wishes to include *must* go into the
|
||||
calendar-scripts.inc file (all scripts shared with Sunbird) or lightning-scripts.inc
|
||||
<!-- All JS files that messenger-overlay-sidebar.xul wishes to include *must* go into the
|
||||
calendar-scripts.inc file (all scripts shared with Sunbird) or lightning-scripts.inc
|
||||
file (scripts relevant for Lightning-only). -->
|
||||
#include ../../base/content/calendar-scripts.inc
|
||||
#include lightning-scripts.inc
|
||||
@ -135,9 +135,9 @@
|
||||
observes="calendar_new_todo_command"
|
||||
position="3"/>
|
||||
<menuseparator id="afterltnNewTask" position="4"/>
|
||||
<menuseparator id="beforenewAccountMenuItem"
|
||||
<menuseparator id="beforenewAccountMenuItem"
|
||||
mode="mail"
|
||||
insertbefore="newAccountMenuItem"/>
|
||||
insertbefore="newAccountMenuItem"/>
|
||||
<menuitem id="ltnNewCalendar" label="&lightning.menupopup.new.calendar.label;"
|
||||
command="calendar_new_calendar_command"
|
||||
observes="calendar_new_calendar_command"
|
||||
@ -242,22 +242,25 @@
|
||||
mode="calendar"
|
||||
key="month-view-key"
|
||||
observes="calendar_month-view_command"/>
|
||||
<menuseparator id="before-task-View-Section" mode="task"/>
|
||||
<menuseparator id="before-task-View-Section" mode="calendar,task"/>
|
||||
<menuitem id="tasks-view-minimonth"
|
||||
disabled="true"
|
||||
mode="task"
|
||||
type="checkbox"
|
||||
mode="calendar,task"
|
||||
label="&calendar.tasks.view.minimonth.label;"
|
||||
accesskey="&calendar.tasks.view.minimonth.accesskey;"/>
|
||||
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"
|
||||
disabled="true"
|
||||
mode="task"
|
||||
type="checkbox"
|
||||
mode="calendar,task"
|
||||
label="&calendar.tasks.view.calendarlist.label;"
|
||||
accesskey="&calendar.tasks.view.calendarlist.accesskey;"/>
|
||||
<menuitem id="tasks-view-sorttasks"
|
||||
disabled="true"
|
||||
mode="task"
|
||||
label="&calendar.tasks.view.sorttasks.label;"
|
||||
accesskey="&calendar.tasks.view.sorttasks.accesskey;"/>
|
||||
accesskey="&calendar.tasks.view.calendarlist.accesskey;"
|
||||
command="calendar_toggle_calendarlist_command"/>
|
||||
</menupopup>
|
||||
<menupopup id="view_toolbars_popup">
|
||||
<menuitem id="ltnCalendarToolbar"
|
||||
@ -289,7 +292,7 @@
|
||||
|
||||
<broadcasterset id="calendar_broadcasters">
|
||||
<broadcaster id="is_editable" hidden="false"/>
|
||||
<broadcaster id="modeBroadcaster" checked="true"/>
|
||||
<broadcaster id="modeBroadcaster" mode="mail"/>
|
||||
</broadcasterset>
|
||||
|
||||
<!-- Be sure to keep these sets, since they will be overlayed by
|
||||
@ -350,10 +353,10 @@
|
||||
accesskey="&lightning.context.newevent.accesskey;"/>
|
||||
</popup>
|
||||
<popup id="calendar-item-context-menu" onpopupshowing="return true;">
|
||||
<menuitem label="&calendar.context.modifyitem.label;"
|
||||
accesskey="&calendar.context.modifyitem.accesskey;"
|
||||
<menuitem label="&calendar.context.modifyitem.label;"
|
||||
accesskey="&calendar.context.modifyitem.accesskey;"
|
||||
observes="lightning_modify_item_command"/>
|
||||
<menuitem label="&calendar.context.deleteitem.label;"
|
||||
<menuitem label="&calendar.context.deleteitem.label;"
|
||||
accesskey="&calendar.context.deleteitem.accesskey;"
|
||||
observes="lightning_delete_item_command"/>
|
||||
</popup>
|
||||
@ -391,7 +394,7 @@
|
||||
accesskey="&addressBookCmd.accesskey;"
|
||||
key="key_addressbook"
|
||||
oncommand="toAddressBook();"/>
|
||||
</menupopup>
|
||||
</menupopup>
|
||||
<menupopup id="calendarCalendarPopupMenu">
|
||||
<menuitem id="ltnNewEvent2" label="&event.new.event;"
|
||||
accesskey="&event.new.event.accesskey;"
|
||||
@ -433,7 +436,7 @@
|
||||
<tooltip id="itemTooltip" noautohide="true"/>
|
||||
|
||||
</window>
|
||||
|
||||
|
||||
#ifdef MOZILLA_1_8_BRANCH
|
||||
<hbox id="mailContent" flex="1">
|
||||
#else
|
||||
@ -451,43 +454,52 @@
|
||||
ondraggesture="nsDragAndDrop.startDrag(event, calendarViewDNDObserver);"
|
||||
ondragover="nsDragAndDrop.dragOver(event, calendarViewDNDObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, calendarViewDNDObserver);">
|
||||
<hbox id="ltnMinimonthBox">
|
||||
<spacer flex="1"/>
|
||||
<minimonth id="ltnMinimonth" onchange="ltnMinimonthPick(this);" flex="2"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
<hbox id="ltnDateTextPickerBox">
|
||||
<spacer flex="1"/>
|
||||
<datepicker id="ltnDateTextPicker" onchange="ltnMinimonthPick(this)"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
<modevbox id="minimonth-pane" mode="calendar,task" broadcaster="modeBroadcaster" refcontrol="calendar_toggle_minimonthpane_command">
|
||||
<hbox id="ltnMinimonthBox">
|
||||
<spacer flex="1"/>
|
||||
<minimonth id="ltnMinimonth" onchange="ltnMinimonthPick(this);" flex="2"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
<hbox id="ltnDateTextPickerBox">
|
||||
<spacer flex="1"/>
|
||||
<datepicker id="ltnDateTextPicker" onchange="ltnMinimonthPick(this)"/>
|
||||
<spacer flex="1"/>
|
||||
</hbox>
|
||||
</modevbox>
|
||||
<separator/>
|
||||
<vbox id="calendar-panel" flex="1">
|
||||
<agenda-checkbox id="task-tree-filter-header"
|
||||
checked="true"
|
||||
persist="checked"
|
||||
class="agenda-checkbox"
|
||||
label="&calendar.task.filter.title.label;"/>
|
||||
<radiogroup id="task-tree-filter"
|
||||
collapsable="true"
|
||||
persist="value,collapsed">
|
||||
<radio label="&calendar.task.filter.all.label;" value="all" onclick="taskViewUpdateFilter(event)"/>
|
||||
<radio label="&calendar.task.filter.today.label;" value="today" onclick="taskViewUpdateFilter(event)"/>
|
||||
<radio label="&calendar.task.filter.next7days.label;" value="next7days" onclick="taskViewUpdateFilter(event)"/>
|
||||
<radio label="&calendar.task.filter.notstarted.label;" value="notstarted" onclick="taskViewUpdateFilter(event)"/>
|
||||
<radio label="&calendar.task.filter.overdue.label;" value="overdue" onclick="taskViewUpdateFilter(event)"/>
|
||||
<radio label="&calendar.task.filter.completed.label;" value="completed" onclick="taskViewUpdateFilter(event)"/>
|
||||
</radiogroup>
|
||||
<agenda-checkbox id="calendar-list-header"
|
||||
checked="true"
|
||||
persist="checked"
|
||||
class="agenda-checkbox"
|
||||
label="&calendar.list.header.label;"/>
|
||||
<!-- This will be overlayed by calendar-calendars-list.xul -->
|
||||
<tree id="calendar-list-tree"
|
||||
flex="1"
|
||||
collapsable="true"
|
||||
persist="collapsed"/>
|
||||
<modevbox id="task-filter-pane" mode="task" broadcaster="modeBroadcaster" refcontrol="calendar_toggle_filter_command">
|
||||
<treenode-checkbox id="task-tree-filter-header"
|
||||
checked="true"
|
||||
persist="checked"
|
||||
class="treenode-checkbox"
|
||||
label="&calendar.task.filter.title.label;"/>
|
||||
<modevbox id="task-filtertree-pane" flex="1" mode="task" broadcaster="modeBroadcaster" refcontrol="task-tree-filter-header">
|
||||
<radiogroup id="task-tree-filter"
|
||||
persist="value">
|
||||
<radio label="&calendar.task.filter.all.label;" value="all" onclick="taskViewUpdateFilter(event)"/>
|
||||
<radio label="&calendar.task.filter.today.label;" value="today" onclick="taskViewUpdateFilter(event)"/>
|
||||
<radio label="&calendar.task.filter.next7days.label;" value="next7days" onclick="taskViewUpdateFilter(event)"/>
|
||||
<radio label="&calendar.task.filter.notstarted.label;" value="notstarted" onclick="taskViewUpdateFilter(event)"/>
|
||||
<radio label="&calendar.task.filter.overdue.label;" value="overdue" onclick="taskViewUpdateFilter(event)"/>
|
||||
<radio label="&calendar.task.filter.completed.label;" value="completed" onclick="taskViewUpdateFilter(event)"/>
|
||||
</radiogroup>
|
||||
</modevbox>
|
||||
</modevbox>
|
||||
<modevbox id="calendar-list-pane" flex="1" mode="calendar,task" broadcaster="modeBroadcaster"
|
||||
refcontrol="calendar_toggle_calendarlist_command">
|
||||
<treenode-checkbox id="calendar-list-header"
|
||||
checked="true"
|
||||
persist="checked"
|
||||
class="treenode-checkbox"
|
||||
label="&calendar.list.header.label;"/>
|
||||
<modevbox id="calendar-listtree-pane" flex="1" mode="calendar,task" broadcaster="modeBroadcaster"
|
||||
refcontrol="calendar-list-header">
|
||||
<!-- This will be overlayed by calendar-calendars-list.xul -->
|
||||
<tree id="calendar-list-tree"
|
||||
flex="1"/>
|
||||
</modevbox>
|
||||
</modevbox>
|
||||
</vbox>
|
||||
<label id="invitations"
|
||||
class="text-link calendar-invitations-sidebar-label"
|
||||
@ -506,7 +518,7 @@
|
||||
<toolbox id="mode-toolbox" location="bottom" mode="full">
|
||||
<toolbarpalette id="mode-toolbox-palette">
|
||||
<toolbarbutton class="toolbarbutton-2"
|
||||
mode="mode"
|
||||
mode="mode"
|
||||
id="mail-switch-button"
|
||||
label="&lightning.toolbar.mail.label;"
|
||||
command="switch2mail"
|
||||
@ -514,7 +526,7 @@
|
||||
ondragover="nsDragAndDrop.dragOver(event, calendarMailButtonDNDObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, calendarMailButtonDNDObserver);"/>
|
||||
<toolbarbutton class="toolbarbutton-2"
|
||||
mode="mode"
|
||||
mode="mode"
|
||||
id="calendar-switch-button"
|
||||
label="&lightning.toolbar.calendar.label;"
|
||||
command="switch2calendar"
|
||||
@ -522,7 +534,7 @@
|
||||
ondragover="nsDragAndDrop.dragOver(event, calendarCalendarButtonDNDObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, calendarCalendarButtonDNDObserver);"/>
|
||||
<toolbarbutton class="toolbarbutton-2"
|
||||
mode="mode"
|
||||
mode="mode"
|
||||
id="task-switch-button"
|
||||
label="&lightning.toolbar.task.label;"
|
||||
command="switch2task"
|
||||
@ -538,7 +550,7 @@
|
||||
persist="collapsed"/>
|
||||
<toolbarset id="custom-toolbars"/>
|
||||
</toolbox>
|
||||
|
||||
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
|
||||
@ -98,6 +98,7 @@ function ltnSwitch2Mail() {
|
||||
switch2task.removeAttribute("checked");
|
||||
|
||||
gCurrentMode = 'mail';
|
||||
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
|
||||
swapPopupMenus();
|
||||
|
||||
var mailToolbar = getMailBar();
|
||||
@ -111,7 +112,7 @@ function ltnSwitch2Mail() {
|
||||
|
||||
var calendarToolbar = document.getElementById("task-toolbar");
|
||||
calendarToolbar.setAttribute("collapsed", "true");
|
||||
|
||||
|
||||
// the content panel should display the folder tree
|
||||
var contentDeck = document.getElementById("contentPanel");
|
||||
contentDeck.selectedPanel = document.getElementById("folderPaneBox");
|
||||
@ -135,7 +136,6 @@ function ltnSwitch2Mail() {
|
||||
// Disable the rotate view menuitem
|
||||
document.getElementById("calendar_toggle_orientation_command")
|
||||
.setAttribute("disabled", "true");
|
||||
|
||||
window.setCursor("auto");
|
||||
}
|
||||
}
|
||||
@ -155,6 +155,8 @@ function ltnSwitch2Calendar() {
|
||||
switch2task.removeAttribute("checked");
|
||||
|
||||
gCurrentMode = 'calendar';
|
||||
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
|
||||
|
||||
swapPopupMenus();
|
||||
|
||||
var mailToolbar = getMailBar();
|
||||
@ -182,12 +184,6 @@ function ltnSwitch2Calendar() {
|
||||
document.commandDispatcher.updateCommands('mail-toolbar');
|
||||
document.commandDispatcher.updateCommands('calendar_commands');
|
||||
|
||||
// always hide the task filter option
|
||||
document.getElementById("task-tree-filter-header")
|
||||
.setAttribute("collapsed", "true");
|
||||
document.getElementById("task-tree-filter")
|
||||
.setAttribute("collapsed", "true");
|
||||
|
||||
window.setCursor("auto");
|
||||
}
|
||||
}
|
||||
@ -208,6 +204,7 @@ function ltnSwitch2Task() {
|
||||
toggleControlDisplay("cmd_toggleCalendarToolbar", "calendar-toolbar", "calendar");
|
||||
toggleControlDisplay("cmd_toggleTaskToolbar", "task-toolbar", "task");
|
||||
gCurrentMode = 'task';
|
||||
document.getElementById("modeBroadcaster").setAttribute("mode", gCurrentMode);
|
||||
swapPopupMenus();
|
||||
var mailToolbar = getMailBar();
|
||||
var calendarToolbar = document.getElementById("calendar-toolbar");
|
||||
@ -227,16 +224,6 @@ function ltnSwitch2Task() {
|
||||
document.commandDispatcher.updateCommands('mail-toolbar');
|
||||
document.commandDispatcher.updateCommands('calendar_commands');
|
||||
|
||||
// always show the task filter option
|
||||
var filterHeader = document.getElementById("task-tree-filter-header");
|
||||
filterHeader.removeAttribute("collapsed");
|
||||
var filter = document.getElementById("task-tree-filter");
|
||||
if (filterHeader.getAttribute("checked") != "true") {
|
||||
filter.setAttribute("collapsed", "true");
|
||||
} else {
|
||||
filter.removeAttribute("collapsed");
|
||||
}
|
||||
|
||||
window.setCursor("auto");
|
||||
}
|
||||
}
|
||||
@ -284,7 +271,7 @@ function CustomizeApplicationToolbar(id) {
|
||||
modeName = null;
|
||||
}
|
||||
|
||||
var customizePopup = document.getElementById("CustomizeMailToolbar");
|
||||
var customizePopup = document.getElementById("CustomizeMailToolbar");
|
||||
customizePopup.setAttribute("disabled", "true");
|
||||
|
||||
var wintype = document.documentElement.getAttribute("windowtype");
|
||||
@ -296,12 +283,12 @@ function CustomizeApplicationToolbar(id) {
|
||||
// function will be called. the argument will "mode", "mail",
|
||||
// "calendar" or "task".
|
||||
var onModeSwitch = function switchHandler(aMode) {
|
||||
|
||||
|
||||
// assume that we're switching to the mode toolbar
|
||||
var toolbox = 'mode-toolbox';
|
||||
|
||||
// check which toolbar is to be customized next
|
||||
// and possibly switch the the appropriate mode.
|
||||
// and possibly switch the the appropriate mode.
|
||||
if(aMode == 'mail') {
|
||||
ltnSwitch2Mail();
|
||||
toolbox = 'mail-toolbox';
|
||||
@ -320,10 +307,10 @@ function CustomizeApplicationToolbar(id) {
|
||||
EnableDisableHierarchy(mailbar, isMode);
|
||||
EnableDisableHierarchy(calendarbar, isMode);
|
||||
EnableDisableHierarchy(taskbar, isMode);
|
||||
|
||||
|
||||
// remember the current toolbox
|
||||
gCustomizeId = toolbox;
|
||||
|
||||
|
||||
// return this appropriate toolbox element
|
||||
return document.getElementById(toolbox);
|
||||
};
|
||||
@ -349,7 +336,7 @@ function ModeToolboxCustomizeDone(aToolboxChanged) {
|
||||
// or not we're actually customizing the mode toolbar or
|
||||
// any other toolbar.
|
||||
var isModeToolbox = (gCustomizeId == 'mode-toolbox');
|
||||
|
||||
|
||||
// enable elements on the toolbars
|
||||
if (isModeToolbox) {
|
||||
EnableDisableHierarchy(document.getElementById('mail-menubar'), false);
|
||||
@ -360,10 +347,10 @@ function ModeToolboxCustomizeDone(aToolboxChanged) {
|
||||
|
||||
// Unconditionally enable the mode toolbar
|
||||
EnableHierarchy(document.getElementById('mode-toolbar'));
|
||||
|
||||
|
||||
// Update global UI elements that may have been added or removed
|
||||
MailToolboxCustomizeDone(aToolboxChanged);
|
||||
|
||||
|
||||
// make sure our toolbar buttons have the correct enabled state restored to them...
|
||||
document.commandDispatcher.updateCommands('calendar_commands');
|
||||
}
|
||||
@ -379,10 +366,10 @@ function ModeToolboxCustomizeDone(aToolboxChanged) {
|
||||
function EnableDisableHierarchy(item, disable) {
|
||||
// iterate all nodes on this particular level
|
||||
for (var i = 0; i < item.childNodes.length; ++i) {
|
||||
|
||||
|
||||
// retrieve the next node that needs to be processed
|
||||
var child = item.childNodes[i];
|
||||
|
||||
|
||||
// disable this node if flag indicates this case, enable otherwise
|
||||
if (disable) {
|
||||
|
||||
@ -393,9 +380,9 @@ function EnableDisableHierarchy(item, disable) {
|
||||
child.setAttribute("itemdisabled", "true");
|
||||
}
|
||||
child.setAttribute("disabled","true");
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
// restore the previous state, which means either enable
|
||||
// the node or keep it disabled but remove the
|
||||
// 'itemdisabled' attribute.
|
||||
@ -424,10 +411,10 @@ function EnableDisableHierarchy(item, disable) {
|
||||
function EnableHierarchy(item) {
|
||||
// iterate all nodes on this particular level
|
||||
for (var i = 0; i < item.childNodes.length; ++i) {
|
||||
|
||||
|
||||
// retrieve the next node that needs to be processed
|
||||
var child = item.childNodes[i];
|
||||
|
||||
|
||||
// always enable this node and remove the
|
||||
// 'itemdisabled' attribute.
|
||||
if (child.hasAttribute("itemdisabled")) {
|
||||
|
||||
@ -321,8 +321,8 @@
|
||||
<!ENTITY calendar.tasks.view.calendarlist.label "Calendar List">
|
||||
<!ENTITY calendar.tasks.view.calendarlist.accesskey "L">
|
||||
|
||||
<!ENTITY calendar.tasks.view.sorttasks.label "Sort Tasks">
|
||||
<!ENTITY calendar.tasks.view.sorttasks.accesskey "S">
|
||||
<!ENTITY calendar.tasks.view.filtertasks.label "Filter Tasks">
|
||||
<!ENTITY calendar.tasks.view.filtertasks.accesskey "F">
|
||||
|
||||
<!-- Calendar Alarm Dialog -->
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user