A common dialog definition that may be referenced by other Connect modules and from JavaScript API calls.
For example, take the following dialog module:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
{
"modules": {
"dialogs": [
{
"url": "/my-dialog-content",
"options": {
"size": "fullscreen",
"header": {
"value": "Example Dialog"
}
},
"key": "dialog-module-key"
}
]
}
}
This common dialog might be referenced from a web item target, so that triggering the web item launches the dialog:
1 2 3 4 5 6 7 8 9
{
"target": {
"type": "dialogmodule",
"options": {
"key": "dialog-module-key"
}
}
}
The common dialog might also be referenced when creating a Dialog manually with the JavaScript API:
1 2 3 4 5 6 7
AP.require('dialog', function(dialog){
dialog.create({
key: 'dialog-module-key'
}).on("close", callbackFunc);
});
key
Type | |
Max length | 100 |
Required | Yes |
Pattern | ^[a-zA-Z0-9-]+$ |
Description | A key to identify this module. This key must be unique relative to the add on, with the exception of Confluence macros: Their keys need to be globally unique. Keys must only contain alphanumeric characters and dashes. The key is used to generate the url to your add-on's module. The url is generated as a combination of your add-on key and module key. For example, an add-on which looks like: 1 2 3 4 5 6 7 8 9
Will have a configuration page module with a URL of |
url
Type | |
Format | uri-template |
Required | Yes |
Description | Specifies the URL of the content displayed in the dialog. The URL can be absolute or relative to either the product URL or the add-on's base URL, depending on the context attribute. Your add-on can receive additional context from the application by using variable tokens in the URL attribute. |
cacheable
Type | |
Defaults to | false |
Description | Returns whether the URL should be cacheable. Cacheable URLs are taken directly from the add-on descriptor, and lack all additional query parameters:
|
options
Type | |
Description | An object containing options for this dialog. Options for a modal dialog web item target or common module. These options are a subset of those available via the JavaScript API. Web Item Example1 2 3 4 5 6 7 8 9 10
Dialog Example1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
chrome |
| ||||||
header |
| ||||||
height |
| ||||||
size |
| ||||||
width |
|
Rate this page: