diff options
Diffstat (limited to 'js/main.js')
-rw-r--r-- | js/main.js | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -140,6 +140,8 @@ }; OCA.Onlyoffice.CloseEditor = function () { + OCA.Onlyoffice.frameSelector = null; + $("body").removeClass("onlyoffice-inline"); $("#onlyofficeHeader").remove(); @@ -151,9 +153,7 @@ OCA.Onlyoffice.folderUrl = null; } - if (OCA.Versions) { - OCA.Onlyoffice.bindVersionClick(); - } + OCA.Onlyoffice.bindVersionClick(); }; OCA.Onlyoffice.OpenShareDialog = function () { @@ -364,14 +364,14 @@ var button = document.createElement("a"); button.href = OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/s/" + encodeURIComponent($("#sharingToken").val())); - button.className = "button"; + button.className = "onlyoffice-public-open button"; button.innerText = t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE") if (!OCA.Onlyoffice.setting.sameTab) { button.target = "_blank"; } - $("#preview").append(button); + $("#preview").prepend(button); }; OCA.Onlyoffice.GetSettings(initSharedButton); @@ -379,12 +379,10 @@ OC.Plugins.register("OCA.Files.FileList", OCA.Onlyoffice.FileList); OC.Plugins.register("OCA.Files.NewFileMenu", OCA.Onlyoffice.NewFileMenu); - if (OCA.Versions) { - OCA.Onlyoffice.bindVersionClick(); - } + OCA.Onlyoffice.bindVersionClick(); } }; - $(document).ready(initPage); + initPage(); })(OCA); |