new Popup_A()
- Source
Members
(static) CANCEL :string
'cancel'
- string
- Source
(static) OK :string
'ok'
- string
- Source
(static) cancel
'cancel'
- Deprecated
- Source
(static) ok
'ok'
- Deprecated
- Source
enabled
- Source
show
- Source
Methods
confirm(msg1, msg_arrayopt, callbackopt)
A popup dialog is a modal window that provides "OK/Cancel" confirmation dialog.
| Name | Type | Attributes | Description |
|---|---|---|---|
msg1 | string | A string, describing the topic of the message. | |
msg_array | string | | <optional> | The actual message. It can be either a simple string or, if several lines are required, an array where each element is a string with a message line. |
callback | function | <optional> | A function that will be called when the user dismisses by pressing the 'OK' or 'Cancel' button. |
- Source
TComponents.Popup_A.confirm(
`XXX module not yet loaded on the controller`,
['This module is required for this WebApp.', 'Do you want to load the module?'],
(action) => {
if (action === 'ok') {
console.log("Load the module here...")
} else if (action == 'cancel') {
console.log("Abort mission!");
}
}
);danger(msg1, msg_arrayopt, callbackopt)
A popup dialog is a modal window that provides the user with danger messages.
| Name | Type | Attributes | Description |
|---|---|---|---|
msg1 | string | A string, describing the topic of the message. | |
msg_array | string | | <optional> | The actual message. It can be either a simple string or, if several lines are required, an array where each element is a string with a message line. |
callback | function | <optional> | A function that will be called when the user dismisses by pressing the 'OK' or 'Cancel' button. |
- Source
try {
// do something
} catch (e) {
TComponents.Popup_A.danger('Something went wrong', [e.message, e.description]);
}error(e)
A popup dialog is a modal window that provides the user with error messages.
| Name | Type | Description |
|---|---|---|
e | object | Error object for example, errorthrown by Omnicore RWS |
- Source
- To Do
- Optimize the parsing of error object
try {
throw new Error("Whoops!");
} catch (e) {
TComponents.Popup_A.error(e, 'Custom title');
};info(msg1, msg_arrayopt, callbackopt)
A popup dialog is a modal window that provides the user with information messages. The main difference from the Popup_A.message is that Popup_A.info includes an "i" image in the modal window.
| Name | Type | Attributes | Description |
|---|---|---|---|
msg1 | string | A string, describing the topic of the message. | |
msg_array | string | | <optional> | The actual message. It can be either a simple string or, if several lines are required, an array where each element is a string with a message line. |
callback | function | <optional> | A function that will be called when the user dismisses by pressing the 'OK' or 'Cancel' button. |
- Source
TComponents.Popup_A.info(
"Important information!",
[
"For your information, this is a popup dialog.",
"",
"Further information can be given here!"
],
function (action) {
console.log("OK button was clicked")
});message(msg1, msg_arrayopt, callbackopt)
A popup dialog is a modal window that provides the user with information messages.
| Name | Type | Attributes | Description |
|---|---|---|---|
msg1 | string | A string, describing the topic of the message. | |
msg_array | string | | <optional> | The actual message. It can be either a simple string or, if several lines are required, an array where each element is a string with a message line. |
callback | function | <optional> | A function that will be called when the user dismisses by pressing the 'OK' or 'Cancel' button. |
- Source
TComponents.Popup_A.message(
"Important message!",
[
"For your information, this is a popup dialog.",
"",
"Further information can be given here!"
],
function (action) {
console.log("OK button was clicked")
});warning(msg1, msg_arrayopt, callbackopt)
A popup dialog is a modal window that provides the user with warning messages.
| Name | Type | Attributes | Description |
|---|---|---|---|
msg1 | string | A string, describing the topic of the message. | |
msg_array | string | | <optional> | The actual message. It can be either a simple string or, if several lines are required, an array where each element is a string with a message line. |
callback | function | <optional> | A function that will be called when the user dismisses by pressing the 'OK' or 'Cancel' button. |
- Source
try {
// do something
} catch (e) {
Popup_A.waring('Something went wrong', [e.message, e.description]);
}