don't show usage tips on error screens
This commit is contained in:
@@ -881,7 +881,7 @@ define([
|
|||||||
var rdm = Math.floor(Math.random() * keys.length);
|
var rdm = Math.floor(Math.random() * keys.length);
|
||||||
return Messages.tips[keys[rdm]];
|
return Messages.tips[keys[rdm]];
|
||||||
};
|
};
|
||||||
common.addLoadingScreen = function (loadingText) {
|
common.addLoadingScreen = function (loadingText, hideTips) {
|
||||||
var $loading, $container;
|
var $loading, $container;
|
||||||
if ($('#' + LOADING).length) {
|
if ($('#' + LOADING).length) {
|
||||||
$loading = $('#' + LOADING).show();
|
$loading = $('#' + LOADING).show();
|
||||||
@@ -900,7 +900,7 @@ define([
|
|||||||
$loading.append($container);
|
$loading.append($container);
|
||||||
$('body').append($loading);
|
$('body').append($loading);
|
||||||
}
|
}
|
||||||
if (Messages.tips) {
|
if (Messages.tips && !hideTips) {
|
||||||
var $loadingTip = $('<div>', {'id': 'loadingTip'});
|
var $loadingTip = $('<div>', {'id': 'loadingTip'});
|
||||||
var $tip = $('<span>', {'class': 'tips'}).text(getRandomTip()).appendTo($loadingTip);
|
var $tip = $('<span>', {'class': 'tips'}).text(getRandomTip()).appendTo($loadingTip);
|
||||||
$loadingTip.css({
|
$loadingTip.css({
|
||||||
@@ -917,10 +917,10 @@ define([
|
|||||||
}, 3000);
|
}, 3000);
|
||||||
};
|
};
|
||||||
common.errorLoadingScreen = function (error, transparent) {
|
common.errorLoadingScreen = function (error, transparent) {
|
||||||
if (!$('#' + LOADING).is(':visible')) { common.addLoadingScreen(); }
|
if (!$('#' + LOADING).is(':visible')) { common.addLoadingScreen(undefined, true); }
|
||||||
$('.spinnerContainer').hide();
|
$('.spinnerContainer').hide();
|
||||||
if (transparent) { $('#' + LOADING).css('opacity', 0.8); }
|
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.logout();
|
||||||
Cryptpad.addLoadingScreen();
|
Cryptpad.addLoadingScreen(undefined, true);
|
||||||
Cryptpad.errorLoadingScreen(Cryptpad.Messages.onLogout, true);
|
Cryptpad.errorLoadingScreen(Cryptpad.Messages.onLogout, true);
|
||||||
if (exp.info) {
|
if (exp.info) {
|
||||||
exp.info.network.disconnect();
|
exp.info.network.disconnect();
|
||||||
|
|||||||
Reference in New Issue
Block a user