dialog
pb.dialog(params)
Utility to create functional dialogs.
Returns: Object
- Created dialog object
Param | Type | Description |
---|---|---|
params | Object | Parameters for the dialog. |
[params.type] | string | Type of dialog to initialize. |
[params.id] | string | ID of this dialog. |
[params.class] | string | Additional class to add to dialog element. |
[params.title] | string | Title to display. |
[params.html] | string | Content of the dialog. |
[params.text] | string | Text to accompany the content of the dialog. |
[params.events] | DialogEvents | Events associated with the type of dialog. |
[params.options] | Object | Additional options to pass to the dialog. |
[params.buttons] | Object | Optional buttons to assign to the dialog. |
[params.cancelButton] | boolean | TitleBarIcon | Add cancel button to the dialog. Pass in TitleBarIcon object to override default cancel button. |
[params.titleBarIcons] | Array.<TitleBarIcon> | An array of optional icons to display to the left of the close icon. |
DialogEvents
DialogEvents are callback functions run when performing certain actions in the dialog.
Properties
Name | Type | Description |
---|---|---|
onOpen | function | Callback when the dialog is opened. |
onClose | function | Callback when the dialog is closed. |
TitleBarIcon
A TitleBarIcon is a clickable icon with a callback displayed in the title bar of the dialog.
Properties
Name | Type | Description |
---|---|---|
attrs | Object | HTML attributes to apply to the icon. |
onClick | function | Callback when the button is pressed. |