summaryrefslogtreecommitdiffstats
path: root/comm/suite/mailnews/components/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'comm/suite/mailnews/components/calendar')
-rw-r--r--comm/suite/mailnews/components/calendar/content/suite-overlay-addons.xhtml39
-rw-r--r--comm/suite/mailnews/components/calendar/content/suite-overlay-preferences.xhtml66
-rw-r--r--comm/suite/mailnews/components/calendar/content/suite-overlay-sidebar.js47
-rw-r--r--comm/suite/mailnews/components/calendar/content/suite-overlay-sidebar.xhtml39
4 files changed, 191 insertions, 0 deletions
diff --git a/comm/suite/mailnews/components/calendar/content/suite-overlay-addons.xhtml b/comm/suite/mailnews/components/calendar/content/suite-overlay-addons.xhtml
new file mode 100644
index 0000000000..c1ccec4917
--- /dev/null
+++ b/comm/suite/mailnews/components/calendar/content/suite-overlay-addons.xhtml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ - You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<overlay id="suiteAddonsOverlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
+
+ <script><![CDATA[
+ var lightningPrefs = {
+ guid: "{e2fda1a4-762b-4020-b5ad-a41df1933103}",
+ handleEvent: function(aEvent) {
+ var item = gListView.getListItemForID(this.guid);
+ if (!item)
+ return;
+
+ item.showPreferences = this.showPreferences;
+ },
+ showPreferences: function() {
+ var win = Services.wm.getMostRecentWindow("mozilla:preferences");
+ if (win) {
+ win.focus();
+ var doc = win.document;
+ var pane = doc.getElementById("paneLightning");
+ doc.querySelector("dialog").syncTreeWithPane(pane, true);
+ } else {
+ openDialog("chrome://communicator/content/pref/preferences.xhtml",
+ "PrefWindow",
+ "non-private,chrome,titlebar,dialog=no,resizable",
+ "paneLightning");
+ }
+ },
+ };
+
+ window.addEventListener("ViewChanged", lightningPrefs, false);
+ ]]></script>
+
+</overlay>
diff --git a/comm/suite/mailnews/components/calendar/content/suite-overlay-preferences.xhtml b/comm/suite/mailnews/components/calendar/content/suite-overlay-preferences.xhtml
new file mode 100644
index 0000000000..0e7aad33df
--- /dev/null
+++ b/comm/suite/mailnews/components/calendar/content/suite-overlay-preferences.xhtml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<?xml-stylesheet href="chrome://lightning/skin/lightning.css"?>
+
+<?xul-overlay href="chrome://calendar/content/preferences/general.xhtml"?>
+<?xul-overlay href="chrome://calendar/content/preferences/alarms.xhtml"?>
+<?xul-overlay href="chrome://calendar/content/preferences/categories.xhtml"?>
+<?xul-overlay href="chrome://calendar/content/preferences/views.xhtml"?>
+
+<!DOCTYPE overlay [
+ <!ENTITY % lightningDTD SYSTEM "chrome://lightning/locale/lightning.dtd">
+ %lightningDTD;
+ <!ENTITY % preferencesDTD SYSTEM "chrome://calendar/locale/preferences/preferences.dtd">
+ %preferencesDTD;
+]>
+
+<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
+
+ <treechildren id="prefsPanelChildren">
+ <treeitem container="true"
+ id="lightningItem"
+ insertafter="mailnewsItem,navigatorItem"
+ label="&lightning.preferencesLabel;"
+ prefpane="paneLightning">
+ <treechildren id="lightningChildren">
+ <treeitem id="lightningAlarms"
+ label="&paneAlarms.title;"
+ prefpane="paneLightningAlarms"/>
+ <treeitem id="lightningCategories"
+ label="&paneCategories.title;"
+ prefpane="paneLightningCategories"/>
+ <treeitem id="lightningViews"
+ label="&paneViews.title;"
+ prefpane="paneLightningViews"/>
+ </treechildren>
+ </treeitem>
+ </treechildren>
+
+ <prefwindow id="prefDialog">
+ <prefpane id="paneLightning"
+ label="&lightning.preferencesLabel;"
+ onpaneload="gCalendarGeneralPane.init();">
+ <vbox id="calPreferencesBoxGeneral"/>
+ </prefpane>
+ <prefpane id="paneLightningAlarms"
+ label="&paneAlarms.title;"
+ onpaneload="gAlarmsPane.init();">
+ <vbox id="calPreferencesBoxAlarms"/>
+ </prefpane>
+ <prefpane id="paneLightningCategories"
+ label="&paneCategories.title;"
+ onpaneload="gCategoriesPane.init();">
+ <vbox id="calPreferencesBoxCategories"/>
+ </prefpane>
+ <prefpane id="paneLightningViews"
+ label="&paneViews.title;"
+ onpaneload="gViewsPane.init();">
+ <vbox id="calPreferencesBoxViews"/>
+ </prefpane>
+ </prefwindow>
+
+</overlay>
diff --git a/comm/suite/mailnews/components/calendar/content/suite-overlay-sidebar.js b/comm/suite/mailnews/components/calendar/content/suite-overlay-sidebar.js
new file mode 100644
index 0000000000..6c27c9c385
--- /dev/null
+++ b/comm/suite/mailnews/components/calendar/content/suite-overlay-sidebar.js
@@ -0,0 +1,47 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+/* import-globals-from ../../../suite/base/content/utilityOverlay.js */
+
+var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+
+var ltnSuiteUtils = {
+ addStartupObserver: function() {
+ Services.obs.addObserver(this.startupObserver, "lightning-startup-done");
+ Services.obs.addObserver(this.startupObserver, "calendar-taskview-startup-done");
+ },
+
+ startupObserver: {
+ observe: function(subject, topic, state) {
+ if (topic != "lightning-startup-done" && topic != "calendar-taskview-startup-done") {
+ return;
+ }
+
+ const ids = [
+ ["CustomizeTaskActionsToolbar", "task-actions-toolbox"],
+ ["CustomizeCalendarToolbar", "calendar-toolbox"],
+ ["CustomizeTaskToolbar", "task-toolbox"],
+ ];
+
+ ids.forEach(([itemID, toolboxID]) => {
+ let item = document.getElementById(itemID);
+ let toolbox = document.getElementById(toolboxID);
+ toolbox.customizeInit = function() {
+ item.setAttribute("disabled", "true");
+ toolboxCustomizeInit("mail-menubar");
+ };
+ toolbox.customizeDone = function(aToolboxChanged) {
+ item.removeAttribute("disabled");
+ toolboxCustomizeDone("mail-menubar", toolbox, aToolboxChanged);
+ };
+ toolbox.customizeChange = function(aEvent) {
+ toolboxCustomizeChange(toolbox, aEvent);
+ };
+ });
+ },
+ },
+};
+
+ltnSuiteUtils.addStartupObserver();
diff --git a/comm/suite/mailnews/components/calendar/content/suite-overlay-sidebar.xhtml b/comm/suite/mailnews/components/calendar/content/suite-overlay-sidebar.xhtml
new file mode 100644
index 0000000000..79ae5d662a
--- /dev/null
+++ b/comm/suite/mailnews/components/calendar/content/suite-overlay-sidebar.xhtml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+ - License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ - You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<overlay id="suiteSidebarOverlay"
+ xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
+
+ <script src="chrome://lightning/content/suite-overlay-sidebar.js"/>
+
+ <key id="openLightningKey" removeelement="true"/>
+ <key id="openTasksKey" removeelement="true"/>
+ <key id="calendar-new-event-key" removeelement="true"/>
+ <key id="calendar-new-todo-key" removeelement="true"/>
+
+ <menuitem id="CustomizeTaskActionsToolbar"
+ oncommand="goCustomizeToolbar(document.getElementById('task-actions-toolbox'))"/>
+
+ <toolbox id="calendar-toolbox"
+ defaultlabelalign="end"
+ xpfe="false"/>
+ <toolbox id="task-toolbox"
+ defaultlabelalign="end"
+ xpfe="false"/>
+ <toolbox id="task-actions-toolbox"
+ defaultlabelalign="end"
+ xpfe="false"/>
+
+ <toolbar id="calendar-toolbar2"
+ defaultlabelalign="end"
+ context="toolbar-context-menu"/>
+ <toolbar id="task-toolbar2"
+ defaultlabelalign="end"
+ context="toolbar-context-menu"/>
+ <toolbar id="task-actions-toolbar"
+ context="toolbar-context-menu"/>
+
+</overlay>