diff options
author | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2019-10-15 11:41:49 +0300 |
---|---|---|
committer | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2019-11-29 13:28:28 +0300 |
commit | 3378260b4b4ab44d7ecde27165143ef8fefd473d (patch) | |
tree | ffa90d79ce76bf1d95fe1c168c9de765733a7184 | |
parent | 892b6b0633794142f3ae1a7be6d1f8f536aae7e3 (diff) |
select document for comparing
-rw-r--r-- | js/editor.js | 28 | ||||
-rw-r--r-- | l10n/de.js | 3 | ||||
-rw-r--r-- | l10n/de.json | 3 | ||||
-rw-r--r-- | l10n/de_DE.js | 3 | ||||
-rw-r--r-- | l10n/de_DE.json | 3 | ||||
-rw-r--r-- | l10n/es.js | 3 | ||||
-rw-r--r-- | l10n/es.json | 3 | ||||
-rw-r--r-- | l10n/fr.js | 3 | ||||
-rw-r--r-- | l10n/fr.json | 3 | ||||
-rw-r--r-- | l10n/pt_BR.js | 3 | ||||
-rw-r--r-- | l10n/pt_BR.json | 3 | ||||
-rw-r--r-- | l10n/ru.js | 3 | ||||
-rw-r--r-- | l10n/ru.json | 3 |
13 files changed, 52 insertions, 12 deletions
diff --git a/js/editor.js b/js/editor.js index 64ffef3..67f0b43 100644 --- a/js/editor.js +++ b/js/editor.js @@ -113,6 +113,7 @@ config.events.onRequestSaveAs = OCA.Onlyoffice.onRequestSaveAs; config.events.onRequestInsertImage = OCA.Onlyoffice.onRequestInsertImage; config.events.onRequestMailMergeRecipients = OCA.Onlyoffice.onRequestMailMergeRecipients; + config.events.onRequestCompareFile = OCA.Onlyoffice.onRequestCompareFile; } OCA.Onlyoffice.docEditor = new DocsAPI.DocEditor("iframeEditor", config); @@ -213,6 +214,33 @@ OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select recipients"), setRecipient, false, recipientMimes); }; + OCA.Onlyoffice.onRequestCompareFile = function() { + + var setRevised = function(filePath) { + $.get(OC.generateUrl("apps/" + OCA.Onlyoffice.AppName + "/ajax/url?filePath={filePath}", + { + filePath: filePath + }), + function onSuccess(response) { + if (response.error) { + OC.Notification.show(response.error, { + type: "error", + timeout: 3 + }); + return; + } + + OCA.Onlyoffice.docEditor.setRevisedFile(response); + }); + }; + + var revisedMimes = [ + "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + ]; + + OC.dialogs.filepicker(t(OCA.Onlyoffice.AppName, "Select file to compare"), setRevised, false, revisedMimes); + }; + $(document).ready(OCA.Onlyoffice.InitEditor); })(jQuery, OCA); @@ -77,6 +77,7 @@ OC.L10N.register( "Show watermark for download hidden shares" : "Wasserzeichen auf ‘Download verbergen’ Freigaben anzeigen", "Show watermark for read only link shares" : "Wasserzeichen auf schreibgeschützten Link-Freigaben anzeigen", "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen", - "Select tag" : "Wähle einen Tag" + "Select tag" : "Wähle einen Tag", + "Select file to compare" : "Datei zum Vergleich auswählen" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de.json b/l10n/de.json index 9f29756..df18125 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -75,6 +75,7 @@ "Show watermark for download hidden shares" : "Wasserzeichen auf ‘Download verbergen’ Freigaben anzeigen", "Show watermark for read only link shares" : "Wasserzeichen auf schreibgeschützten Link-Freigaben anzeigen", "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen", - "Select tag" : "Wähle einen Tag" + "Select tag" : "Wähle einen Tag", + "Select file to compare" : "Datei zum Vergleich auswählen" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/l10n/de_DE.js b/l10n/de_DE.js index fb5c34a..96f994d 100644 --- a/l10n/de_DE.js +++ b/l10n/de_DE.js @@ -77,6 +77,7 @@ OC.L10N.register( "Show watermark for download hidden shares" : "Wasserzeichen auf ‘Download verbergen’ Freigaben anzeigen", "Show watermark for read only link shares" : "Wasserzeichen auf schreibgeschützten Link-Freigaben anzeigen", "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen", - "Select tag" : "Wählen Sie ein Tag" + "Select tag" : "Wählen Sie ein Tag", + "Select file to compare" : "Datei zum Vergleich auswählen" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/de_DE.json b/l10n/de_DE.json index 0df7f0c..9b3d891 100644 --- a/l10n/de_DE.json +++ b/l10n/de_DE.json @@ -75,6 +75,7 @@ "Show watermark for download hidden shares" : "Wasserzeichen auf ‘Download verbergen’ Freigaben anzeigen", "Show watermark for read only link shares" : "Wasserzeichen auf schreibgeschützten Link-Freigaben anzeigen", "Show watermark on link shares with specific system tags" : "Wasserzeichen auf Link-Freigaben mit bestimmten System-Tags anzeigen", - "Select tag" : "Wählen Sie ein Tag" + "Select tag" : "Wählen Sie ein Tag", + "Select file to compare" : "Datei zum Vergleich auswählen" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file @@ -60,6 +60,7 @@ OC.L10N.register( "Select recipients" : "Seleccionar destinatarios", "Secure view enables you to secure documents by embedding a watermark" : "La vista segura permite asegurar documentos mediante la inserción de una marca de agua en ellos", "Supported placeholders" : "Marcadores soportados", - "Select tag" : "Seleccionar etiqueta" + "Select tag" : "Seleccionar etiqueta", + "Select file to compare" : "Seleccione un archivo para comparar" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/es.json b/l10n/es.json index 311743b..2c9598c 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -58,6 +58,7 @@ "Select recipients" : "Seleccionar destinatarios", "Secure view enables you to secure documents by embedding a watermark" : "La vista segura permite asegurar documentos mediante la inserción de una marca de agua en ellos", "Supported placeholders" : "Marcadores soportados", - "Select tag" : "Seleccionar etiqueta" + "Select tag" : "Seleccionar etiqueta", + "Select file to compare" : "Seleccione un archivo para comparar" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file @@ -58,6 +58,7 @@ OC.L10N.register( "File saved" : "Le fichier a été enregistré", "Insert image" : "Insérer une image", "Select recipients" : "Sélectionner les destinataires", - "Select tag" : "Sélectionner une étiquette" + "Select tag" : "Sélectionner une étiquette", + "Select file to compare" : "Sélectionner fichier à comparer" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/fr.json b/l10n/fr.json index 2e4ed18..6c609af 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -56,6 +56,7 @@ "File saved" : "Le fichier a été enregistré", "Insert image" : "Insérer une image", "Select recipients" : "Sélectionner les destinataires", - "Select tag" : "Sélectionner une étiquette" + "Select tag" : "Sélectionner une étiquette", + "Select file to compare" : "Sélectionner fichier à comparer" },"pluralForm" :"nplurals=2; plural=(n != 1);" } diff --git a/l10n/pt_BR.js b/l10n/pt_BR.js index a765e07..99aa6f8 100644 --- a/l10n/pt_BR.js +++ b/l10n/pt_BR.js @@ -60,6 +60,7 @@ OC.L10N.register( "Select recipients" : "Selecione os destinatários", "Secure view enables you to secure documents by embedding a watermark" : "A visualização segura permite proteger documentos incorporando uma marca d'água", "Supported placeholders" : "Espaços reservados suportados", - "Select tag" : "Selecionar etiqueta" + "Select tag" : "Selecionar etiqueta", + "Select file to compare" : "Selecionar arquivo para comparar" }, "nplurals=2; plural=(n != 1);"); diff --git a/l10n/pt_BR.json b/l10n/pt_BR.json index 1ea90a4..f0181e9 100644 --- a/l10n/pt_BR.json +++ b/l10n/pt_BR.json @@ -58,6 +58,7 @@ "Select recipients" : "Selecione os destinatários", "Secure view enables you to secure documents by embedding a watermark" : "A visualização segura permite proteger documentos incorporando uma marca d'água", "Supported placeholders" : "Espaços reservados suportados", - "Select tag" : "Selecionar etiqueta" + "Select tag" : "Selecionar etiqueta", + "Select file to compare" : "Selecionar arquivo para comparar" },"pluralForm" :"nplurals=2; plural=(n != 1);" } @@ -77,6 +77,7 @@ OC.L10N.register( "Show watermark for download hidden shares" : "Отображать водяной знак при доступе без скачивания", "Show watermark for read only link shares" : "Отображать водяной знак при доступе только на чтение по ссылке", "Show watermark on link shares with specific system tags" : "Отображать водяной знак при доступе по ссылке с определенными системными метками", - "Select tag" : "Выберите метку" + "Select tag" : "Выберите метку", + "Select file to compare" : "Выбрать файл для сравнения" }, "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);"); diff --git a/l10n/ru.json b/l10n/ru.json index 422cb05..7f393ce 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -75,6 +75,7 @@ "Show watermark for download hidden shares" : "Отображать водяной знак при доступе без скачивания", "Show watermark for read only link shares" : "Отображать водяной знак при доступе только на чтение по ссылке", "Show watermark on link shares with specific system tags" : "Отображать водяной знак при доступе по ссылке с определенными системными метками", - "Select tag" : "Выберите метку" + "Select tag" : "Выберите метку", + "Select file to compare" : "Выбрать файл для сравнения" },"pluralForm" :"nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" }
\ No newline at end of file |