зеркало из https://github.com/mozilla/buddyup.git
Bug 1135595 - Warn the user when they are offline
This commit is contained in:
Родитель
55dd793c42
Коммит
e6259df28b
|
@ -21,6 +21,11 @@
|
|||
});
|
||||
}
|
||||
|
||||
var generic_msg = generic_error.querySelector('.js-generic-msg');
|
||||
var offline_msg = generic_error.querySelector('.js-offline-msg');
|
||||
generic_msg.classList.toggle('hide', !navigator.onLine);
|
||||
offline_msg.classList.toggle('hide', navigator.onLine);
|
||||
|
||||
generic_error.classList.remove('hide');
|
||||
});
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ var lineno = null;
|
|||
var colno = null;
|
||||
var output = "";
|
||||
try {
|
||||
output += "<form id=\"generic_error\" role=\"dialog\" data-type=\"confirm\">\n <section>\n <h1>Whoops!</h1>\n <p>There was a problem with Buddy Up, please try again.</p>\n </section>\n <menu>\n <button class=\"recommend\">OK</button>\n </menu>\n</form>\n";
|
||||
output += "<form id=\"generic_error\" role=\"dialog\" data-type=\"confirm\">\n <section>\n <h1>Whoops!</h1>\n <p class=\"js-generic-msg hide\">There was a problem with Buddy Up, please try again.</p>\n <p class=\"js-offline-msg hide\">You are not online, please check your connection.</p>\n </section>\n <menu>\n <button class=\"recommend\">OK</button>\n </menu>\n</form>\n";
|
||||
cb(null, output);
|
||||
;
|
||||
} catch (e) {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<form id="generic_error" role="dialog" data-type="confirm">
|
||||
<section>
|
||||
<h1>Whoops!</h1>
|
||||
<p>There was a problem with Buddy Up, please try again.</p>
|
||||
<p class="js-generic-msg hide">There was a problem with Buddy Up, please try again.</p>
|
||||
<p class="js-offline-msg hide">You are not online, please check your connection.</p>
|
||||
</section>
|
||||
<menu>
|
||||
<button class="recommend">OK</button>
|
||||
|
|
Загрузка…
Ссылка в новой задаче