|
|
@ -193,7 +193,11 @@ 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]];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
UI.addLoadingScreen = function (loadingText, hideTips) {
|
|
|
|
UI.addLoadingScreen = function (config) {
|
|
|
|
|
|
|
|
config = config || {};
|
|
|
|
|
|
|
|
var loadingText = config.loadingText;
|
|
|
|
|
|
|
|
var hideTips = config.hideTips;
|
|
|
|
|
|
|
|
var hideLogo = config.hideLogo;
|
|
|
|
var $loading, $container;
|
|
|
|
var $loading, $container;
|
|
|
|
if ($('#' + LOADING).length) {
|
|
|
|
if ($('#' + LOADING).length) {
|
|
|
|
$loading = $('#' + LOADING).show();
|
|
|
|
$loading = $('#' + LOADING).show();
|
|
|
@ -204,7 +208,9 @@ define([
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$loading = $('<div>', {id: LOADING});
|
|
|
|
$loading = $('<div>', {id: LOADING});
|
|
|
|
$container = $('<div>', {'class': 'loadingContainer'});
|
|
|
|
$container = $('<div>', {'class': 'loadingContainer'});
|
|
|
|
$container.append('<img class="cryptofist" src="/customize/cryptofist_small.png" />');
|
|
|
|
if (!hideLogo) {
|
|
|
|
|
|
|
|
$container.append('<img class="cryptofist" src="/customize/cryptofist_small.png" />');
|
|
|
|
|
|
|
|
}
|
|
|
|
var $spinner = $('<div>', {'class': 'spinnerContainer'});
|
|
|
|
var $spinner = $('<div>', {'class': 'spinnerContainer'});
|
|
|
|
UI.spinner($spinner).show();
|
|
|
|
UI.spinner($spinner).show();
|
|
|
|
var $text = $('<p>').text(loadingText || Messages.loading);
|
|
|
|
var $text = $('<p>').text(loadingText || Messages.loading);
|
|
|
@ -236,7 +242,7 @@ define([
|
|
|
|
// jquery.fadeout can get stuck
|
|
|
|
// jquery.fadeout can get stuck
|
|
|
|
};
|
|
|
|
};
|
|
|
|
UI.errorLoadingScreen = function (error, transparent) {
|
|
|
|
UI.errorLoadingScreen = function (error, transparent) {
|
|
|
|
if (!$('#' + LOADING).is(':visible')) { UI.addLoadingScreen(undefined, true); }
|
|
|
|
if (!$('#' + LOADING).is(':visible')) { UI.addLoadingScreen({hideTips: true}); }
|
|
|
|
$('.spinnerContainer').hide();
|
|
|
|
$('.spinnerContainer').hide();
|
|
|
|
if (transparent) { $('#' + LOADING).css('opacity', 0.8); }
|
|
|
|
if (transparent) { $('#' + LOADING).css('opacity', 0.8); }
|
|
|
|
$('#' + LOADING).find('p').html(error || Messages.error);
|
|
|
|
$('#' + LOADING).find('p').html(error || Messages.error);
|
|
|
|