Modal Dialogs Library
This library handles jQuery UI and Bootstrap modals and it is quite useful when it comes to display plain messages. Make sure to use the "showMessage" function only in pages where Bootstrap is loaded.
Notice: Some library methods are deprecated and will be removed with JSE v1.5.
Examples
Display jQuery UI message.
jse.libs.modal.message({
title: 'My Title', // Required
content: 'My Content' // Required
buttons: { ... } // Optional
// Other jQueryUI Dialog Widget Options
});
Display Bootstrap message.
jse.libs.modal.showMessage('Title', 'Content');
- Source:
Requires
- module:jQueryUI
- module:Bootstrap
Methods
(static) alert(options, title, className, defbuttons, template) → {object}
Generates the default alert layer.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | Mix of jQuery UI dialog options and custom options |
title |
string | Default title for the type of alert layer |
className |
string | Default class for the type of alert layer |
defbuttons |
array | Array wih the default buttons for the array type |
template |
string | Selector for the jQuery-object used as template |
- Deprecated:
- This method will be removed with JSE v1.5.
- Source:
Returns:
Returns a promise object.
- Type
- object
(static) confirm(options) → {promise}
Returns a confirm layer.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | Mix of jQuery UI dialog options and custom options. |
- Deprecated:
- This method will be removed with JSE v1.5.
- Source:
Returns:
Returns a promise
- Type
- promise
(static) error(options) → {object}
Returns an error layer.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | Mix of jQuery UI dialog options and custom options. |
- Deprecated:
- This method will be removed with JSE v1.5.
- Source:
Returns:
Returns a promise object.
- Type
- object
(static) info(options) → {promise}
Returns an info layer.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | Mix of jQuery UI dialog options and custom options. |
- Deprecated:
- This method will be removed with JSE v1.5.
- Source:
Returns:
Returns a promise object.
- Type
- promise
(static) message(options)
Display jQuery UI message.
This method provides an easy way to display a message to the user by using jQuery UI dialog widget.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object | Modal options are the same as the jQuery dialog widget. |
- Source:
(static) prompt(options) → {promise}
Returns a prompt layer.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | Mix of jQuery UI dialog options and custom options. |
- Deprecated:
- This method will be removed with JSE v1.5.
- Source:
Returns:
Returns a promise object.
- Type
- promise
(static) showMessage(title, content)
Display Bootstrap modal message.
Parameters:
Name | Type | Description |
---|---|---|
title |
String | The message title. |
content |
String | The message content. |
- Source:
(static) success(options) → {object}
Returns a success layer.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | Mix of jQuery UI dialog options and custom options. |
- Deprecated:
- This method will be removed with JSE v1.5.
- Source:
Returns:
Returns a promise object.
- Type
- object
(static) warn(options) → {object}
Returns a warning layer.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | Mix of jQuery UI dialog options and custom options. |
- Deprecated:
- This method will be removed with JSE v1.5.
- Source:
Returns:
Returns a promise object.
- Type
- object