module:core/modal_delete_cancel

module:core/modal_delete_cancel

The Delete/Cancel Modal.

Constructor

new (require("core/modal_delete_cancel"))()

Source:

Extends

Methods

configure(param0)

Description:
  • Configure the modal.

Source:
Overrides:
Parameters:
Name Type Description
param0 ModalConfig

The configuration options

getActionSelector(action) → {DOMString}

Description:
  • Get the Selector for an action.

Source:
Overrides:
Parameters:
Name Type Description
action String
Returns:
Type
DOMString

getAttachmentPoint() → {jQuery}

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

Source:
Overrides:
Returns:
Type
jQuery

setBodyContent(promise) → {Promise}

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

Source:
Overrides:
Parameters:
Name Type Description
promise Promise

promise that returns {html, js} object

Returns:
Type
Promise

setButtonDisabled(action, disabled)

Description:
  • Set the a button enabled or disabled.

Source:
Overrides:
Parameters:
Name Type Description
action DOMString

The action of the button

disabled Boolean

the new disabled value

setButtonText(action, value) → {Promise}

Description:
  • 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.

Source:
Overrides:
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

setDeleteButtonText(value)

Description:
  • Set the title of the delete button.

Source:
Parameters:
Name Type Description
value String | Promise

The button text, or a Promise which will resolve it

setFooter()

Description:
  • Override parent implementation to prevent changing the footer content.

Source:

setRemoveOnClose(remove)

Description:
  • Set the flag to remove the modal from the DOM on close.

Source:
Overrides:
Parameters:
Name Type Description
remove Boolean

setReturnElement(element)

Description:
  • Set the return element for the modal.

Source:
Overrides:
Parameters:
Name Type Description
element Element | jQuery

Element to focus when the modal is closed