diff --git a/customize.dist/main.js b/customize.dist/main.js index 2a7f2b663..5ac45af3a 100644 --- a/customize.dist/main.js +++ b/customize.dist/main.js @@ -116,7 +116,7 @@ define([ $('button.login').click(function () { // setTimeout 100ms to remove the keyboard on mobile devices before the loading screen pops up window.setTimeout(function () { - Cryptpad.addLoadingScreen(Messages.login_hashing); + Cryptpad.addLoadingScreen({loadingText: Messages.login_hashing}); // We need a setTimeout(cb, 0) otherwise the loading screen is only displayed after hashing the password window.setTimeout(function () { loginReady(function () { diff --git a/www/common/common-interface.js b/www/common/common-interface.js index cfbca28ad..745a2b5aa 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -193,7 +193,11 @@ define([ var rdm = Math.floor(Math.random() * keys.length); 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; if ($('#' + LOADING).length) { $loading = $('#' + LOADING).show(); @@ -204,7 +208,9 @@ define([ } else { $loading = $('
').text(loadingText || Messages.loading); @@ -236,7 +242,7 @@ define([ // jquery.fadeout can get stuck }; UI.errorLoadingScreen = function (error, transparent) { - if (!$('#' + LOADING).is(':visible')) { UI.addLoadingScreen(undefined, true); } + if (!$('#' + LOADING).is(':visible')) { UI.addLoadingScreen({hideTips: true}); } $('.spinnerContainer').hide(); if (transparent) { $('#' + LOADING).css('opacity', 0.8); } $('#' + LOADING).find('p').html(error || Messages.error); diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 08b2d3e56..6b07380ed 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -603,7 +603,7 @@ define([ e.preventDefault(); var parsed = parsePadUrl(t.href); if(!parsed) { throw new Error("Cannot get template hash"); } - common.addLoadingScreen(null, true); + common.addLoadingScreen({hideTips: true}); Crypt.get(parsed.hash, function (err, val) { if (err) { throw new Error(err); } var p = parsePadUrl(window.location.href); diff --git a/www/common/fsStore.js b/www/common/fsStore.js index 54fb2e23e..50aef3573 100644 --- a/www/common/fsStore.js +++ b/www/common/fsStore.js @@ -274,7 +274,7 @@ define([ } }); Cryptpad.logout(); - Cryptpad.addLoadingScreen(undefined, true); + Cryptpad.addLoadingScreen({hideTips: true}); Cryptpad.errorLoadingScreen(Cryptpad.Messages.onLogout, true); if (exp.info) { exp.info.network.disconnect(); diff --git a/www/common/sframe-common-interface.js b/www/common/sframe-common-interface.js index 7e35c504d..459991e1c 100644 --- a/www/common/sframe-common-interface.js +++ b/www/common/sframe-common-interface.js @@ -280,7 +280,7 @@ define([ var fileDialogCfg = { onSelect: function (data) { if (data.type === type && first) { - Cryptpad.addLoadingScreen(null, true); + Cryptpad.addLoadingScreen({hideTips: true}); var sframeChan = common.getSframeChannel(); sframeChan.query('Q_TEMPLATE_USE', data.href, function () { first = false; diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index f95855caa..1cecf279b 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -272,6 +272,7 @@ define([ FP.$iframe.show(); FP.picker.refresh(types); } + FP.$iframe.focus(); }; sframeChan.on('EV_FILE_PICKER_OPEN', function (data) { initFilePicker(data); diff --git a/www/filepicker/inner.html b/www/filepicker/inner.html index 9214fa2b1..bad6fb1b0 100644 --- a/www/filepicker/inner.html +++ b/www/filepicker/inner.html @@ -17,6 +17,9 @@ body #loading .loadingContainer { margin-top: 35vh; } + body #loading .cryptofist { + display: none; + }
diff --git a/www/filepicker/inner.js b/www/filepicker/inner.js index fe84ccfc1..a1b5fa9d6 100644 --- a/www/filepicker/inner.js +++ b/www/filepicker/inner.js @@ -161,7 +161,7 @@ define([ nThen(function (waitFor) { $(waitFor(function () { - Cryptpad.addLoadingScreen(null, true); + Cryptpad.addLoadingScreen({hideTips: true, hideLogo: true}); })); SFCommon.create(waitFor(function (c) { APP.common = common = c; })); }).nThen(function (/*waitFor*/) { diff --git a/www/login/main.js b/www/login/main.js index 964e2a540..7d0a21036 100644 --- a/www/login/main.js +++ b/www/login/main.js @@ -72,7 +72,7 @@ define([ // setTimeout 100ms to remove the keyboard on mobile devices before the loading screen pops up window.setTimeout(function () { - Cryptpad.addLoadingScreen(Messages.login_hashing); + Cryptpad.addLoadingScreen({loadingText: Messages.login_hashing}); // We need a setTimeout(cb, 0) otherwise the loading screen is only displayed after hashing the password window.setTimeout(function () { loginReady(function () { diff --git a/www/register/main.js b/www/register/main.js index 2d4a3a5cc..f01a4ef8d 100644 --- a/www/register/main.js +++ b/www/register/main.js @@ -128,7 +128,7 @@ define([ registering = true; // setTimeout 100ms to remove the keyboard on mobile devices before the loading screen pops up window.setTimeout(function () { - Cryptpad.addLoadingScreen(Messages.login_hashing); + Cryptpad.addLoadingScreen({loadingText: Messages.login_hashing}); // We need a setTimeout(cb, 0) otherwise the loading screen is only displayed after hashing the password window.setTimeout(function () { Login.loginOrRegister(uname, passwd, true, function (err, result) {