mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-13 16:37:52 +00:00
make alertPopup() available to use on events
This commit is contained in:
parent
702bfd0f96
commit
fae9122cf7
@ -338,9 +338,16 @@ function confirmPopup(req) {
|
||||
function alertPopup(req) {
|
||||
if (!req) return;
|
||||
|
||||
if (!req.txtConfirm)
|
||||
req.txtConfirm = polyglot.t('btn_ok');
|
||||
req.removeCancel = true;
|
||||
if (typeof req.stopPropagation === 'function') {
|
||||
if (typeof req.data !== 'object') return;
|
||||
if (!req.data.txtConfirm)
|
||||
req.data.txtConfirm = polyglot.t('btn_ok');
|
||||
req.data.removeCancel = true;
|
||||
} else {
|
||||
if (!req.txtConfirm)
|
||||
req.txtConfirm = polyglot.t('btn_ok');
|
||||
req.removeCancel = true;
|
||||
}
|
||||
|
||||
confirmPopup(req);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user