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) {
function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) { function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) {
networkUpdate(function(args) { networkUpdate(function(args) {
if (!twisterdConnectedAndUptodate) { if (!twisterdConnectedAndUptodate) {
var redirect = window.confirm(polyglot.t('switch_to_network')); confirmPopup(null, {
if (redirect) messageTxt: polyglot.t('switch_to_network'),
$.MAL.goNetwork(); confirmFunc: $.MAL.goNetwork
});
} else { } else {
if (args.cbFunc) if (args.cbFunc)
args.cbFunc(args.cbArg); args.cbFunc(args.cbArg);

16
login.html

@ -90,6 +90,22 @@
</div> </div>
<!-- TEMPLATE DO MODAL GENÉRICO END --> <!-- 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 --> <!-- MODAL DE NEW USER INIT -->
<div id="new-user-modal-template"> <div id="new-user-modal-template">
<div class="warning"> <div class="warning">

Loading…
Cancel
Save