diff options
author | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2018-01-24 10:23:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-24 10:23:59 +0300 |
commit | ca756a3603c923bb8ebe881df84c3baa651181c3 (patch) | |
tree | 2c29ce04f4508eea93186976a7a0b10ceb0a0fd4 /js/editor.js | |
parent | 7f2a61b5d9643cb63d22c414df34911cbd23c092 (diff) | |
parent | b28438611f3ccf78964bc83d664a7bcf11ecd307 (diff) |
Merge pull request #149 from ONLYOFFICE/developv1.2.0
Release/1.2.0
Diffstat (limited to 'js/editor.js')
-rw-r--r-- | js/editor.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/js/editor.js b/js/editor.js index 45585f3..9ca1b8e 100644 --- a/js/editor.js +++ b/js/editor.js @@ -32,18 +32,13 @@ }; } - OCA.Onlyoffice.OpenEditor = function (fileId, error) { - + OCA.Onlyoffice.InitEditor = function () { var displayError = function (error) { $("#iframeEditor").text(error).addClass("error"); }; - if (error.length) { - displayError(error) - return; - } - - if (!fileId.length) { + var fileId = $("#iframeEditor").data("id"); + if (!fileId) { displayError(t(OCA.Onlyoffice.AppName, "FileId is empty")); return; } @@ -93,4 +88,6 @@ }); }; + $(document).ready(OCA.Onlyoffice.InitEditor); + })(jQuery, OCA);
\ No newline at end of file |