module:core/modal_cancel

module:core/modal_cancel

new (require("core/modal_cancel"))()

Source:

Extends

Methods

configure(param0)

Source:
Overrides:

Configure the modal.

Parameters:
Name Type Description
param0 ModalConfig

The configuration options

getActionSelector(action) → {DOMString}

Source:
Overrides:

Get the Selector for an action.

Parameters:
Name Type Description
action String
Returns:
Type
DOMString

getAttachmentPoint() → {jQuery}

Source:
Overrides:

Gets the jQuery wrapped node that the Modal should be attached to.

Returns:
Type
jQuery

registerEventListeners()

Source:

Register all event listeners.

setBodyContent(promise) → {Promise}

Source:
Overrides:

Alternative to setBody() that can be used from non-Jquery modules

Parameters:
Name Type Description
promise Promise

promise that returns {html, js} object

Returns:
Type
Promise

setButtonDisabled(action, disabled)

Source:
Overrides:

Set the a button enabled or disabled.

Parameters:
Name Type Description
action DOMString

The action of the button

disabled Boolean

the new disabled value

setButtonText(action, value) → {Promise}

Source:
Overrides:

Set the title text of a button.

This method is overloaded to take either a string value for the button title or a jQuery promise that is resolved with text most commonly from a Str.get_string call.

Parameters:
Name Type Description
action DOMString

The action of the button

value String | object

The button text, or a promise which will resolve to it

Returns:
Type
Promise

setRemoveOnClose(remove)

Source:
Overrides:

Set the flag to remove the modal from the DOM on close.

Parameters:
Name Type Description
remove Boolean

setReturnElement(element)

Source:
Overrides:

Set the return element for the modal.

Parameters:
Name Type Description
element Element | jQuery

Element to focus when the modal is closed