Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ this.calendarItemAction = class extends ToolbarButtonAPI {
super(extension, ExtensionParent.apiManager.global);
this.manifest_name = "calendar_item_action";
this.manifestName = "calendarItemAction";
this.moduleName = this.manifestName;
this.windowURLs = [
"chrome://messenger/content/messenger.xhtml",
"chrome://calendar/content/calendar-event-dialog.xhtml"
Expand Down
205 changes: 168 additions & 37 deletions calendar/experiments/calendar/schema/calendarItemAction.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,6 @@
"description": "Use a calendarItemAction to put an icon in the calendar event/task dialogs. In addition to its icon, a calendarItemAction can also have a tooltip, a badge, and a popup. This namespace is called calendarItemAction for compatibility with browser WebExtensions.",
"permissions": ["manifest:calendar_item_action"],
"types": [
{
"id": "Details",
"type": "object",
"description": "Specifies to which tab or window the value should be set, or from which one it should be retrieved. If no tab nor window is specified, the global value is set or retrieved.",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
"id": "ColorArray",
"description": "An array of four integers in the range [0,255] that make up the RGBA color. For example, opaque red is <code>[255, 0, 0, 255]</code>.",
Expand Down Expand Up @@ -148,15 +129,26 @@
{
"name": "details",
"type": "object",
"$import": "Details",
"properties": {
"title": {
"choices": [
{"type": "string"},
{"type": "null"}
],
"description": "The string the calendarItemAction should display as its label and when moused over."
}
},
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
Expand All @@ -175,7 +167,21 @@
"parameters": [
{
"name": "details",
"$ref": "Details"
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
"type": "function",
Expand All @@ -198,15 +204,26 @@
{
"name": "details",
"type": "object",
"$import": "Details",
"properties": {
"label": {
"choices": [
{"type": "string"},
{"type": "null"}
],
"description": "The string the calendarItemAction should use as label. Can be set to an empty string to not display any label. If the containing toolbar is configured to display text only, the title will be used as fallback."
}
},
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
Expand All @@ -225,7 +242,21 @@
"parameters": [
{
"name": "details",
"$ref": "Details"
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
"type": "function",
Expand All @@ -248,7 +279,6 @@
{
"name": "details",
"type": "object",
"$import": "Details",
"properties": {
"imageData": {
"choices": [
Expand All @@ -265,7 +295,19 @@
],
"optional": true,
"description": "Either a relative image path defining a single icon used for all sizes or an IconPathDictionary object defining dedicated icons for different sizes."
}
},
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
Expand All @@ -285,15 +327,26 @@
{
"name": "details",
"type": "object",
"$import": "Details",
"properties": {
"popup": {
"choices": [
{"type": "string"},
{"type": "null"}
],
"description": "The html file to show in a popup. If set to the empty string (''), no popup is shown."
}
},
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
Expand All @@ -312,7 +365,21 @@
"parameters": [
{
"name": "details",
"$ref": "Details"
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
"type": "function",
Expand All @@ -335,15 +402,26 @@
{
"name": "details",
"type": "object",
"$import": "Details",
"properties": {
"text": {
"choices": [
{"type": "string"},
{"type": "null"}
],
"description": "Any number of characters can be passed, but only about four can fit in the space."
}
},
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
Expand All @@ -362,7 +440,21 @@
"parameters": [
{
"name": "details",
"$ref": "Details"
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
"type": "function",
Expand All @@ -385,7 +477,6 @@
{
"name": "details",
"type": "object",
"$import": "Details",
"properties": {
"color": {
"description": "An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is <code>[255, 0, 0, 255]</code>. Can also be a string with a CSS value, with opaque red being <code>#FF0000</code> or <code>#F00</code>.",
Expand All @@ -394,7 +485,19 @@
{"$ref": "ColorArray"},
{"type": "null"}
]
}
},
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
Expand All @@ -413,7 +516,21 @@
"parameters": [
{
"name": "details",
"$ref": "Details"
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
"type": "function",
Expand Down Expand Up @@ -477,7 +594,21 @@
"parameters": [
{
"name": "details",
"$ref": "Details"
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "When setting a value, it will be specific to the specified tab, and will automatically reset when the tab navigates. When getting, specifies the tab to get the value from; if there is no tab-specific value, the window one will be inherited."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "When setting a value, it will be specific to the specified window. When getting, specifies the window to get the value from; if there is no window-specific value, the global one will be inherited."
}
}
},
{
"type": "function",
Expand Down