Merge pull request #291 from nextcloud/mobile/get_notified_when_doc_is_loaded
Notify clients when the document is fully loaded
This commit is contained in:
Коммит
d09fa8b758
|
@ -436,6 +436,19 @@ var documentsMain = {
|
|||
} else if (msg.Values.Status === "Document_Loaded" ) {
|
||||
documentsMain.overlay.documentOverlay('hide');
|
||||
window.removeEventListener('message', editorInitListener, false);
|
||||
|
||||
// Forward to mobile handler
|
||||
if (window.RichDocumentsMobileInterface) {
|
||||
window.RichDocumentsMobileInterface.documentLoaded();
|
||||
}
|
||||
|
||||
// iOS webkit fallback
|
||||
if (window.webkit
|
||||
&& window.webkit.messageHandlers
|
||||
&& window.webkit.messageHandlers.RichDocumentsMobileInterface) {
|
||||
window.webkit.messageHandlers.RichDocumentsMobileInterface.postMessage('documentLoaded');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче