Skip to content

Commit

Permalink
Merge branch 'develop' into feature/create-pdf-from-docxf
Browse files Browse the repository at this point in the history
  • Loading branch information
rivexe committed Feb 19, 2024
2 parents bb5992f + f7f5eff commit d2e7650
Show file tree
Hide file tree
Showing 33 changed files with 20 additions and 107 deletions.
27 changes: 14 additions & 13 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@

OCA.Onlyoffice.FileClick = function (fileName, context) {
var fileInfoModel = context.fileInfoModel || context.fileList.getModelForFile(fileName);
var fileId = context.$file[0].dataset.id || fileInfoModel.id;
var fileId = context.$file && context.$file[0].dataset.id || fileInfoModel.id;
var winEditor = !fileInfoModel && !OCA.Onlyoffice.setting.sameTab ? document : null;

OCA.Onlyoffice.OpenEditor(fileId, context.dir, fileName, 0, winEditor);
Expand All @@ -185,9 +185,10 @@
OCA.Onlyoffice.FileConvertClick = function (fileName, context) {
var fileInfoModel = context.fileInfoModel || context.fileList.getModelForFile(fileName);
var fileList = context.fileList;
var fileId = context.$file ? context.$file[0].dataset.id : fileInfoModel.id;

var convertData = {
fileId: context.$file[0].dataset.id || fileInfoModel.id
fileId: fileId
};

if ($("#isPublic").val()) {
Expand Down Expand Up @@ -284,7 +285,7 @@
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
];

OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Create new Form template"),
OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Create new PDF form"),
function (filePath) {
OCA.Onlyoffice.CreateFile(name, fileList, 0, filePath);
},
Expand Down Expand Up @@ -329,7 +330,7 @@
if (!config.mime) {
return true;
}

let mimeTypes = config.mime;
mimeTypes.forEach((mime) => {
OCA.Files.fileActions.registerAction({
Expand All @@ -340,11 +341,11 @@
iconClass: "icon-onlyoffice-open",
actionHandler: OCA.Onlyoffice.FileClick
});

if (config.def) {
OCA.Files.fileActions.setDefault(mime, "onlyofficeOpen");
}

if (config.conv) {
OCA.Files.fileActions.registerAction({
name: "onlyofficeConvert",
Expand All @@ -355,7 +356,7 @@
actionHandler: OCA.Onlyoffice.FileConvertClick
});
}

if (config.fillForms) {
OCA.Files.fileActions.registerAction({
name: "onlyofficeFill",
Expand All @@ -366,7 +367,7 @@
actionHandler: OCA.Onlyoffice.FileClick
});
}

if (config.createForm) {
OCA.Files.fileActions.registerAction({
name: "onlyofficeCreateForm",
Expand All @@ -377,7 +378,7 @@
actionHandler: OCA.Onlyoffice.CreateFormClick
});
}

if (config.saveas && !$("#isPublic").val()) {
OCA.Files.fileActions.registerAction({
name: "onlyofficeDownload",
Expand Down Expand Up @@ -450,8 +451,8 @@

menu.addMenuEntry({
id: "onlyofficeDocxf",
displayName: t(OCA.Onlyoffice.AppName, "Form template"),
templateName: t(OCA.Onlyoffice.AppName, "Form template"),
displayName: t(OCA.Onlyoffice.AppName, "PDF form"),
templateName: t(OCA.Onlyoffice.AppName, "PDF form"),
iconClass: "icon-onlyoffice-new-docxf",
fileType: "docxf",
actionHandler: function (name) {
Expand All @@ -462,8 +463,8 @@
if (!$("#isPublic").val()) {
menu.addMenuEntry({
id: "onlyofficeDocxfExist",
displayName: t(OCA.Onlyoffice.AppName, "Form template from existing text file"),
templateName: t(OCA.Onlyoffice.AppName, "Form template from existing text file"),
displayName: t(OCA.Onlyoffice.AppName, "PDF form from existing text file"),
templateName: t(OCA.Onlyoffice.AppName, "PDF form from existing text file"),
iconClass: "icon-onlyoffice-new-docxf",
fileType: "docxf",
actionHandler: function (name) {
Expand Down
3 changes: 0 additions & 3 deletions l10n/bg_BG.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ OC.L10N.register(
"Notification sent successfully": "Успешно изпратено известие",
"%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s, Ви спомена във %2\$s: \"%3\$s\".",
"Choose a format to convert {fileName}": "Изберете формат за конвертиране {fileName}",
"Form template": "Шаблон на формуляр",
"Form template from existing text file": "Шаблон на формуляр от съществуващ текстов файл",
"Create form": "Създайте формуляр",
"Fill in form in ONLYOFFICE": "Попълнете формуляр в ONLYOFFICE",
"Create new Form template": "Създайте нов шаблон на формуляр",
"Security": "Сигурност",
"Light": "Светла",
"Classic Light": "Класически светла",
Expand Down
3 changes: 0 additions & 3 deletions l10n/bg_BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@
"Notification sent successfully": "Успешно изпратено известие",
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s, Ви спомена във %2$s: \"%3$s\".",
"Choose a format to convert {fileName}": "Изберете формат за конвертиране {fileName}",
"Form template": "Шаблон на формуляр",
"Form template from existing text file": "Шаблон на формуляр от съществуващ текстов файл",
"Create form": "Създайте формуляр",
"Fill in form in ONLYOFFICE": "Попълнете формуляр в ONLYOFFICE",
"Create new Form template": "Създайте нов шаблон на формуляр",
"Security": "Сигурност",
"Light": "Светла",
"Classic Light": "Класически светла",
Expand Down
3 changes: 0 additions & 3 deletions l10n/ca.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ OC.L10N.register(
"Notification sent successfully": "Notificació enviada correctament",
"%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s ha esmentat en %2\$s: \"%3\$s\".",
"Choose a format to convert {fileName}": "Triï un format per a convertir {fileName}",
"Form template": "Plantilla de formulari",
"Form template from existing text file": "Plantilla de formulari d'un fitxer de text existent",
"Create form": "Crear formulari",
"Fill in form in ONLYOFFICE": "Omplir el formulari en ONLYOFFICE",
"Create new Form template": "Crear nova plantilla de formulari",
"Security": "Seguretat",
"Light": "Llum",
"Classic Light": "Llum clàssica",
Expand Down
3 changes: 0 additions & 3 deletions l10n/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@
"Notification sent successfully": "Notificació enviada correctament",
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s ha esmentat en %2$s: \"%3$s\".",
"Choose a format to convert {fileName}": "Triï un format per a convertir {fileName}",
"Form template": "Plantilla de formulari",
"Form template from existing text file": "Plantilla de formulari d'un fitxer de text existent",
"Create form": "Crear formulari",
"Fill in form in ONLYOFFICE": "Omplir el formulari en ONLYOFFICE",
"Create new Form template": "Crear nova plantilla de formulari",
"Security": "Seguretat",
"Light": "Llum",
"Classic Light": "Llum clàssica",
Expand Down
3 changes: 0 additions & 3 deletions l10n/da.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ OC.L10N.register(
"Notification sent successfully": "Meddelelse sendt",
"%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s nævnt i %2\$s: \"%3\$s\".",
"Choose a format to convert {fileName}": "Vælg et format til at konvertere {fileName}",
"Form template": "Formularskabelon",
"Form template from existing text file": "Formularskabelon fra eksisterende tekstfil",
"Create form": "Opret formular",
"Fill in form in ONLYOFFICE": "Udfyld formularen i ONLYOFFICE",
"Create new Form template": "Opret ny formularskabelon",
"Security": "Sikkerhed",
"Run document macros": "Kør dokumentmakroer",
"Default editor theme": "Standard editortema",
Expand Down
3 changes: 0 additions & 3 deletions l10n/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@
"Notification sent successfully": "Meddelelse sendt",
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s nævnt i %2$s: \"%3$s\".",
"Choose a format to convert {fileName}": "Vælg et format til at konvertere {fileName}",
"Form template": "Formularskabelon",
"Form template from existing text file": "Formularskabelon fra eksisterende tekstfil",
"Create form": "Opret formular",
"Fill in form in ONLYOFFICE": "Udfyld formularen i ONLYOFFICE",
"Create new Form template": "Opret ny formularskabelon",
"Security": "Sikkerhed",
"Run document macros": "Kør dokumentmakroer",
"Default editor theme": "Standard editortema",
Expand Down
3 changes: 0 additions & 3 deletions l10n/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ OC.L10N.register(
"Notification sent successfully": "Benachrichtigung erfolgreich gesendet",
"%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s hat dich in %2\$s erwähnt: \"%3\$s\".",
"Choose a format to convert {fileName}": "Wählen Sie das Format für {fileName} aus",
"Form template": "Formularvorlage",
"Form template from existing text file": "Formularvorlage aus Textdatei",
"Create form": "Formular erstellen",
"Fill in form in ONLYOFFICE": "Formular in ONLYOFFICE ausfüllen",
"Create new Form template": "Neue Formularvorlage erstellen",
"Security": "Sicherheit",
"Run document macros": "Makros im Dokument ausführen",
"Default editor theme": "Standardmäßiges Thema des Editors",
Expand Down
3 changes: 0 additions & 3 deletions l10n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@
"Notification sent successfully": "Benachrichtigung erfolgreich gesendet",
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s hat dich in %2$s erwähnt: \"%3$s\".",
"Choose a format to convert {fileName}": "Wählen Sie das Format für {fileName} aus",
"Form template": "Formularvorlage",
"Form template from existing text file": "Formularvorlage aus Textdatei",
"Create form": "Formular erstellen",
"Fill in form in ONLYOFFICE": "Formular in ONLYOFFICE ausfüllen",
"Create new Form template": "Neue Formularvorlage erstellen",
"Security": "Sicherheit",
"Run document macros": "Makros im Dokument ausführen",
"Default editor theme": "Standardmäßiges Thema des Editors",
Expand Down
3 changes: 0 additions & 3 deletions l10n/de_DE.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ OC.L10N.register(
"Notification sent successfully": "Benachrichtigung erfolgreich gesendet",
"%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s hat dich in %2\$s erwähnt: \"%3\$s\".",
"Choose a format to convert {fileName}": "Wählen Sie das Format für {fileName} aus",
"Form template": "Formularvorlage",
"Form template from existing text file": "Formularvorlage aus Textdatei",
"Create form": "Formular erstellen",
"Fill in form in ONLYOFFICE": "Formular in ONLYOFFICE ausfüllen",
"Create new Form template": "Neue Formularvorlage erstellen",
"Security": "Sicherheit",
"Run document macros": "Makros im Dokument ausführen",
"Default editor theme": "Standardmäßiges Thema des Editors",
Expand Down
3 changes: 0 additions & 3 deletions l10n/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@
"Notification sent successfully": "Benachrichtigung erfolgreich gesendet",
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s hat dich in %2$s erwähnt: \"%3$s\".",
"Choose a format to convert {fileName}": "Wählen Sie das Format für {fileName} aus",
"Form template": "Formularvorlage",
"Form template from existing text file": "Formularvorlage aus Textdatei",
"Create form": "Formular erstellen",
"Fill in form in ONLYOFFICE": "Formular in ONLYOFFICE ausfüllen",
"Create new Form template": "Neue Formularvorlage erstellen",
"Security": "Sicherheit",
"Run document macros": "Makros im Dokument ausführen",
"Default editor theme": "Standardmäßiges Thema des Editors",
Expand Down
3 changes: 0 additions & 3 deletions l10n/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ OC.L10N.register(
"Notification sent successfully": "Notificación enviada correctamente",
"%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s le ha mencionado en %2\$s: \"%3\$s\".",
"Choose a format to convert {fileName}": "Elija un formato para convertir {fileName}",
"Form template": "Plantilla de formulario",
"Form template from existing text file": "Plantilla de formulario desde un archivo de texto existente",
"Create form": "Crear formulario",
"Fill in form in ONLYOFFICE": "Rellenar el formulario en ONLYOFFICE",
"Create new Form template": "Crear nueva plantilla de formulario",
"Security": "Seguridad",
"Run document macros": "Ejecutar macros de documentos",
"Default editor theme": "Tema del editor predeterminado",
Expand Down
3 changes: 0 additions & 3 deletions l10n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@
"Notification sent successfully": "Notificación enviada correctamente",
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s le ha mencionado en %2$s: \"%3$s\".",
"Choose a format to convert {fileName}": "Elija un formato para convertir {fileName}",
"Form template": "Plantilla de formulario",
"Form template from existing text file": "Plantilla de formulario desde un archivo de texto existente",
"Create form": "Crear formulario",
"Fill in form in ONLYOFFICE": "Rellenar el formulario en ONLYOFFICE",
"Create new Form template": "Crear nueva plantilla de formulario",
"Security": "Seguridad",
"Run document macros": "Ejecutar macros de documentos",
"Default editor theme": "Tema del editor predeterminado",
Expand Down
3 changes: 0 additions & 3 deletions l10n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ OC.L10N.register(
"Notification sent successfully": "Notification a été envoyée avec succès",
"%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s vous a mentionné dans %2\$s: \"%3\$s\".",
"Choose a format to convert {fileName}": "Choisissez un format à convertir {fileName}",
"Form template": "Modèle de formulaire",
"Form template from existing text file": "Modèle de formulaire à partir d'un fichier texte existant",
"Create form": "Créer un formulaire",
"Fill in form in ONLYOFFICE": "Remplir le formulaire dans ONLYOFFICE",
"Create new Form template": "Créer un nouveau modèle de formulaire",
"Security": "Sécurité",
"Run document macros": "Exécuter des macros de documents",
"Default editor theme": "Thème d'éditeur par défaut",
Expand Down
3 changes: 0 additions & 3 deletions l10n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@
"Notification sent successfully": "Notification a été envoyée avec succès",
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s vous a mentionné dans %2$s: \"%3$s\".",
"Choose a format to convert {fileName}": "Choisissez un format à convertir {fileName}",
"Form template": "Modèle de formulaire ",
"Form template from existing text file": "Modèle de formulaire à partir d'un fichier texte existant",
"Create form": "Créer un formulaire",
"Fill in form in ONLYOFFICE": "Remplir le formulaire dans ONLYOFFICE",
"Create new Form template": "Créer un nouveau modèle de formulaire",
"Security": "Sécurité",
"Run document macros": "Exécuter des macros de documents",
"Default editor theme": "Thème d'éditeur par défaut",
Expand Down
3 changes: 0 additions & 3 deletions l10n/it.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ OC.L10N.register(
"Notification sent successfully": "Notifica è stata inviata con successo",
"%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s ti ha menzionato in %2\$s: \"%3\$s\".",
"Choose a format to convert {fileName}": "Scegli un formato per convertire {fileName}",
"Form template": "Modello di modulo",
"Form template from existing text file": "Modello di modulo da file di testo esistente",
"Create form": "Creare modulo",
"Fill in form in ONLYOFFICE": "Compilare il modulo in ONLYOFFICE",
"Create new Form template": "Creare un nuovo modello di modulo",
"Security": "Sicurezza",
"Run document macros": "Esegui le macro del documento",
"Default editor theme": "Tema dell'editor predefinito",
Expand Down
3 changes: 0 additions & 3 deletions l10n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@
"Notification sent successfully": "Notifica è stata inviata con successo",
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s ti ha menzionato in %2$s: \"%3$s\".",
"Choose a format to convert {fileName}": "Scegli un formato per convertire {fileName}",
"Form template": "Modello di modulo",
"Form template from existing text file": "Modello di modulo da file di testo esistente",
"Create form": "Creare modulo",
"Fill in form in ONLYOFFICE": "Compilare il modulo in ONLYOFFICE",
"Create new Form template": "Creare un nuovo modello di modulo",
"Security": "Sicurezza",
"Run document macros": "Esegui le macro del documento",
"Default editor theme": "Tema dell'editor predefinito",
Expand Down
3 changes: 0 additions & 3 deletions l10n/ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ OC.L10N.register(
"Notification sent successfully": "通知を送信しました",
"%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s は あなたを %2\$s: \"%3\$s\"に記載されました。",
"Choose a format to convert {fileName}": "{fileName}を変換する形式を選択してください",
"Form template": "フォーム テンプレート",
"Form template from existing text file": "既存のテキストファイルからフォームテンプレートを作成する",
"Create form": "フォームの作成",
"Fill in form in ONLYOFFICE": "ONLYOFFICEでフォームを記入する",
"Create new Form template": "新しいフォームテンプレートの作成",
"Security": "セキュリティ",
"Run document macros": "ドキュメントマクロを実行する",
"Default editor theme": "エディターのデフォルトテーマ",
Expand Down
3 changes: 0 additions & 3 deletions l10n/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@
"Notification sent successfully": "通知を送信しました",
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s は あなたを %2$s: \"%3$s\"に記載されました。",
"Choose a format to convert {fileName}": "{fileName}を変換する形式を選択してください",
"Form template": "フォーム テンプレート",
"Form template from existing text file": "既存のテキストファイルからフォームテンプレートを作成する",
"Create form": "フォームの作成",
"Fill in form in ONLYOFFICE": "ONLYOFFICEでフォームを記入する",
"Create new Form template": "新しいフォームテンプレートの作成",
"Security": "セキュリティ",
"Run document macros": "ドキュメントマクロを実行する",
"Default editor theme": "エディターのデフォルトテーマ",
Expand Down
3 changes: 0 additions & 3 deletions l10n/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ OC.L10N.register(
"Notification sent successfully": "Kennisgeving succesvol verzonden",
"%1\$s mentioned in the %2\$s: \"%3\$s\".": "%1\$s genoemd in de %2\$s: \"%3\$s\".",
"Choose a format to convert {fileName}": "Kies een formaat om {fileName} te converteren",
"Form template": "Formulier sjabloon",
"Form template from existing text file": "Formulier sjabloon uit bestaand tekstbestand",
"Create form": "Formulier maken",
"Fill in form in ONLYOFFICE": "Formulier invullen in ONLYOFFICE",
"Create new Form template": "Nieuw Formulier sjabloon maken",
"Security": "Beveiliging",
"Run document macros": "Document macro's uitvoeren",
"Default editor theme": "Standaard editor thema",
Expand Down
3 changes: 0 additions & 3 deletions l10n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@
"Notification sent successfully": "Kennisgeving succesvol verzonden",
"%1$s mentioned in the %2$s: \"%3$s\".": "%1$s genoemd in de %2$s: \"%3$s\".",
"Choose a format to convert {fileName}": "Kies een formaat om {fileName} te converteren",
"Form template": "Formulier sjabloon",
"Form template from existing text file": "Formulier sjabloon uit bestaand tekstbestand",
"Create form": "Formulier maken",
"Fill in form in ONLYOFFICE": "Formulier invullen in ONLYOFFICE",
"Create new Form template": "Nieuw Formulier sjabloon maken",
"Security": "Beveiliging",
"Run document macros": "Document macro's uitvoeren",
"Default editor theme": "Standaard editor thema",
Expand Down
Loading

0 comments on commit d2e7650

Please sign in to comment.