Bootpopup

Bootpopup

Bootpopup class

Constructor

new Bootpopup()

Source:
Parameters:
Name Type Description
..args BootpopupOptions

Members

formid

Source:
Properties:
Name Type Description
formid string

Randomly generated HTML id of the form.

options

Source:
Properties:
Name Type Description
options Object

Options used to create the window.

Methods

addOptions(options) → {Bootpopup}

Source:
Parameters:
Name Type Description
options Object

Add/merge options into current options.

Returns:
Type Description
Bootpopup

This instance.

callback(name) → {any}

Description:
  • Call a callback for the given action and return its result.

Source:
Parameters:
Name Type Description
name "dismiss" | "submit" | "close" | "ok" | "cancel" | "yes" | "no"

Action name.

Returns:
Type Description
any

Callback return value.

close() → {void}

Description:
  • Close popup window (performs the close action).

Source:
Returns:
Type Description
void

create() → {Bootpopup}

Description:
  • Create the window and add it to the DOM, but do not show it.

Source:
Returns:
Type Description
Bootpopup

This instance.

data() → {Object}

Description:
  • Return form input values from all inputs.

Source:
Returns:
Type Description
Object

Data as { obj: {}, list: [] }.

escape(str) → {string}

Source:
Parameters:
Name Type Description
str string

String to escape.

Returns:
Type Description
string

Escaped string where &<>'" are converted into HTML entities.

show() → {Bootpopup}

Description:
  • Show the window and call the before callback.

Source:
Returns:
Type Description
Bootpopup

This instance.

showAlert(msg, optionsopt) → {Bootpopup}

Source:
Parameters:
Name Type Attributes Description
msg string

Message to display.

options Object <optional>

Alert options.

Properties
Name Type Attributes Description
type "info" <optional>

Use "info" to show information message (requires info: true).

dismiss boolean <optional>

If true, the message must be closed manually.

delay number <optional>

Auto-hide after this delay (ms).

Returns:
Type Description
Bootpopup

This instance.

validate() → {boolean}

Description:
  • Run checkValidity() and return the result.

Source:
Returns:
Type Description
boolean

Validity result.