diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/editor.js | 2 | ||||
-rw-r--r-- | js/listener.js | 1 | ||||
-rw-r--r-- | js/main.js | 16 | ||||
-rw-r--r-- | js/settings.js | 2 | ||||
-rw-r--r-- | js/viewer.js | 2 |
5 files changed, 10 insertions, 13 deletions
diff --git a/js/editor.js b/js/editor.js index 784e6fd..4509c6c 100644 --- a/js/editor.js +++ b/js/editor.js @@ -418,6 +418,6 @@ }); }; - $(document).ready(OCA.Onlyoffice.InitEditor); + OCA.Onlyoffice.InitEditor(); })(jQuery, OCA); diff --git a/js/listener.js b/js/listener.js index e56318c..840088b 100644 --- a/js/listener.js +++ b/js/listener.js @@ -26,7 +26,6 @@ OCA.Onlyoffice.onRequestClose = function () { $(OCA.Onlyoffice.frameSelector).remove(); - OCA.Onlyoffice.frameSelector = null; if (OCA.Viewer && OCA.Viewer.close) { OCA.Viewer.close(); @@ -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); diff --git a/js/settings.js b/js/settings.js index 7385535..ea1e9e8 100644 --- a/js/settings.js +++ b/js/settings.js @@ -200,7 +200,7 @@ var feedback = $("#onlyofficeFeedback").is(":checked"); var forcesave = $("#onlyofficeForcesave").is(":checked"); var help = $("#onlyofficeHelp").is(":checked"); - var toolbarNoTabs = !$("#onlyofficeToolbarNoTabs").is(":checked"); + var toolbarNoTabs = $("#onlyofficeToolbarNoTabs").is(":checked"); var reviewDisplay = $("input[type='radio'][name='reviewDisplay']:checked").attr("id").replace("onlyofficeReviewDisplay_", ""); $.ajax({ diff --git a/js/viewer.js b/js/viewer.js index e31a6ce..027af99 100644 --- a/js/viewer.js +++ b/js/viewer.js @@ -104,6 +104,6 @@ } }; - $(document).ready(initPage) + initPage(); })(OCA); |