diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2018-10-05 18:33:26 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-18 16:56:29 +0300 |
commit | 31d41ed25e61c91c2640dc620e355effaade5457 (patch) | |
tree | cc25dbb18bd1a7e7a1f786f2223c7c0d171870da /js | |
parent | 32edac2b92b4b81159589c5e7d1113857e43ff27 (diff) |
Show document overlay when document is fully loaded
We can avoid showing the toolbar / menubar during it's initialization.
Also avoid showing online own progress spinner.
Diffstat (limited to 'js')
-rw-r--r-- | js/documents.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/js/documents.js b/js/documents.js index 254003ef..31a949b1 100644 --- a/js/documents.js +++ b/js/documents.js @@ -429,8 +429,12 @@ var documentsMain = { var editorInitListener = function(e) { var msg = JSON.parse(e.data); if (msg.MessageId === 'App_LoadingStatus') { - documentsMain.wopiClientFeatures = msg.Values.Features; - window.removeEventListener('message', editorInitListener, false); + if (msg.Values.Status === "Frame_Ready" ) { + documentsMain.wopiClientFeatures = msg.Values.Features; + } else if (msg.Values.Status === "Document_Loaded" ) { + documentsMain.overlay.documentOverlay('hide'); + window.removeEventListener('message', editorInitListener, false); + } } }; window.addEventListener('message', editorInitListener, false); @@ -569,12 +573,6 @@ var documentsMain = { // Ask for all the participants documentsMain.WOPIPostMessage($('#loleafletframe')[0], 'Get_Views', {}); - - // LOOL Iframe is ready, turn off our overlay - // This should ideally be taken off when we receive App_LoadingStatus, but - // for backward compatibility with older lool, lets keep it here till we decide - // to break older lools - documentsMain.overlay.documentOverlay('hide'); }); // submit that |