This module provides a set of functions for generating and managing confirmation dialogs.

Usage

The functions in this module can be accessed using the syntax ix.api.confirm.functionName();

Example

// Create a new confirmation dialog with a title, message and two buttons.
async function exampleUsage() {
return new Promise((resolve, reject) => {
ix.api.confirm.show({
'title': ix.text.i18n.get("TOOLTIP_CLOSE"),
'message': ix.text.i18n.get("TOOLTIP_CLOSE_CONFIRM_DIALOG"),
'buttons': {
'Yes': {
'css': 'margin:0 5px 0 5px;',
'action': () => resolve()
},
'No': {
'css': 'margin:0 5px 0 5px;',
'action': () => reject()
}
},
'escAction': () => reject()
});
}).then(() => {
console.log('User clicked Yes');
// Add your logic here for when the user clicks Yes
}).catch(() => {
console.log('User clicked No or pressed Esc');
// Add your logic here for when the user clicks No or presses Esc
});
}

// Call the function to show the confirmation dialog
exampleUsage();

// Example usage: Hiding the currently displayed confirmation dialog
ix.api.confirm.hide();

Index

Interfaces

Functions