Skip to main content

dialog

pb.dialog(params)

Utility to create functional dialogs.

Returns: Object - Created dialog object

ParamTypeDescription
paramsObjectParameters for the dialog.
[params.type]stringType of dialog to initialize.
[params.id]stringID of this dialog.
[params.class]stringAdditional class to add to dialog element.
[params.title]stringTitle to display.
[params.html]stringContent of the dialog.
[params.text]stringText to accompany the content of the dialog.
[params.events]DialogEventsEvents associated with the type of dialog.
[params.options]ObjectAdditional options to pass to the dialog.
[params.buttons]ObjectOptional buttons to assign to the dialog.
[params.cancelButton]boolean | TitleBarIconAdd 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

NameTypeDescription
onOpenfunctionCallback when the dialog is opened.
onClosefunctionCallback when the dialog is closed.

TitleBarIcon

A TitleBarIcon is a clickable icon with a callback displayed in the title bar of the dialog.

Properties

NameTypeDescription
attrsObjectHTML attributes to apply to the icon.
onClickfunctionCallback when the button is pressed.