mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-14 17:07:53 +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) {
|
function alertPopup(req) {
|
||||||
if (!req) return;
|
if (!req) return;
|
||||||
|
|
||||||
|
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)
|
if (!req.txtConfirm)
|
||||||
req.txtConfirm = polyglot.t('btn_ok');
|
req.txtConfirm = polyglot.t('btn_ok');
|
||||||
req.removeCancel = true;
|
req.removeCancel = true;
|
||||||
|
}
|
||||||
|
|
||||||
confirmPopup(req);
|
confirmPopup(req);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user