Revision control

Copy as Markdown

Other Tools

/* 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/. */
/* This has the following companion definition files:
* - unifiedToolbarCustomizableItems.css for the preview icons based on the id.
* - unifiedToolbarItems.ftl for the labels associated with the labelId.
* - unifiedToolbarCustomizableItems.inc.xhtml for the templates referenced with
* templateId.
* - unifiedToolbarShared.css contains styles for the template contents shared
* between the customization preview and the actual toolbar.
* - unifiedtoolbar/content/items contains all item specific custom elements.
*/
/**
* @typedef {object} CustomizableItemDetails
* @property {string} id - The ID of the item. Will be set as a class on the
* outer wrapper. May not contain commas.
* @property {string} labelId - Fluent ID for the label shown while in the
* palette.
* @property {boolean} [allowMultiple] - If this item can be added more than
* once to a space.
* @property {string[]} [spaces] - If empty or omitted, item is allowed in all
* spaces.
* @property {string} [templateId] - ID of template defining the "live" markup.
* @property {string[]} [requiredModules] - List of modules that must be loaded
* for the template of this item.
* @property {boolean} [hasContextMenu] - Indicates that this item has its own
* context menu, and the global unified toolbar one shouldn't be shown.
* @property {boolean} [skipFocus] - If this item should be skipped in keyboard
* focus navigation.
*/
/**
* @type {CustomizableItemDetails[]}
*/
export default [
// Universal items (all spaces)
{
id: "spacer",
labelId: "spacer",
allowMultiple: true,
skipFocus: true,
},
{
// This item gets filtered out when gloda is disabled.
id: "search-bar",
labelId: "search-bar",
templateId: "searchBarItemTemplate",
requiredModules: [
],
hasContextMenu: true,
skipFocus: true,
},
{
id: "write-message",
labelId: "toolbar-write-message",
templateId: "writeMessageTemplate",
requiredModules: [
],
},
{
id: "get-messages",
labelId: "toolbar-get-messages",
templateId: "getMessagesTemplate",
requiredModules: [
],
hasContextMenu: true,
},
{
id: "address-book",
labelId: "toolbar-address-book",
templateId: "addressBookTemplate",
requiredModules: [
],
},
{
id: "chat",
labelId: "toolbar-chat",
templateId: "chatTemplate",
requiredModules: [
],
},
{
id: "add-ons-and-themes",
labelId: "toolbar-add-ons-and-themes",
templateId: "addOnsAndThemesTemplate",
requiredModules: [
],
},
{
id: "calendar",
labelId: "toolbar-calendar",
templateId: "calendarTemplate",
requiredModules: [
],
},
{
id: "tasks",
labelId: "toolbar-tasks",
templateId: "tasksTemplate",
requiredModules: [
],
},
{
id: "mail",
labelId: "toolbar-mail",
templateId: "mailTemplate",
requiredModules: [
],
},
{
id: "new-event",
labelId: "toolbar-new-event",
templateId: "newEventTemplate",
requiredModules: [
],
},
{
id: "new-task",
labelId: "toolbar-new-task",
templateId: "newTaskTemplate",
requiredModules: [
],
},
{
id: "create-contact",
labelId: "toolbar-create-contact",
templateId: "createContactTemplate",
requiredModules: [
],
},
// Mail space
{
id: "move-to",
labelId: "toolbar-move-to",
spaces: ["mail"],
templateId: "moveToTemplate",
requiredModules: [
],
},
{
id: "reply",
labelId: "toolbar-reply",
spaces: ["mail"],
templateId: "replyTemplate",
requiredModules: [
],
},
{
id: "reply-all",
labelId: "toolbar-reply-all",
spaces: ["mail"],
templateId: "replyAllTemplate",
requiredModules: [
],
},
{
id: "reply-to-list",
labelId: "toolbar-reply-to-list",
spaces: ["mail"],
templateId: "replyToListTemplate",
requiredModules: [
],
},
{
id: "redirect",
labelId: "toolbar-redirect",
spaces: ["mail"],
templateId: "redirectTemplate",
requiredModules: [
],
},
{
id: "archive",
labelId: "toolbar-archive",
spaces: ["mail"],
templateId: "archiveTemplate",
requiredModules: [
],
},
{
id: "conversation",
labelId: "toolbar-conversation",
spaces: ["mail"],
templateId: "conversationTemplate",
requiredModules: [
],
},
{
id: "previous-unread",
labelId: "toolbar-previous-unread",
spaces: ["mail"],
templateId: "previousUnreadTemplate",
requiredModules: [
],
},
{
id: "previous",
labelId: "toolbar-previous",
spaces: ["mail"],
templateId: "previousTemplate",
requiredModules: [
],
},
{
id: "next-unread",
labelId: "toolbar-next-unread",
spaces: ["mail"],
templateId: "nextUnreadTemplate",
requiredModules: [
],
},
{
id: "next",
labelId: "toolbar-next",
spaces: ["mail"],
templateId: "nextTemplate",
requiredModules: [
],
},
{
id: "junk",
labelId: "toolbar-junk",
spaces: ["mail"],
templateId: "junkTemplate",
requiredModules: [
],
},
{
id: "delete",
labelId: "toolbar-delete",
spaces: ["mail"],
templateId: "deleteTemplate",
requiredModules: [
],
},
{
id: "compact",
labelId: "toolbar-compact",
spaces: ["mail"],
templateId: "compactTemplate",
requiredModules: [
],
},
{
id: "add-as-event",
labelId: "toolbar-add-as-event",
spaces: ["mail"],
templateId: "addAsEventTemplate",
requiredModules: [
],
},
{
id: "add-as-task",
labelId: "toolbar-add-as-task",
spaces: ["mail"],
templateId: "addAsTaskTemplate",
requiredModules: [
],
},
{
id: "folder-location",
labelId: "toolbar-folder-location",
spaces: ["mail"],
templateId: "folderLocationTemplate",
requiredModules: [
],
},
{
id: "tag-message",
labelId: "toolbar-tag-message",
spaces: ["mail"],
templateId: "tagMessageTemplate",
requiredModules: [
],
},
{
id: "forward-inline",
labelId: "toolbar-forward-inline",
spaces: ["mail"],
templateId: "forwardInlineTemplate",
requiredModules: [
],
},
{
id: "forward-attachment",
labelId: "toolbar-forward-attachment",
spaces: ["mail"],
templateId: "forwardAttachmentTemplate",
requiredModules: [
],
},
{
id: "mark-as",
labelId: "toolbar-mark-as",
spaces: ["mail"],
templateId: "markAsTemplate",
requiredModules: [
],
},
{
id: "view-picker",
labelId: "toolbar-view-picker",
spaces: ["mail"],
templateId: "viewPickerTemplate",
requiredModules: [
],
},
{
id: "print",
labelId: "toolbar-print",
spaces: ["mail"],
templateId: "printTemplate",
requiredModules: [
],
},
{
id: "quick-filter-bar",
labelId: "toolbar-quick-filter-bar",
spaces: ["mail"],
templateId: "quickFilterBarTemplate",
requiredModules: [
],
},
{
id: "go-back",
labelId: "toolbar-go-back",
spaces: ["mail"],
templateId: "goBackTemplate",
requiredModules: [
],
hasContextMenu: true,
},
{
id: "go-forward",
labelId: "toolbar-go-forward",
spaces: ["mail"],
templateId: "goForwardTemplate",
requiredModules: [
],
hasContextMenu: true,
},
{
id: "stop",
labelId: "toolbar-stop",
spaces: ["mail"],
templateId: "stopTemplate",
requiredModules: [
],
},
{
id: "throbber",
labelId: "toolbar-throbber",
spaces: ["mail"],
templateId: "throbberTemplate",
skipFocus: true,
},
// Calendar & Tasks space
{
id: "edit-event",
labelId: "toolbar-edit-event",
spaces: ["calendar", "tasks"],
templateId: "editEventTemplate",
requiredModules: [
],
},
{
id: "synchronize",
labelId: "toolbar-synchronize",
spaces: ["calendar", "tasks"],
templateId: "synchronizeTemplate",
requiredModules: [
],
},
{
id: "delete-event",
labelId: "toolbar-delete-event",
spaces: ["calendar", "tasks"],
templateId: "deleteEventTemplate",
requiredModules: [
],
},
{
id: "print-event",
labelId: "toolbar-print-event",
spaces: ["calendar", "tasks"],
templateId: "printEventTemplate",
requiredModules: [
],
},
// Calendar space
{
id: "go-to-today",
labelId: "toolbar-go-to-today",
spaces: ["calendar"],
templateId: "goToTodayTemplate",
requiredModules: [
],
},
{
id: "unifinder",
labelId: "toolbar-unifinder",
spaces: ["calendar"],
templateId: "calendarUnifinderTemplate",
requiredModules: [
],
},
// Address book space
{
id: "create-address-book",
labelId: "toolbar-create-address-book",
spaces: ["addressbook"],
templateId: "createAddressBookTemplate",
requiredModules: [
],
},
{
id: "create-list",
labelId: "toolbar-create-list",
spaces: ["addressbook"],
templateId: "createListTemplate",
requiredModules: [
],
},
{
id: "import-contacts",
labelId: "toolbar-import-contacts",
spaces: ["addressbook"],
templateId: "importContactsTemplate",
requiredModules: [
],
},
];