make alertPopup() available to use on events

This commit is contained in:
Simon Grim 2016-02-15 01:05:24 +05:00
parent 702bfd0f96
commit fae9122cf7

View File

@ -338,9 +338,16 @@ function confirmPopup(req) {
function alertPopup(req) {
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)
req.txtConfirm = polyglot.t('btn_ok');
req.removeCancel = true;
}
confirmPopup(req);
}