The Dialog module provides a mechanism for launching an add-on's modules as modal dialogs from within an add-on's iframe. A modal dialog displays information without requiring the user to leave the current page. The dialog is opened over the entire window, rather than within the iframe itself.
###Styling your dialog to look like a standard Atlassian dialog By default the dialog iframe is undecorated. It's up to the developer to style the dialog.
In order to maintain a consistent look and feel between the host application and the add-on, we encourage add-on developers to style their dialogs to match Atlassian's Design Guidelines for modal dialogs. To do that, you'll need to add the AUI styles to your dialog.
For more information, read about the Atlassian User Interface dialog component.
Classes
Methods
close
(data)Closes the currently open dialog. Optionally pass data to listeners of the
dialog.close
event. This will only close a dialog that has been opened by your add-on. You can register for close events using thedialog.close
event and the events moduleParameters:
Name Type Description data
Object An object to be emitted on dialog close.
Example
getButton
() → {DialogButton}Returns the button that was requested (either cancel or submit)
Returns:
DialogButtonExample
onDialogMessage
(String, Function)register callbacks responding to messages from the host dialog, such as "submit" or "cancel"
Parameters:
Name Type Description String
button either "cancel" or "submit"
Function
callback function
- This functionality is deprecated and may be removed in the future.