Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ONLYOFFICE/onlyoffice-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/main.js')
-rw-r--r--js/main.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/js/main.js b/js/main.js
index 8fe6f0a..c4428e6 100644
--- a/js/main.js
+++ b/js/main.js
@@ -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);