From 0c55c3e91bce5008316e09aafb3202befdfb929c Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 25 Jan 2018 11:32:20 +0100 Subject: [PATCH] Enable onLocal --- www/onlyoffice/document/doc.js | 4 ++-- www/onlyoffice/document/inner.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/www/onlyoffice/document/doc.js b/www/onlyoffice/document/doc.js index bf4152578..c329af169 100644 --- a/www/onlyoffice/document/doc.js +++ b/www/onlyoffice/document/doc.js @@ -13,8 +13,8 @@ config = { } }, "events": { - "onDocumentStateChange": function(evt) { console.log("in change"); window.top.APP.onLocal(); }, - "onReady": function(evt) { console.log("in onReady"); window.top.onOOReady(); } + "onDocumentStateChange": function(evt) { console.log("in change"); window.parent.APP.onLocal(); }, + "onReady": function(evt) { console.log("in onReady"); window.parent.onOOReady(); } } }; diff --git a/www/onlyoffice/document/inner.js b/www/onlyoffice/document/inner.js index 7a422bc68..af554c730 100644 --- a/www/onlyoffice/document/inner.js +++ b/www/onlyoffice/document/inner.js @@ -76,7 +76,6 @@ define([ var loadDocument = APP.loadDocument = function (content, file) { console.log("Read " + content); - return; window.frames[0].frames[0].editor.asc_CloseFile(); var openResult = {bSerFormat: true, data: content, url: "http://localhost:3000/onlyoffice/", changes: null}; window.frames[0].frames[0].editor.openDocument(openResult);