Info Messages library
Use this library to add messages into admin's notification system (top right corner). There are multiple types of notification entries 'error', 'info', 'warning' and 'success'. Use the respective method for each one of them.
You will need to provide the full URL in order to load this library as a dependency to a module:
gx.controller.module(
'my_custom_page',
[
gx.source + '/libs/info_messages'
],
function(data) {
// Module code ...
});
- Source:
- To Do:
-
- This library does not yet support the new admin layout pages.
Methods
(static) addError(message)
Adds a red error message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | Message to be displayed. |
(static) addInfo(message)
Adds a blue info message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | Message to be displayed. |
(static) addSuccess(message)
Adds a green success message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | Message to be displayed. |
(static) addWarning(message)
Adds a yellow warning message.
Parameters:
Name | Type | Description |
---|---|---|
message |
string | Message to be displayed. |
(static) truncate()
Removes all messages inside the message container.