From 975bff5794839cc5867f687f281336561d5a4287 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 4 Aug 2016 12:43:06 +0200 Subject: [PATCH] show a spinner until the document has loaded --- www/code/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/code/main.js b/www/code/main.js index 350c7c6d4..f284c8ae8 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -19,9 +19,14 @@ define([ ], function (Config, /*RTCode,*/ Messages, Crypto, Realtime, TextPatcher, Toolbar, JSONSortify, JsonOT, Cryptpad, Modes, Themes, Visible, Notify) { var $ = window.jQuery; var saveAs = window.saveAs; + var module = window.APP = { Cryptpad: Cryptpad, + spinner: Cryptpad.spinner(document.body), }; + + module.spinner.show(); + var ifrw = module.ifrw = $('#pad-iframe')[0].contentWindow; var stringify = function (obj) { return JSONSortify(obj); @@ -503,7 +508,7 @@ define([ }); } - + $(module.spinner.get().el).fadeOut(750); setEditable(true); initializing = false; //Cryptpad.log("Your document is ready");