don't show usage tips on error screens

pull/1/head
ansuz 8 years ago
parent 0a6373852e
commit 298725b3c2

@ -881,7 +881,7 @@ define([
var rdm = Math.floor(Math.random() * keys.length);
return Messages.tips[keys[rdm]];
};
common.addLoadingScreen = function (loadingText) {
common.addLoadingScreen = function (loadingText, hideTips) {
var $loading, $container;
if ($('#' + LOADING).length) {
$loading = $('#' + LOADING).show();
@ -900,7 +900,7 @@ define([
$loading.append($container);
$('body').append($loading);
}
if (Messages.tips) {
if (Messages.tips && !hideTips) {
var $loadingTip = $('<div>', {'id': 'loadingTip'});
var $tip = $('<span>', {'class': 'tips'}).text(getRandomTip()).appendTo($loadingTip);
$loadingTip.css({
@ -917,10 +917,10 @@ define([
}, 3000);
};
common.errorLoadingScreen = function (error, transparent) {
if (!$('#' + LOADING).is(':visible')) { common.addLoadingScreen(); }
if (!$('#' + LOADING).is(':visible')) { common.addLoadingScreen(undefined, true); }
$('.spinnerContainer').hide();
if (transparent) { $('#' + LOADING).css('opacity', 0.8); }
$('#' + LOADING).find('p').text(error || Messages.error);
$('#' + LOADING).find('p').html(error || Messages.error);
};
/*

@ -188,7 +188,7 @@ define([
}
});
Cryptpad.logout();
Cryptpad.addLoadingScreen();
Cryptpad.addLoadingScreen(undefined, true);
Cryptpad.errorLoadingScreen(Cryptpad.Messages.onLogout, true);
if (exp.info) {
exp.info.network.disconnect();

Loading…
Cancel
Save