Browse Source

replace window.confirm() with confirmPopup() for 'switch to network.html' confirmation

readme-update
Simon Grim 9 years ago
parent
commit
c4a5b6f98c
  1. 7
      js/interface_common.js
  2. 16
      login.html

7
js/interface_common.js

@ -136,9 +136,10 @@ function confirmPopup(event, req) { @@ -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

@ -90,6 +90,22 @@ @@ -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">&times;</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…
Cancel
Save