diff --git a/CHANGELOG.md b/CHANGELOG.md
index 839e70b0..38fe5dd9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Change Log
+## 6.4.3
+## Changed
+- fixed registration of file actions
+
## 6.4.1
## Added
- create file from editor
diff --git a/appinfo/info.xml b/appinfo/info.xml
index 4acf5221..69f7d43d 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -6,7 +6,7 @@
ONLYOFFICE connector allows you to view, edit and collaborate on text documents, spreadsheets and presentations within ownCloud using ONLYOFFICE Docs. This will create a new Edit in ONLYOFFICE action within the document library for Office documents. This allows multiple users to co-author documents in real time from the familiar web interface and save the changes back to your file storage.
apl2
Ascensio System SIA
- 6.4.1
+ 6.4.3
Onlyoffice
diff --git a/js/main.js b/js/main.js
index cc940d00..6cb7138e 100644
--- a/js/main.js
+++ b/js/main.js
@@ -208,47 +208,41 @@
}
};
- OCA.Onlyoffice.FileList = {
- attach: function (fileList) {
- if (fileList.id == "trashbin") {
- return;
- }
+ OCA.Onlyoffice.registerAction = function () {
+ var register = function () {
+ var formats = OCA.Onlyoffice.setting.formats;
- var register = function () {
- var formats = OCA.Onlyoffice.setting.formats;
+ $.each(formats, function (ext, config) {
+ if (!config.mime) {
+ return true;
+ }
+ OCA.Files.fileActions.registerAction({
+ name: "onlyofficeOpen",
+ displayName: t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE"),
+ mime: config.mime,
+ permissions: OC.PERMISSION_READ,
+ iconClass: "icon-onlyoffice-open",
+ actionHandler: OCA.Onlyoffice.FileClick
+ });
- $.each(formats, function (ext, config) {
- if (!config.mime) {
- return true;
- }
+ if (config.def) {
+ OCA.Files.fileActions.setDefault(config.mime, "onlyofficeOpen");
+ }
+
+ if (config.conv) {
OCA.Files.fileActions.registerAction({
- name: "onlyofficeOpen",
- displayName: t(OCA.Onlyoffice.AppName, "Open in ONLYOFFICE"),
+ name: "onlyofficeConvert",
+ displayName: t(OCA.Onlyoffice.AppName, "Convert with ONLYOFFICE"),
mime: config.mime,
- permissions: OC.PERMISSION_READ,
- iconClass: "icon-onlyoffice-open",
- actionHandler: OCA.Onlyoffice.FileClick
+ permissions: ($("#isPublic").val() ? OC.PERMISSION_UPDATE : OC.PERMISSION_READ),
+ iconClass: "icon-onlyoffice-convert",
+ actionHandler: OCA.Onlyoffice.FileConvertClick
});
-
- if (config.def) {
- OCA.Files.fileActions.setDefault(config.mime, "onlyofficeOpen");
- }
-
- if (config.conv) {
- OCA.Files.fileActions.registerAction({
- name: "onlyofficeConvert",
- displayName: t(OCA.Onlyoffice.AppName, "Convert with ONLYOFFICE"),
- mime: config.mime,
- permissions: ($("#isPublic").val() ? OC.PERMISSION_UPDATE : OC.PERMISSION_READ),
- iconClass: "icon-onlyoffice-convert",
- actionHandler: OCA.Onlyoffice.FileConvertClick
- });
- }
- });
- }
-
- OCA.Onlyoffice.GetSettings(register);
+ }
+ });
}
+
+ OCA.Onlyoffice.GetSettings(register);
};
OCA.Onlyoffice.NewFileMenu = {
@@ -378,9 +372,10 @@
OCA.Onlyoffice.GetSettings(initSharedButton);
} else {
- OC.Plugins.register("OCA.Files.FileList", OCA.Onlyoffice.FileList);
OC.Plugins.register("OCA.Files.NewFileMenu", OCA.Onlyoffice.NewFileMenu);
+ OCA.Onlyoffice.registerAction();
+
OCA.Onlyoffice.bindVersionClick();
if (OCA.Onlyoffice.Share) {