new OverlayNotification(code, params)
A notification that is displayed in a full-screen overlay.
Parameters:
| Name | Type | Description |
|---|---|---|
code |
string | Code. |
params |
object | Params. |
- Since:
-
- 4.9.0
- Source:
Extends
Members
-
containerClasses :string
-
Additional class names to add to the notification container.
Type:
- string
- Since:
-
- 4.9.0
- Inherited From:
- Source:
-
loading :boolean
-
Whether the notification should show a loading spinner.
Type:
- boolean
- Since:
-
- 4.9.0
- Source:
-
template :function
-
Template function for rendering the notification. This will be populated with template option or else it will be populated with template from the ID.
Type:
- function
- Since:
-
- 4.9.0
- Inherited From:
- Source:
-
templateId :string
-
ID for the template to render the notification.
Type:
- string
- Since:
-
- 4.9.0
- Inherited From:
- Source:
Methods
-
handleEscape(event)
-
Stop propagation on escape key presses, but also dismiss notification if it is dismissible.
Parameters:
Name Type Description eventjQuery.Event Event. - Since:
-
- 4.9.0
- Source:
Returns:
- Type
- void
-
initialize(code, params)
-
Initialize notification.
Parameters:
Name Type Description codestring Notification code. paramsobject Notification parameters. Properties
Name Type Argument Default Description messagestring Message. typestring <optional>
error Type. settingstring <optional>
Related setting ID. templatefunction <optional>
Function for rendering template. If not provided, this will come from templateId. templateIdstring <optional>
ID for template to render the notification. containerClassesstring <optional>
Additional class names to add to the notification container. dismissibleboolean <optional>
Whether the notification can be dismissed. - Since:
-
- 4.9.0
- Inherited From:
- Source:
-
render()
-
Render notification.
- Since:
-
- 4.9.0
- Overrides:
- Source:
Returns:
Notification container.- Type
- jQuery