vSphere Client JavaScript API: Modal Interface
The modal
interface enables your plug-in to manage modal dialog
windows.
modal.AlertLevel
Description |
Enum:
Clarity adds a standard icon, depending on the alert level. See https://v2.clarity.design/alerts. |
Used by: modal.ConfirmationModalConfig
modal.ButtonStyle
Description |
Enum:
Clarity adds default button styling, depending on the action importance. See https://v2.clarity.design/buttons. |
Used by: modal.ModalButton
modal.ButtonType
Description |
Enum:
Clarity styles PRIMARY buttons with greater emphasis. See https://v2.clarity.design/buttons. |
Used by: modal.ModalButton
modal.close()
Signature |
|
Description |
Closes the modal dialog box in the parent iframe. |
Parameter:
|
Optional data that will be
passed to callback function specified by |
modal.ConfirmationModalConfig
Description |
Specifies the properties of a confirmation modal dialog box. |
Name |
Type |
Required? |
Notes |
---|---|---|---|
|
|
yes |
Confirmation message displayed in the dialog. |
|
yes |
Buttons displayed in the dialog footer. (min 1, max 4) |
|
|
|
no |
Dialog main title. May not
contain an icon. (default= |
|
no |
Width of the dialog box. (Default width is chosen by Clarity. Height is fixed.) |
|
|
|
no |
Whether the dialog
displays a close button. (default= |
|
|
no |
Function runs when user
closes the dialog. If Function runs when user
closes the dialog. If |
|
|
no |
Optional subtitle for the dialog. |
|
no |
Causes Clarity to add an icon to the dialog. |
Used by: modal.openConfirmationModal()
modal.DynamicModalConfig
Description |
Specifies values for some properties of a modal dialog box. |
Name |
Type |
Required? |
Notes |
---|---|---|---|
|
|
no |
Dialog title. May not contain an icon. (If not present, no change to dialog title.) |
|
|
no |
Dialog height, specified in pixels. (If not present, no change to dialog height.) |
Used by: modal.setOptions()
modal.getCustomData()
Signature |
|
Description |
Returns the
|
modal.ModalButton
Description |
Name |
Type |
Required? |
Notes |
---|---|---|---|
|
|
yes |
|
|
no |
||
|
no |
||
|
|
no |
Used by: modal.ConfirmationModalConfig
modal.ModalConfig
Description |
Specifies the properties of a modal dialog box. |
Name |
Type |
Required? |
Notes |
---|---|---|---|
|
|
yes |
Location of HTML content for the dialog. |
|
|
no |
Dialog title. May not
contain an icon. (default= |
|
|
no |
Specify in pixels. Default is chosen by Clarity. See https://v2.clarity.design/modals. |
|
|
no |
Whether the dialog
displays a close button. (default= |
|
|
no |
Function runs when the dialog
closes. If Function runs when the dialog
closes. If |
|
|
no |
Data the calling module passes to the dialog. |
|
|
no |
IDs of relevant objects the calling module passes to the dialog. |
Used by: modal.open()
modal.ModalSize
Description |
Width of a modal dialog box. |
Name |
Type |
Required? |
Notes |
---|---|---|---|
|
|
yes |
Specified in pixels. |
Used by: modal.ConfirmationModalConfig
modal.open()
Signature |
|
Description |
Opens a modal dialog box
specified by the |
Parameter:
|
Specifies the properties of this modal dialog box. |
modal.openConfirmationModal()
Signature |
|
Description |
Opens a lightweight modal dialog box designed to present information and confirmation buttons. |
Parameter:
|
Specifies the properties of this modal dialog box. |
modal.setOptions()
Signature |
|
Description |
Called by the parent view to modify some properties for a modal dialog box in the parent iframe. |
Parameter:
|
Specifies values for some dialog box properties. |