Class: UIDialog

UIDialog

A UIDialog is a top-level window used for communications with the user. It may be modal or modeless. The content of the dialog can be either an HTML text or a pre-built DOM element. When hidden, a dialog emits a 'closed' event.


new UIDialog(container [, options])

Instatiates a UIDialog object.

Parameters:
Name Type Argument Description
container HTMLElement

The HTMLElement on which the dialog is focused

options Object <optional>

An object literal with UIDialog parameters.

Properties
Name Type Description
modal bool

Whether the dialog is modal.

Source:

Methods


fade(on)

Toggles fade effect

Parameters:
Name Type Description
on boolean

Whether to enable fade effect

Source:

hide()

Hides the dialog and emits closed event

Source:
Fires:

setContent(html)

Sets dialog content

Parameters:
Name Type Description
html string | HTMLElement

Content to display

Source:

show()

Shows the dialog.

Source:

toggle( [force])

Toggles dialog visibility

Parameters:
Name Type Argument Description
force boolean <optional>

Force specific state

Source:

Events


closed

The event is fired when the dialog is closed.

Source: