|
|
@ -66,7 +66,8 @@ function closeModalHandler(classBase) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function confirmPopup(event, req) { |
|
|
|
function confirmPopup(event, req) { |
|
|
|
event.stopPropagation(); |
|
|
|
if (event && event.stopPropagation) |
|
|
|
|
|
|
|
event.stopPropagation(); |
|
|
|
|
|
|
|
|
|
|
|
var modal = openModal({ |
|
|
|
var modal = openModal({ |
|
|
|
classBase: '.prompt-wrapper', |
|
|
|
classBase: '.prompt-wrapper', |
|
|
@ -79,30 +80,57 @@ function confirmPopup(event, req) { |
|
|
|
modal.content.find('.message').text(req.messageTxt); |
|
|
|
modal.content.find('.message').text(req.messageTxt); |
|
|
|
|
|
|
|
|
|
|
|
var btn = modal.content.find('.confirm'); |
|
|
|
var btn = modal.content.find('.confirm'); |
|
|
|
if (req.confirmTxt) |
|
|
|
if (req.removeConfirm) |
|
|
|
btn.text(req.confirmTxt); |
|
|
|
btn.remove(); |
|
|
|
else |
|
|
|
else { |
|
|
|
btn.text(polyglot.t('Confirm')); |
|
|
|
if (req.confirmTxt) |
|
|
|
if (req.confirmFunc) { |
|
|
|
btn.text(req.confirmTxt); |
|
|
|
btn.on('click', function () { |
|
|
|
else |
|
|
|
closePrompt(); |
|
|
|
btn.text(polyglot.t('Confirm')); |
|
|
|
req.confirmFunc(req.confirmFuncArgs); |
|
|
|
if (req.confirmFunc) { |
|
|
|
}); |
|
|
|
btn.on('click', function () { |
|
|
|
} else |
|
|
|
closePrompt(); |
|
|
|
btn.on('click', closePrompt); |
|
|
|
req.confirmFunc(req.confirmFuncArgs); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
btn.on('click', closePrompt); |
|
|
|
|
|
|
|
} |
|
|
|
var btn = modal.content.find('.cancel'); |
|
|
|
var btn = modal.content.find('.cancel'); |
|
|
|
if (req.cancelTxt) |
|
|
|
if (req.removeCancel) |
|
|
|
btn.text(req.cancelTxt); |
|
|
|
btn.remove(); |
|
|
|
else |
|
|
|
else { |
|
|
|
btn.text(polyglot.t('Cancel')); |
|
|
|
if (req.cancelTxt) |
|
|
|
if (req.cancelFunc) { |
|
|
|
btn.text(req.cancelTxt); |
|
|
|
btn.on('click', function () { |
|
|
|
else |
|
|
|
closePrompt(); |
|
|
|
btn.text(polyglot.t('Cancel')); |
|
|
|
req.cancelFunc(req.cancelFuncArgs); |
|
|
|
if (req.cancelFunc) { |
|
|
|
}); |
|
|
|
btn.on('click', function () { |
|
|
|
} else |
|
|
|
closePrompt(); |
|
|
|
btn.on('click', closePrompt); |
|
|
|
req.cancelFunc(req.cancelFuncArgs); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
btn.on('click', closePrompt); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var btn = modal.self.find('.prompt-close'); |
|
|
|
|
|
|
|
if (req.removeClose) |
|
|
|
|
|
|
|
btn.remove(); |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
if (req.closeFunc) { |
|
|
|
|
|
|
|
if (typeof req.closeFunc === 'string') { |
|
|
|
|
|
|
|
if (req.closeFunc === 'confirmFunc') { |
|
|
|
|
|
|
|
req.closeFunc = req.confirmFunc; |
|
|
|
|
|
|
|
req.closeFuncArgs = req.confirmFuncArgs; |
|
|
|
|
|
|
|
} else if (req.closeFunc === 'cancelFunc') { |
|
|
|
|
|
|
|
req.closeFunc = req.cancelFunc; |
|
|
|
|
|
|
|
req.closeFuncArgs = req.cancelFuncArgs; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
btn.on('click', function () { |
|
|
|
|
|
|
|
closePrompt(); |
|
|
|
|
|
|
|
req.closeFunc(req.closeFuncArgs); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) { |
|
|
|
function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) { |
|
|
|