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.
This commit is contained in:
Tamás Zolnai 2018-10-05 17:33:26 +02:00 коммит произвёл Roeland Jago Douma
Родитель 32edac2b92
Коммит 31d41ed25e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: F941078878347C0C
1 изменённых файлов: 6 добавлений и 8 удалений

Просмотреть файл

@ -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