mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-03-12 05:21:18 +00:00
replace window.confirm() with confirmPopup() for 'switch to network.html' confirmation
This commit is contained in:
parent
1a8b4ea22c
commit
c4a5b6f98c
@ -136,9 +136,10 @@ function confirmPopup(event, req) {
|
||||
function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) {
|
||||
networkUpdate(function(args) {
|
||||
if (!twisterdConnectedAndUptodate) {
|
||||
var redirect = window.confirm(polyglot.t('switch_to_network'));
|
||||
if (redirect)
|
||||
$.MAL.goNetwork();
|
||||
confirmPopup(null, {
|
||||
messageTxt: polyglot.t('switch_to_network'),
|
||||
confirmFunc: $.MAL.goNetwork
|
||||
});
|
||||
} else {
|
||||
if (args.cbFunc)
|
||||
args.cbFunc(args.cbArg);
|
||||
|
16
login.html
16
login.html
@ -90,6 +90,22 @@
|
||||
</div>
|
||||
<!-- TEMPLATE DO MODAL GENÉRICO END -->
|
||||
|
||||
<div class="prompt-wrapper">
|
||||
<div class="modal-header">
|
||||
<h3></h3>
|
||||
<span class="modal-close prompt-close">×</span>
|
||||
</div>
|
||||
<div class="modal-content"></div>
|
||||
</div>
|
||||
|
||||
<div id="confirm-popup-template">
|
||||
<div class="message"></div>
|
||||
<div class="modal-buttons">
|
||||
<button class="confirm"></button>
|
||||
<button class="cancel"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- MODAL DE NEW USER INIT -->
|
||||
<div id="new-user-modal-template">
|
||||
<div class="warning">
|
||||
|
Loading…
x
Reference in New Issue
Block a user