diff --git a/apps/common/mobile/resources/less/common.less b/apps/common/mobile/resources/less/common.less
index 8cc11a04d..1b6ae0f97 100644
--- a/apps/common/mobile/resources/less/common.less
+++ b/apps/common/mobile/resources/less/common.less
@@ -905,6 +905,11 @@ input[type="number"]::-webkit-inner-spin-button {
}
}
+.dlg-macros-request {
+ .dialog-text {
+ word-break: break-word;
+ }
+}
// Skeleton of document
@keyframes flickerAnimation {
diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js
index 478a53072..4a5707872 100644
--- a/apps/documenteditor/main/app/controller/Main.js
+++ b/apps/documenteditor/main/app/controller/Main.js
@@ -169,6 +169,8 @@ define([
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
});
+ this.stackMacrosRequests = [];
+
this._state = {isDisconnected: false, usersCount: 1, fastCoauth: true, lostEditingRights: false, licenseType: false, isDocModified: false};
this.languages = null;
@@ -436,6 +438,9 @@ define([
value = parseInt(value);
Common.Utils.InternalSettings.set("de-macros-mode", value);
+ value = Common.localStorage.getItem("de-allow-macros-request");
+ Common.Utils.InternalSettings.set("de-allow-macros-request", (value !== null) ? parseInt(value) : 0);
+
this.appOptions.wopi = this.editorConfig.wopi;
Common.Controllers.Desktop.init(this.appOptions);
@@ -509,6 +514,7 @@ define([
}
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this));
+ this.api.asc_registerCallback('asc_onMacrosPermissionRequest', _.bind(this.onMacrosPermissionRequest, this));
this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));
this.api.asc_setDocInfo(docInfo);
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
@@ -2711,6 +2717,47 @@ define([
}
},
+ onMacrosPermissionRequest: function(url, callback) {
+ if (url && callback) {
+ this.stackMacrosRequests.push({url: url, callback: callback});
+ if (this.stackMacrosRequests.length>1) {
+ return;
+ }
+ } else if (this.stackMacrosRequests.length>0) {
+ url = this.stackMacrosRequests[0].url;
+ callback = this.stackMacrosRequests[0].callback;
+ } else
+ return;
+
+ var me = this;
+ var value = Common.Utils.InternalSettings.get("de-allow-macros-request");
+ if (value>0) {
+ callback && callback(value === 1);
+ this.stackMacrosRequests.shift();
+ this.onMacrosPermissionRequest();
+ } else {
+ Common.UI.warning({
+ msg: this.textRequestMacros.replace('%1', url),
+ buttons: ['yes', 'no'],
+ primary: 'yes',
+ dontshow: true,
+ textDontShow: this.textRememberMacros,
+ maxwidth: 600,
+ callback: function(btn, dontshow){
+ if (dontshow) {
+ Common.Utils.InternalSettings.set("de-allow-macros-request", (btn == 'yes') ? 1 : 2);
+ Common.localStorage.setItem("de-allow-macros-request", (btn == 'yes') ? 1 : 2);
+ }
+ setTimeout(function() {
+ if (callback) callback(btn == 'yes');
+ me.stackMacrosRequests.shift();
+ me.onMacrosPermissionRequest();
+ }, 1);
+ }
+ });
+ }
+ },
+
loadAutoCorrectSettings: function() {
// autocorrection
var me = this;
@@ -3166,7 +3213,7 @@ define([
txtEnterDate: 'Enter a date',
txtTypeEquation: 'Type equation here',
textHasMacros: 'The file contains automatic macros. Do you want to run macros?',
- textRemember: 'Remember my choice',
+ textRemember: 'Remember my choice for all files',
warnLicenseLimitedRenewed: 'License needs to be renewed. You have a limited access to document editing functionality. Please contact your administrator to get full access',
warnLicenseLimitedNoAccess: 'License expired. You have no access to document editing functionality. Please contact your administrator.',
saveErrorTextDesktop: 'This file cannot be saved or created. Possible reasons are: 1. The file is read-only. 2. The file is being edited by other users. 3. The disk is full or corrupted.',
@@ -3190,7 +3237,9 @@ define([
errorLang: 'The interface language is not loaded. Please contact your Document Server administrator.',
errorLoadingFont: 'Fonts are not loaded. Please contact your Document Server administrator.',
errorEmptyTOC: 'Start creating a table of contents by applying a heading style from the Styles gallery to the selected text.',
- errorNoTOC: 'There\'s no table of contents to update. You can insert one from the References tab.'
+ errorNoTOC: 'There\'s no table of contents to update. You can insert one from the References tab.',
+ textRequestMacros: 'A macro makes a request to URL. Do you want to allow the request to the %1?',
+ textRememberMacros: 'Remember my choice for all macros'
}
})(), DE.Controllers.Main || {}))
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index 226c2665b..ae4d86cc1 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -622,6 +622,7 @@
"DE.Controllers.Main.textPaidFeature": "Paid feature",
"DE.Controllers.Main.textReconnect": "Connection is restored",
"DE.Controllers.Main.textRemember": "Remember my choice for all files",
+ "DE.Controllers.Main.textRememberMacros": "Remember my choice for all macros",
"DE.Controllers.Main.textRenameError": "User name must not be empty.",
"DE.Controllers.Main.textRenameLabel": "Enter a name to be used for collaboration",
"DE.Controllers.Main.textShape": "Shape",
@@ -896,6 +897,7 @@
"DE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"DE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
+ "DE.Controllers.Main.textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?",
"DE.Controllers.Navigation.txtBeginning": "Beginning of document",
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
"DE.Controllers.Statusbar.textDisconnect": "Connection is lost Trying to connect. Please check connection settings.",
diff --git a/apps/documenteditor/mobile/locale/az.json b/apps/documenteditor/mobile/locale/az.json
index 99a364c7c..87e44b940 100644
--- a/apps/documenteditor/mobile/locale/az.json
+++ b/apps/documenteditor/mobile/locale/az.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "Bu faylı redaktə etmək icazəniz yoxdur.",
"textNoTextFound": "Text not found",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}"
+ "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Qorunan Fayl",
diff --git a/apps/documenteditor/mobile/locale/be.json b/apps/documenteditor/mobile/locale/be.json
index e7b0a0e8b..7fcf1ce31 100644
--- a/apps/documenteditor/mobile/locale/be.json
+++ b/apps/documenteditor/mobile/locale/be.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
- "warnProcessRightsChange": "You don't have permission to edit this file."
+ "warnProcessRightsChange": "You don't have permission to edit this file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Абаронены файл",
diff --git a/apps/documenteditor/mobile/locale/bg.json b/apps/documenteditor/mobile/locale/bg.json
index e1fec637e..4542b418d 100644
--- a/apps/documenteditor/mobile/locale/bg.json
+++ b/apps/documenteditor/mobile/locale/bg.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "You don't have permission to edit this file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Protected File",
diff --git a/apps/documenteditor/mobile/locale/ca.json b/apps/documenteditor/mobile/locale/ca.json
index fc901ffd9..365dd6327 100644
--- a/apps/documenteditor/mobile/locale/ca.json
+++ b/apps/documenteditor/mobile/locale/ca.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Has arribat al límit d'usuari per a %1 editors. Contacta amb el teu administrador per a més informació.",
"warnNoLicense": "Has arribat al límit de connexions simultànies a %1 editors. Aquest document només s'obrirà en mode lectura. Contacta amb l'equip de vendes %1 per a les condicions d'una actualització personal.",
"warnNoLicenseUsers": "Has arribat al límit d'usuaris per a %1 editors. Contacta amb l'equip de vendes de %1 per obtenir les condicions de millora personals dels teus serveis.",
- "warnProcessRightsChange": "No tens permís per editar aquest fitxer."
+ "warnProcessRightsChange": "No tens permís per editar aquest fitxer.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "El fitxer està protegit",
diff --git a/apps/documenteditor/mobile/locale/cs.json b/apps/documenteditor/mobile/locale/cs.json
index 601e98424..519778770 100644
--- a/apps/documenteditor/mobile/locale/cs.json
+++ b/apps/documenteditor/mobile/locale/cs.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Došlo dosažení limitu %1 editorů v režimu spolupráce na úpravách. Ohledně podrobností se obraťte na svého správce.",
"warnNoLicense": "Došlo k dosažení limitu souběžného připojení %1 editorů. Tento dokument bude otevřen pouze pro náhled. Pro rozšíření funkcí kontaktujte %1 obchodní oddělení.",
"warnNoLicenseUsers": "Došlo k dosažení limitu %1 editorů. Pro rozšíření funkcí kontaktujte %1 obchodní oddělení.",
- "warnProcessRightsChange": "Nemáte oprávnění pro úpravu tohoto dokumentu."
+ "warnProcessRightsChange": "Nemáte oprávnění pro úpravu tohoto dokumentu.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Zabezpečený soubor",
diff --git a/apps/documenteditor/mobile/locale/da.json b/apps/documenteditor/mobile/locale/da.json
index e1fec637e..4542b418d 100644
--- a/apps/documenteditor/mobile/locale/da.json
+++ b/apps/documenteditor/mobile/locale/da.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "You don't have permission to edit this file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Protected File",
diff --git a/apps/documenteditor/mobile/locale/de.json b/apps/documenteditor/mobile/locale/de.json
index 7ea23d697..8139f39d5 100644
--- a/apps/documenteditor/mobile/locale/de.json
+++ b/apps/documenteditor/mobile/locale/de.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Sie haben das Benutzerlimit für %1-Editoren erreicht. Bitte wenden Sie sich an Ihren Administrator, um weitere Informationen zu erhalten.",
"warnNoLicense": "Sie haben die maximale Anzahl von gleichzeitigen Verbindungen in %1-Editoren erreicht. Die Bearbeitung ist jetzt in diesem Dokument nicht verfügbar. Bitte kontaktieren Sie unser Verkaufsteam, um persönliche Upgrade-Bedingungen zu erhalten.",
"warnNoLicenseUsers": "Sie haben das Benutzerlimit für %1-Editoren erreicht. Bitte kontaktieren Sie unser Verkaufsteam, um persönliche Upgrade-Bedingungen zu erhalten.",
- "warnProcessRightsChange": "Sie können diese Datei nicht bearbeiten."
+ "warnProcessRightsChange": "Sie können diese Datei nicht bearbeiten.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Geschützte Datei",
diff --git a/apps/documenteditor/mobile/locale/el.json b/apps/documenteditor/mobile/locale/el.json
index b51aaac37..71598ffee 100644
--- a/apps/documenteditor/mobile/locale/el.json
+++ b/apps/documenteditor/mobile/locale/el.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Έχετε φτάσει το όριο χρήστη για συντάκτες %1. Επικοινωνήστε με τον διαχειριστή σας για περισσότερες πληροφορίες.",
"warnNoLicense": "Φτάσατε το όριο ταυτόχρονων συνδέσεων σε %1 συντάκτες. Το έγγραφο θα ανοίξει μόνο για ανάγνωση. Επικοινωνήστε με την ομάδα πωλήσεων %1 για τους όρους αναβάθμισης.",
"warnNoLicenseUsers": "Έχετε φτάσει το όριο χρήστη για συντάκτες %1. Επικοινωνήστε με την ομάδα πωλήσεων %1 για προσωπικούς όρους αναβάθμισης.",
- "warnProcessRightsChange": "Δεν έχετε δικαίωμα επεξεργασίας αυτού του αρχείου."
+ "warnProcessRightsChange": "Δεν έχετε δικαίωμα επεξεργασίας αυτού του αρχείου.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Προστατευμένο Αρχείο",
diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json
index f64b62ab6..c61bb5220 100644
--- a/apps/documenteditor/mobile/locale/en.json
+++ b/apps/documenteditor/mobile/locale/en.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
- "warnProcessRightsChange": "You don't have permission to edit this file."
+ "warnProcessRightsChange": "You don't have permission to edit this file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Protected File",
diff --git a/apps/documenteditor/mobile/locale/es.json b/apps/documenteditor/mobile/locale/es.json
index c32ec8ca1..e6f3fd0b6 100644
--- a/apps/documenteditor/mobile/locale/es.json
+++ b/apps/documenteditor/mobile/locale/es.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Ha alcanzado el límite de usuarios para %1 editores. Póngase en contacto con su administrador para saber más.",
"warnNoLicense": "Ha alcanzado el límite de conexiones simultáneas con %1 editores. Este documento se abrirá sólo para su visualización. Póngase en contacto con el equipo de ventas de %1 para conocer las condiciones de actualización personal.",
"warnNoLicenseUsers": "Ha alcanzado el límite de usuarios para %1 editores. Póngase en contacto con el equipo de ventas de %1 para conocer las condiciones de actualización personal.",
- "warnProcessRightsChange": "No tiene permiso para editar este archivo."
+ "warnProcessRightsChange": "No tiene permiso para editar este archivo.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Archivo protegido",
diff --git a/apps/documenteditor/mobile/locale/fi.json b/apps/documenteditor/mobile/locale/fi.json
index e1fec637e..4542b418d 100644
--- a/apps/documenteditor/mobile/locale/fi.json
+++ b/apps/documenteditor/mobile/locale/fi.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "You don't have permission to edit this file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Protected File",
diff --git a/apps/documenteditor/mobile/locale/fr.json b/apps/documenteditor/mobile/locale/fr.json
index 854dce451..25829e47c 100644
--- a/apps/documenteditor/mobile/locale/fr.json
+++ b/apps/documenteditor/mobile/locale/fr.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Vous avez dépassé le nombre maximal d’utilisateurs des éditeurs %1. Pour en savoir plus, contactez votre administrateur.",
"warnNoLicense": "Vous avez dépassé le nombre maximal de connexions simultanées aux éditeurs %1. Ce document sera ouvert en lecture seule. Contactez l’équipe des ventes %1 pour mettre à jour les termes de la licence.",
"warnNoLicenseUsers": "Vous avez dépassé le nombre maximal d’utilisateurs des éditeurs %1. Contactez l’équipe des ventes %1 pour mettre à jour les termes de la licence.",
- "warnProcessRightsChange": "Vous n'avez pas la permission de modifier ce fichier."
+ "warnProcessRightsChange": "Vous n'avez pas la permission de modifier ce fichier.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Fichier protégé",
diff --git a/apps/documenteditor/mobile/locale/gl.json b/apps/documenteditor/mobile/locale/gl.json
index ef470b5fb..65b9eed8b 100644
--- a/apps/documenteditor/mobile/locale/gl.json
+++ b/apps/documenteditor/mobile/locale/gl.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Alcanzou o límite de usuarios para os editores de %1. Por favor, contacte co se uadministrador para recibir máis información.",
"warnNoLicense": "Alcanzou o límite de conexións simultáneas con %1 editores. Este documento abrirase para as úa visualización. Póñase en contacto co equipo de vendas de %1 para coñecer as condicións de actualización persoal.",
"warnNoLicenseUsers": "Alcanzou o límite de usuarios para os editores de %1. Contacte co equipo de vendas de %1 para coñecer os termos de actualización persoal.",
- "warnProcessRightsChange": "Non ten permiso para editar este ficheiro."
+ "warnProcessRightsChange": "Non ten permiso para editar este ficheiro.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Ficheiro protexido",
diff --git a/apps/documenteditor/mobile/locale/hu.json b/apps/documenteditor/mobile/locale/hu.json
index a9145fd92..2e800f3a2 100644
--- a/apps/documenteditor/mobile/locale/hu.json
+++ b/apps/documenteditor/mobile/locale/hu.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Elérte a(z) %1 szerkesztőhöz tartozó felhasználói korlátját. További információért forduljon rendszergazdájához.",
"warnNoLicense": "Elérte a(z) %1 szerkesztővel való egyidejű kapcsolódási korlátot. Ez a dokumentum csak megtekintésre nyílik meg. Lépjen kapcsolatba a(z) %1 értékesítési csapattal a személyes frissítés feltételekért.",
"warnNoLicenseUsers": "Elérte a(z) %1 szerkesztőhöz tartozó felhasználói korlátját. Vegye fel a kapcsolatot a(z) %1 értékesítési csapattal a személyes frissítési feltételekért.",
- "warnProcessRightsChange": "Nincs engedélye a fájl szerkesztésére."
+ "warnProcessRightsChange": "Nincs engedélye a fájl szerkesztésére.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Védett fájl",
diff --git a/apps/documenteditor/mobile/locale/id.json b/apps/documenteditor/mobile/locale/id.json
index 0195441eb..9353166c8 100644
--- a/apps/documenteditor/mobile/locale/id.json
+++ b/apps/documenteditor/mobile/locale/id.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Anda sudah mencapai batas user untuk %1 editor. Hubungi admin Anda untuk mempelajari lebih lanjut.",
"warnNoLicense": "Anda sudah mencapai batas untuk koneksi bersamaan ke %1 editor. Dokumen ini akan dibuka untuk dilihat saja. Hubungi %1 tim sales untuk syarat personal upgrade.",
"warnNoLicenseUsers": "Anda sudah mencapai batas user untuk %1 editor. Hubungi %1 tim sales untuk syarat personal upgrade.",
- "warnProcessRightsChange": "Anda tidak memiliki izin edit file ini."
+ "warnProcessRightsChange": "Anda tidak memiliki izin edit file ini.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "File yang Diproteksi",
@@ -655,7 +656,8 @@
"textNavigation": "Navigation",
"textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.",
"textBeginningDocument": "Beginning of document",
- "textEmptyHeading": "Empty Heading"
+ "textEmptyHeading": "Empty Heading",
+ "textPdfProducer": "PDF Producer"
},
"Toolbar": {
"dlgLeaveMsgText": "Anda memiliki perubahan yang belum tersimpan. Klik 'Tetap di Halaman Ini' untuk menunggu simpan otomatis. Klik ‘Tinggalkan Halaman Ini’ untuk membatalkan semua perubahan yang belum disimpan.",
diff --git a/apps/documenteditor/mobile/locale/it.json b/apps/documenteditor/mobile/locale/it.json
index ed157734b..0862c2453 100644
--- a/apps/documenteditor/mobile/locale/it.json
+++ b/apps/documenteditor/mobile/locale/it.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Hai raggiunto il limite degli utenti per gli editor %1. Ti preghiamo di contattare il tuo amministratore per maggior informazioni.",
"warnNoLicense": "Hai raggiunto il limite delle connessioni simultanee agli editor %1. Questo documento sarà aperto solo in modalità di visualizzazione. Ti preghiamo di contattare il team di vendite di %1 per i termini di aggiornamento personali.",
"warnNoLicenseUsers": "Hai raggiunto il limite degli utenti per gli editor %1. Ti preghiamo di contattare il team di vendite di %1 per i termini di aggiornamento personali.",
- "warnProcessRightsChange": "Non hai il permesso di modificare questo file."
+ "warnProcessRightsChange": "Non hai il permesso di modificare questo file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "File protetto",
diff --git a/apps/documenteditor/mobile/locale/ja.json b/apps/documenteditor/mobile/locale/ja.json
index 6b1ce026f..2d44b48de 100644
--- a/apps/documenteditor/mobile/locale/ja.json
+++ b/apps/documenteditor/mobile/locale/ja.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "%1エディターのユーザー制限に達しました。 詳細についてはアドミニストレータを連絡してください。",
"warnNoLicense": "%1エディター 時接続数の制限に達しました。この文書が見るだけのために開かれる。個人的なアップグレード条件については、%1営業チームを連絡してください。",
"warnNoLicenseUsers": "%1エディターのユーザー制限に達しました。 個人的なアップグレード条件については、%1営業チームを連絡してください。",
- "warnProcessRightsChange": "ファイルを編集する権限がありません!"
+ "warnProcessRightsChange": "ファイルを編集する権限がありません!",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "保護されたファイル",
diff --git a/apps/documenteditor/mobile/locale/ko.json b/apps/documenteditor/mobile/locale/ko.json
index 03da8cf7f..0be5ed6d5 100644
--- a/apps/documenteditor/mobile/locale/ko.json
+++ b/apps/documenteditor/mobile/locale/ko.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "편집자 사용자 한도인 %1명에 도달했습니다. 자세한 내용은 관리자에게 문의하십시오.",
"warnNoLicense": "% 1 편집 연결 수 제한에 도달했습니다. 이 문서는 보기 모드로 열립니다. 개인적인 업그레이드 사항은 % 1 영업팀에 연락하십시오.",
"warnNoLicenseUsers": "ONLYOFFICE 편집자의이 버전은 동시 사용자에게 일정한 제한이 있습니다. 더 필요한 것이 있으면 현재 라이센스를 업그레이드하거나 상용 라이센스를 구입하십시오.",
- "warnProcessRightsChange": "파일을 편집 할 권한이 없습니다."
+ "warnProcessRightsChange": "파일을 편집 할 권한이 없습니다.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "보호 된 파일",
diff --git a/apps/documenteditor/mobile/locale/lo.json b/apps/documenteditor/mobile/locale/lo.json
index 22ae4a6a5..780b73c5f 100644
--- a/apps/documenteditor/mobile/locale/lo.json
+++ b/apps/documenteditor/mobile/locale/lo.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "ຈໍານວນ ການເຊື່ອມຕໍ່ພ້ອມກັນກັບຜູ້ແກ້ໄຂ ແມ່ນເກີນກໍານົດ % 1. ຕິດຕໍ່ທີມບໍລິຫານເພື່ອຂໍ້ມູນເພີ່ມເຕີ່ມ",
"warnNoLicense": "ທ່ານໄດ້ຖືກຈຳກັດສິດພຽງເທົ່ານີ້ສຳຫລັບການເຊື່່ອມພ້ອມກັນກັບເຄື່ອງມືແກ້ໄຂ %1 ແລ້ວເອກະສານນີ້ຈະເປີດໃຫ້ເບີ່ງເທົ່ານັ້ນ ຕິດຕໍ່ທີມຂາຍ %1 ສຳຫລັບເງື່ອນໄຂການອັບເກດສ່ວນບຸກຄົນ",
"warnNoLicenseUsers": "ຈໍານວນການເຊື່ອມຕໍ່ພ້ອມກັນກັບບັນນາທິການ ແມ່ນເກີນກໍານົດ % 1. ຕິດຕໍ່ ທີມຂາຍ %1 ສຳລັບຂໍ້ກຳນົດການຍົກລະດັບສິດ",
- "warnProcessRightsChange": "ທ່ານບໍ່ມີສິດໃນການແກ້ໄຂໄຟລ໌ນີ້."
+ "warnProcessRightsChange": "ທ່ານບໍ່ມີສິດໃນການແກ້ໄຂໄຟລ໌ນີ້.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "ເອກະສານທີ່ໄດ້ຮັບການປົກປ້ອງ",
diff --git a/apps/documenteditor/mobile/locale/lv.json b/apps/documenteditor/mobile/locale/lv.json
index e1fec637e..4542b418d 100644
--- a/apps/documenteditor/mobile/locale/lv.json
+++ b/apps/documenteditor/mobile/locale/lv.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "You don't have permission to edit this file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Protected File",
diff --git a/apps/documenteditor/mobile/locale/nb.json b/apps/documenteditor/mobile/locale/nb.json
index e1fec637e..4542b418d 100644
--- a/apps/documenteditor/mobile/locale/nb.json
+++ b/apps/documenteditor/mobile/locale/nb.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "You don't have permission to edit this file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Protected File",
diff --git a/apps/documenteditor/mobile/locale/nl.json b/apps/documenteditor/mobile/locale/nl.json
index 42286e941..8557cbda1 100644
--- a/apps/documenteditor/mobile/locale/nl.json
+++ b/apps/documenteditor/mobile/locale/nl.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "Je hebt geen toestemming om dit bestand te bewerken.",
"textNoTextFound": "Text not found",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}"
+ "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Beveiligd bestand",
diff --git a/apps/documenteditor/mobile/locale/pl.json b/apps/documenteditor/mobile/locale/pl.json
index e1fec637e..4542b418d 100644
--- a/apps/documenteditor/mobile/locale/pl.json
+++ b/apps/documenteditor/mobile/locale/pl.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "You don't have permission to edit this file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Protected File",
diff --git a/apps/documenteditor/mobile/locale/pt-PT.json b/apps/documenteditor/mobile/locale/pt-PT.json
index c95b65705..0fc936dc4 100644
--- a/apps/documenteditor/mobile/locale/pt-PT.json
+++ b/apps/documenteditor/mobile/locale/pt-PT.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Atingiu o limite de %1 editores. Contacte o seu administrador para obter detalhes.",
"warnNoLicense": "Atingiu o limite de ligações simultâneas a %1 editores. Este documento será aberto apenas para visualização. Contacte a %1 equipa de vendas para consultar os termos de atualização para si.",
"warnNoLicenseUsers": "Atingiu o limite de %1 editores. Contacte a equipa comercial %1 para obter mais informações.",
- "warnProcessRightsChange": "Não tem autorização para editar este ficheiro."
+ "warnProcessRightsChange": "Não tem autorização para editar este ficheiro.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Ficheiro protegido",
@@ -655,7 +656,8 @@
"textNavigation": "Navigation",
"textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.",
"textBeginningDocument": "Beginning of document",
- "textEmptyHeading": "Empty Heading"
+ "textEmptyHeading": "Empty Heading",
+ "textPdfProducer": "PDF Producer"
},
"Toolbar": {
"dlgLeaveMsgText": "Existem alterações não guardadas. Clique 'Ficar na página' para guardar automaticamente. Clique 'Sair da página' para rejeitar todas as alterações.",
diff --git a/apps/documenteditor/mobile/locale/pt.json b/apps/documenteditor/mobile/locale/pt.json
index 077cb83de..08e5d7ae2 100644
--- a/apps/documenteditor/mobile/locale/pt.json
+++ b/apps/documenteditor/mobile/locale/pt.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Você atingiu o limite de usuários para editores %1. Entre em contato com seu administrador para saber mais.",
"warnNoLicense": "Você atingiu o limite de conexões simultâneas para% 1 editores. Este documento será aberto apenas para visualização. Contate a equipe de vendas% 1 para termos de atualização pessoal.",
"warnNoLicenseUsers": "Você atingiu o limite de usuários para editores %1. Entre em contato com a equipe de vendas da %1 para obter os termos de atualização pessoais.",
- "warnProcessRightsChange": "Você não tem permissão para editar este arquivo."
+ "warnProcessRightsChange": "Você não tem permissão para editar este arquivo.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Arquivo protegido",
diff --git a/apps/documenteditor/mobile/locale/ro.json b/apps/documenteditor/mobile/locale/ro.json
index 026b0279d..4ea87ed3b 100644
--- a/apps/documenteditor/mobile/locale/ro.json
+++ b/apps/documenteditor/mobile/locale/ro.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Ați atins numărul maxim de utilizatori ai %1 editoare. Pentru detalii, contactați administratorul dvs.",
"warnNoLicense": "Ați atins numărul maxim de conexiuni simultane la %1 de editoare. Documentul este disponibil numai pentru vizualizare. Contactați %1 Departamentul de Vânzări pentru acordarea condițiilor personale de actualizare.",
"warnNoLicenseUsers": "Ați atins numărul maxim de utilizatori ai %1 editoare. Contactați Grup Vânzări %1 pentru acordarea condițiilor personale de licențiere.",
- "warnProcessRightsChange": "Nu aveți permisiunea de editare pentru fișier."
+ "warnProcessRightsChange": "Nu aveți permisiunea de editare pentru fișier.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Fișierul protejat",
diff --git a/apps/documenteditor/mobile/locale/ru.json b/apps/documenteditor/mobile/locale/ru.json
index 676f21962..081d21f17 100644
--- a/apps/documenteditor/mobile/locale/ru.json
+++ b/apps/documenteditor/mobile/locale/ru.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Вы достигли лимита на количество пользователей редакторов %1. Свяжитесь с администратором, чтобы узнать больше.",
"warnNoLicense": "Вы достигли лимита на одновременные подключения к редакторам %1. Этот документ будет открыт на просмотр. Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия обновления.",
"warnNoLicenseUsers": "Вы достигли лимита на количество пользователей редакторов %1. Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия обновления.",
- "warnProcessRightsChange": "У вас нет прав на редактирование этого файла."
+ "warnProcessRightsChange": "У вас нет прав на редактирование этого файла.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Защищенный файл",
diff --git a/apps/documenteditor/mobile/locale/sk.json b/apps/documenteditor/mobile/locale/sk.json
index 08fa93d20..f5c4992fc 100644
--- a/apps/documenteditor/mobile/locale/sk.json
+++ b/apps/documenteditor/mobile/locale/sk.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Dosiahli ste limit %1 editora v režime spolupráce na úpravách. Ohľadne podrobnosti sa obráťte na svojho správcu. ",
"warnNoLicense": "Dosiahli ste limit pre simultánne pripojenia k %1 editorom. Tento dokument sa otvorí iba na prezeranie. Kontaktujte predajný tím %1 pre osobné podmienky inovácie.",
"warnNoLicenseUsers": "Dosiahli ste limit %1 editora. Pre rozšírenie funkcií kontaktujte %1 obchodné oddelenie.",
- "warnProcessRightsChange": "Nemáte povolenie na úpravu tohto súboru."
+ "warnProcessRightsChange": "Nemáte povolenie na úpravu tohto súboru.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Chránený súbor",
diff --git a/apps/documenteditor/mobile/locale/sl.json b/apps/documenteditor/mobile/locale/sl.json
index e1fec637e..4542b418d 100644
--- a/apps/documenteditor/mobile/locale/sl.json
+++ b/apps/documenteditor/mobile/locale/sl.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "You don't have permission to edit this file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Protected File",
diff --git a/apps/documenteditor/mobile/locale/sv.json b/apps/documenteditor/mobile/locale/sv.json
index e1fec637e..4542b418d 100644
--- a/apps/documenteditor/mobile/locale/sv.json
+++ b/apps/documenteditor/mobile/locale/sv.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "You don't have permission to edit this file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Protected File",
diff --git a/apps/documenteditor/mobile/locale/tr.json b/apps/documenteditor/mobile/locale/tr.json
index 2035cb607..25d15d53f 100644
--- a/apps/documenteditor/mobile/locale/tr.json
+++ b/apps/documenteditor/mobile/locale/tr.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "Bu dosyayı düzenleme izniniz yok.",
"textNoTextFound": "Text not found",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}"
+ "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Korumalı dosya",
diff --git a/apps/documenteditor/mobile/locale/uk.json b/apps/documenteditor/mobile/locale/uk.json
index cf82c5042..98ec8e1d9 100644
--- a/apps/documenteditor/mobile/locale/uk.json
+++ b/apps/documenteditor/mobile/locale/uk.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "Ви досягли ліміту на кількість користувачів редакторів %1. Зв'яжіться з адміністратором, щоб дізнатися більше.",
"warnNoLicense": "Ви досягли ліміту на одночасне підключення до редакторів %1. Цей документ буде відкрито для перегляду. Напишіть у відділ продажу %1, щоб обговорити індивідуальні умови оновлення.",
"warnNoLicenseUsers": "Ви досягли ліміту на одночасне підключення до редакторів %1. Напишіть у відділ продаж %1, для обговорення індивідуальних умов ліцензування.",
- "warnProcessRightsChange": "У вас немає прав на редагування цього файлу."
+ "warnProcessRightsChange": "У вас немає прав на редагування цього файлу.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Захищений файл",
diff --git a/apps/documenteditor/mobile/locale/vi.json b/apps/documenteditor/mobile/locale/vi.json
index e1fec637e..4542b418d 100644
--- a/apps/documenteditor/mobile/locale/vi.json
+++ b/apps/documenteditor/mobile/locale/vi.json
@@ -532,7 +532,8 @@
"warnProcessRightsChange": "You don't have permission to edit this file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "Protected File",
diff --git a/apps/documenteditor/mobile/locale/zh-TW.json b/apps/documenteditor/mobile/locale/zh-TW.json
index e99160557..fd15d4e75 100644
--- a/apps/documenteditor/mobile/locale/zh-TW.json
+++ b/apps/documenteditor/mobile/locale/zh-TW.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "您已達到%1個編輯器的用戶限制。請與您的管理員聯繫以了解更多信息。",
"warnNoLicense": "您已達到同時連接到 %1 編輯器的限制。此文件將只提供檢視。有關個人升級條款,請聯繫 %1 業務團隊。",
"warnNoLicenseUsers": "您已達到%1個編輯器的用戶限制。與%1銷售團隊聯繫以了解個人升級條款。",
- "warnProcessRightsChange": "您沒有編輯這個文件的權限。"
+ "warnProcessRightsChange": "您沒有編輯這個文件的權限。",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "受保護的檔案",
@@ -655,7 +656,8 @@
"textNavigation": "Navigation",
"textEmptyScreens": "There are no headings in the document. Apply a headings style to the text so that it appeas in the table of cotents.",
"textBeginningDocument": "Beginning of document",
- "textEmptyHeading": "Empty Heading"
+ "textEmptyHeading": "Empty Heading",
+ "textPdfProducer": "PDF Producer"
},
"Toolbar": {
"dlgLeaveMsgText": "您有未儲存的變更。點擊“留在此頁面”以等待自動儲存。點擊“離開此頁面”以放棄所有未儲存的變更。",
diff --git a/apps/documenteditor/mobile/locale/zh.json b/apps/documenteditor/mobile/locale/zh.json
index e3e100b0b..6b102658c 100644
--- a/apps/documenteditor/mobile/locale/zh.json
+++ b/apps/documenteditor/mobile/locale/zh.json
@@ -532,7 +532,8 @@
"warnLicenseUsersExceeded": "你触发了 %1 编辑器的同时在线数限制。可联系管理员来了解更多信息。",
"warnNoLicense": "你已经触发了 %1 编辑器的同时在线数限制. 该文档打开后,你将只能查看。请联系 %1 的销售团队,获取个人升级条款。",
"warnNoLicenseUsers": "你触发了 %1 编辑器的同时在线数限制。请与 %1 的销售团队联系,以获取个人升级条款。",
- "warnProcessRightsChange": "你没有编辑这个文件的权限。"
+ "warnProcessRightsChange": "你没有编辑这个文件的权限。",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
},
"Settings": {
"advDRMOptions": "受保护的文件",
diff --git a/apps/documenteditor/mobile/src/controller/Main.jsx b/apps/documenteditor/mobile/src/controller/Main.jsx
index 0a3ac3b19..534840ae5 100644
--- a/apps/documenteditor/mobile/src/controller/Main.jsx
+++ b/apps/documenteditor/mobile/src/controller/Main.jsx
@@ -49,6 +49,7 @@ class MainController extends Component {
};
this.defaultTitleText = __APP_TITLE_TEXT__;
+ this.stackMacrosRequests = [];
const { t } = this.props;
this._t = t('Main', {returnObjects:true});
@@ -99,6 +100,9 @@ class MainController extends Component {
}
this.props.storeApplicationSettings.changeMacrosSettings(value);
+ value = localStorage.getItem("de-mobile-allow-macros-request");
+ this.props.storeApplicationSettings.changeMacrosRequest((value !== null) ? parseInt(value) : 0);
+
Common.Notifications.trigger('configOptionsFill');
};
@@ -160,6 +164,7 @@ class MainController extends Component {
this.api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
this.api.asc_registerCallback('asc_onDocumentContentReady', onDocumentContentReady);
this.api.asc_registerCallback('asc_onLicenseChanged', this.onLicenseChanged.bind(this));
+ this.api.asc_registerCallback('asc_onMacrosPermissionRequest', this.onMacrosPermissionRequest.bind(this));
this.api.asc_registerCallback('asc_onRunAutostartMacroses', this.onRunAutostartMacroses.bind(this));
this.api.asc_setDocInfo(docInfo);
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
@@ -1008,6 +1013,70 @@ class MainController extends Component {
}
}
+ onMacrosPermissionRequest (url, callback) {
+ if (url && callback) {
+ this.stackMacrosRequests.push({url: url, callback: callback});
+ if (this.stackMacrosRequests.length>1) {
+ return;
+ }
+ } else if (this.stackMacrosRequests.length>0) {
+ url = this.stackMacrosRequests[0].url;
+ callback = this.stackMacrosRequests[0].callback;
+ } else
+ return;
+
+ const value = this.props.storeApplicationSettings.macrosRequest;
+ if (value>0) {
+ callback && callback(value === 1);
+ this.stackMacrosRequests.shift();
+ this.onMacrosPermissionRequest();
+ } else {
+ const { t } = this.props;
+ const _t = t('Main', {returnObjects:true});
+ f7.dialog.create({
+ title: _t.notcriticalErrorTitle,
+ text: _t.textRequestMacros.replace('%1', url),
+ cssClass: 'dlg-macros-request',
+ content: `
+
+ ${_t.textRemember}
+
`,
+ buttons: [{
+ text: _t.textYes,
+ onClick: () => {
+ const dontshow = $$('input[name="checkbox-show-macros"]').prop('checked');
+ if (dontshow) {
+ this.props.storeApplicationSettings.changeMacrosRequest(1);
+ LocalStorage.setItem("de-mobile-allow-macros-request", 1);
+ }
+ setTimeout(() => {
+ if (callback) callback(true);
+ this.stackMacrosRequests.shift();
+ this.onMacrosPermissionRequest();
+ }, 1);
+ }},
+ {
+ text: _t.textNo,
+ onClick: () => {
+ const dontshow = $$('input[name="checkbox-show-macros"]').prop('checked');
+ if (dontshow) {
+ this.props.storeApplicationSettings.changeMacrosRequest(2);
+ LocalStorage.setItem("de-mobile-allow-macros-request", 2);
+ }
+ setTimeout(() => {
+ if (callback) callback(false);
+ this.stackMacrosRequests.shift();
+ this.onMacrosPermissionRequest();
+ }, 1);
+ }
+ }]
+ }).open();
+ }
+ }
+
render() {
return (
diff --git a/apps/documenteditor/mobile/src/index_dev.html b/apps/documenteditor/mobile/src/index_dev.html
index 315fa328e..f3fd1bd00 100644
--- a/apps/documenteditor/mobile/src/index_dev.html
+++ b/apps/documenteditor/mobile/src/index_dev.html
@@ -2,7 +2,7 @@
-
+
diff --git a/apps/documenteditor/mobile/src/store/applicationSettings.js b/apps/documenteditor/mobile/src/store/applicationSettings.js
index 0cc34353f..952686eb2 100644
--- a/apps/documenteditor/mobile/src/store/applicationSettings.js
+++ b/apps/documenteditor/mobile/src/store/applicationSettings.js
@@ -11,13 +11,15 @@ export class storeApplicationSettings {
isComments: observable,
isResolvedComments: observable,
macrosMode: observable,
- changeSpellCheck: action,
+ macrosRequest: observable,
+ changeSpellCheck: action,
changeUnitMeasurement: action,
changeNoCharacters: action,
changeShowTableEmptyLine: action,
changeDisplayComments: action,
changeDisplayResolved: action,
- changeMacrosSettings: action
+ changeMacrosSettings: action,
+ changeMacrosRequest: action
})
}
@@ -28,6 +30,7 @@ export class storeApplicationSettings {
isComments = false;
isResolvedComments = false;
macrosMode = 0;
+ macrosRequest = 0;
changeUnitMeasurement(value) {
this.unitMeasurement = +value;
@@ -57,4 +60,8 @@ export class storeApplicationSettings {
changeMacrosSettings(value) {
this.macrosMode = +value;
}
+
+ changeMacrosRequest(value) {
+ this.macrosRequest = value;
+ }
}
\ No newline at end of file
diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js
index 878a86ad7..ecb54b58b 100644
--- a/apps/presentationeditor/main/app/controller/Main.js
+++ b/apps/presentationeditor/main/app/controller/Main.js
@@ -152,6 +152,7 @@ define([
strongCompare : function(obj1, obj2){return obj1.type === obj2.type;},
weakCompare : function(obj1, obj2){return obj1.type === obj2.type;}
});
+ this.stackMacrosRequests = [];
// Initialize viewport
if (!Common.Utils.isBrowserSupported()){
@@ -393,6 +394,9 @@ define([
value = parseInt(value);
Common.Utils.InternalSettings.set("pe-macros-mode", value);
+ value = Common.localStorage.getItem("pe-allow-macros-request");
+ Common.Utils.InternalSettings.set("pe-allow-macros-request", (value !== null) ? parseInt(value) : 0);
+
this.appOptions.wopi = this.editorConfig.wopi;
Common.Controllers.Desktop.init(this.appOptions);
@@ -443,6 +447,7 @@ define([
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this));
+ this.api.asc_registerCallback('asc_onMacrosPermissionRequest', _.bind(this.onMacrosPermissionRequest, this));
this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));
this.api.asc_setDocInfo(docInfo);
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
@@ -2280,6 +2285,47 @@ define([
}
},
+ onMacrosPermissionRequest: function(url, callback) {
+ if (url && callback) {
+ this.stackMacrosRequests.push({url: url, callback: callback});
+ if (this.stackMacrosRequests.length>1) {
+ return;
+ }
+ } else if (this.stackMacrosRequests.length>0) {
+ url = this.stackMacrosRequests[0].url;
+ callback = this.stackMacrosRequests[0].callback;
+ } else
+ return;
+
+ var me = this;
+ var value = Common.Utils.InternalSettings.get("pe-allow-macros-request");
+ if (value>0) {
+ callback && callback(value === 1);
+ this.stackMacrosRequests.shift();
+ this.onMacrosPermissionRequest();
+ } else {
+ Common.UI.warning({
+ msg: this.textRequestMacros.replace('%1', url),
+ buttons: ['yes', 'no'],
+ primary: 'yes',
+ dontshow: true,
+ textDontShow: this.textRememberMacros,
+ maxwidth: 600,
+ callback: function(btn, dontshow){
+ if (dontshow) {
+ Common.Utils.InternalSettings.set("pe-allow-macros-request", (btn == 'yes') ? 1 : 2);
+ Common.localStorage.setItem("pe-allow-macros-request", (btn == 'yes') ? 1 : 2);
+ }
+ setTimeout(function() {
+ if (callback) callback(btn == 'yes');
+ me.stackMacrosRequests.shift();
+ me.onMacrosPermissionRequest();
+ }, 1);
+ }
+ });
+ }
+ },
+
loadAutoCorrectSettings: function() {
// autocorrection
var me = this;
@@ -2933,7 +2979,9 @@ define([
textConvertEquation: 'This equation was created with an old version of equation editor which is no longer supported. Converting this equation to Office Math ML format will make it editable. Do you want to convert this equation?',
textApplyAll: 'Apply to all equations',
textLearnMore: 'Learn More',
- textReconnect: 'Connection is restored'
+ textReconnect: 'Connection is restored',
+ textRequestMacros: 'A macro makes a request to URL. Do you want to allow the request to the %1?',
+ textRememberMacros: 'Remember my choice for all macros'
}
})(), PE.Controllers.Main || {}))
});
diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json
index 614907c39..66d8d0598 100644
--- a/apps/presentationeditor/main/locale/en.json
+++ b/apps/presentationeditor/main/locale/en.json
@@ -680,6 +680,7 @@
"PE.Controllers.Main.textPaidFeature": "Paid feature",
"PE.Controllers.Main.textReconnect": "Connection is restored",
"PE.Controllers.Main.textRemember": "Remember my choice for all files",
+ "PE.Controllers.Main.textRememberMacros": "Remember my choice for all macros",
"PE.Controllers.Main.textRenameError": "User name must not be empty.",
"PE.Controllers.Main.textRenameLabel": "Enter a name to be used for collaboration",
"PE.Controllers.Main.textShape": "Shape",
@@ -960,6 +961,7 @@
"PE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"PE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
+ "PE.Controllers.Main.textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?",
"PE.Controllers.Statusbar.textDisconnect": "Connection is lost Trying to connect. Please check connection settings.",
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device. The text style will be displayed using one of the system fonts, the saved font will be used when it is available. Do you want to continue?",
diff --git a/apps/presentationeditor/mobile/locale/az.json b/apps/presentationeditor/mobile/locale/az.json
index bc5c0c962..9d3767baa 100644
--- a/apps/presentationeditor/mobile/locale/az.json
+++ b/apps/presentationeditor/mobile/locale/az.json
@@ -126,7 +126,8 @@
"warnProcessRightsChange": "Faylı redaktə etmək icazəniz yoxdur.",
"textNoTextFound": "Text not found",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}"
+ "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/be.json b/apps/presentationeditor/mobile/locale/be.json
index f0a657856..7c8064ea2 100644
--- a/apps/presentationeditor/mobile/locale/be.json
+++ b/apps/presentationeditor/mobile/locale/be.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
- "warnProcessRightsChange": "You don't have permission to edit the file."
+ "warnProcessRightsChange": "You don't have permission to edit the file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/bg.json b/apps/presentationeditor/mobile/locale/bg.json
index 263ce07ec..796b4db4b 100644
--- a/apps/presentationeditor/mobile/locale/bg.json
+++ b/apps/presentationeditor/mobile/locale/bg.json
@@ -126,7 +126,8 @@
"warnProcessRightsChange": "You don't have permission to edit the file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/ca.json b/apps/presentationeditor/mobile/locale/ca.json
index 3de0ffab8..de1b4d506 100644
--- a/apps/presentationeditor/mobile/locale/ca.json
+++ b/apps/presentationeditor/mobile/locale/ca.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Heu arribat al límit d'usuari per a %1 editors. Contacteu amb l'administrador per a més informació.",
"warnNoLicense": "Heu arribat al límit de connexions simultànies a %1 editors. Aquest document només s'obrirà en mode lectura. Contacteu amb l'equip de vendes %1 per conèixer les condicions d'actualització personal.",
"warnNoLicenseUsers": "Heu arribat al límit d'usuaris per a %1 editors. Contacteu amb l'equip de vendes de %1 per obtenir les condicions de millora personals dels vostres serveis.",
- "warnProcessRightsChange": "No teniu permís per editar el fitxer."
+ "warnProcessRightsChange": "No teniu permís per editar el fitxer.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/cs.json b/apps/presentationeditor/mobile/locale/cs.json
index c9761b300..6ac01e37a 100644
--- a/apps/presentationeditor/mobile/locale/cs.json
+++ b/apps/presentationeditor/mobile/locale/cs.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Došlo dosažení limitu %1 editorů v režimu spolupráce na úpravách. Ohledně podrobností se obraťte na svého správce.",
"warnNoLicense": "Došlo k dosažení limitu souběžného připojení %1 editorů. Tento dokument bude otevřen pouze pro náhled. Pro rozšíření funkcí kontaktujte %1 obchodní oddělení.",
"warnNoLicenseUsers": "Došlo k dosažení limitu %1 editorů. Pro rozšíření funkcí kontaktujte %1 obchodní oddělení.",
- "warnProcessRightsChange": "Nemáte oprávnění pro úpravu tohoto dokumentu."
+ "warnProcessRightsChange": "Nemáte oprávnění pro úpravu tohoto dokumentu.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/de.json b/apps/presentationeditor/mobile/locale/de.json
index c58f75a15..3dd421391 100644
--- a/apps/presentationeditor/mobile/locale/de.json
+++ b/apps/presentationeditor/mobile/locale/de.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Sie haben das Benutzerlimit für %1-Editoren erreicht. Bitte wenden Sie sich an Ihren Administrator, um weitere Informationen zu erhalten.",
"warnNoLicense": "Sie haben die maximale Anzahl von gleichzeitigen Verbindungen in %1-Editoren erreicht. Die Bearbeitung ist jetzt in diesem Dokument nicht verfügbar. Bitte kontaktieren Sie unser Verkaufsteam, um persönliche Upgrade-Bedingungen zu erhalten.",
"warnNoLicenseUsers": "Sie haben das Benutzerlimit für %1-Editoren erreicht. Bitte kontaktieren Sie unser Verkaufsteam, um persönliche Upgrade-Bedingungen zu erhalten.",
- "warnProcessRightsChange": "Sie können diese Datei nicht bearbeiten."
+ "warnProcessRightsChange": "Sie können diese Datei nicht bearbeiten.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/el.json b/apps/presentationeditor/mobile/locale/el.json
index 4d2b0cb62..e7b9712d5 100644
--- a/apps/presentationeditor/mobile/locale/el.json
+++ b/apps/presentationeditor/mobile/locale/el.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Έχετε φτάσει το όριο χρήστη για συντάκτες %1. Επικοινωνήστε με τον διαχειριστή σας για περισσότερες πληροφορίες.",
"warnNoLicense": "Φτάσατε το όριο ταυτόχρονων συνδέσεων σε %1 συντάκτες. Το έγγραφο θα ανοίξει μόνο για ανάγνωση. Επικοινωνήστε με την ομάδα πωλήσεων %1 για τους όρους αναβάθμισης.",
"warnNoLicenseUsers": "Έχετε φτάσει το όριο χρήστη για συντάκτες %1. Επικοινωνήστε με την ομάδα πωλήσεων %1 για προσωπικούς όρους αναβάθμισης.",
- "warnProcessRightsChange": "Δεν έχετε δικαίωμα επεξεργασίας του αρχείου."
+ "warnProcessRightsChange": "Δεν έχετε δικαίωμα επεξεργασίας του αρχείου.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json
index 61719ddc8..d45efa3e9 100644
--- a/apps/presentationeditor/mobile/locale/en.json
+++ b/apps/presentationeditor/mobile/locale/en.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
- "warnProcessRightsChange": "You don't have permission to edit the file."
+ "warnProcessRightsChange": "You don't have permission to edit the file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/es.json b/apps/presentationeditor/mobile/locale/es.json
index 9e67ba067..47b6f7a15 100644
--- a/apps/presentationeditor/mobile/locale/es.json
+++ b/apps/presentationeditor/mobile/locale/es.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Ha alcanzado el límite de usuarios para los editores de %1. Contacte con su administrador para recibir más información.",
"warnNoLicense": "Ha alcanzado el límite de conexiones simultáneas con %1 editores. Este documento se abrirá sólo para su visualización. Póngase en contacto con el equipo de ventas de %1 para conocer las condiciones de actualización personal.",
"warnNoLicenseUsers": "Ha alcanzado el límite de usuarios para los editores de %1. Contacte con el equipo de ventas de %1 para conocer los términos de actualización personal.",
- "warnProcessRightsChange": "No tiene permiso para editar el archivo."
+ "warnProcessRightsChange": "No tiene permiso para editar el archivo.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/fr.json b/apps/presentationeditor/mobile/locale/fr.json
index 770e592c6..a07c8040a 100644
--- a/apps/presentationeditor/mobile/locale/fr.json
+++ b/apps/presentationeditor/mobile/locale/fr.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Vous avez dépassé le nombre maximal d’utilisateurs des éditeurs %1. Pour en savoir plus, contactez votre administrateur.",
"warnNoLicense": "Vous avez dépassé le nombre maximal de connexions simultanées aux éditeurs %1. Ce document sera ouvert en lecture seule. Contactez l’équipe des ventes %1 pour mettre à jour les termes de la licence.",
"warnNoLicenseUsers": "Vous avez dépassé le nombre maximal d’utilisateurs des éditeurs %1. Contactez l’équipe des ventes %1 pour mettre à jour les termes de la licence.",
- "warnProcessRightsChange": "Vous n'avez pas la permission de modifier ce fichier."
+ "warnProcessRightsChange": "Vous n'avez pas la permission de modifier ce fichier.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/gl.json b/apps/presentationeditor/mobile/locale/gl.json
index a7a971f54..33eb9cbfa 100644
--- a/apps/presentationeditor/mobile/locale/gl.json
+++ b/apps/presentationeditor/mobile/locale/gl.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Alcanzou o límite de usuarios para os editores de %1. Por favor, contacte co se uadministrador para recibir máis información.",
"warnNoLicense": "Alcanzou o límite de conexións simultáneas con %1 editores. Este documento abrirase para as úa visualización. Póñase en contacto co equipo de vendas de %1 para coñecer as condicións de actualización persoal.",
"warnNoLicenseUsers": "Alcanzou o límite de usuarios para os editores de %1. Contacte co equipo de vendas de %1 para coñecer os termos de actualización persoal.",
- "warnProcessRightsChange": "Non ten permiso para editar o ficheiro."
+ "warnProcessRightsChange": "Non ten permiso para editar o ficheiro.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/hu.json b/apps/presentationeditor/mobile/locale/hu.json
index 760897efa..b5162d55d 100644
--- a/apps/presentationeditor/mobile/locale/hu.json
+++ b/apps/presentationeditor/mobile/locale/hu.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Elérte a(z) %1 szerkesztőhöz tartozó felhasználói korlátját. További információért forduljon rendszergazdájához.",
"warnNoLicense": "Elérte a(z) %1 szerkesztővel való egyidejű kapcsolódási korlátot. Ez a dokumentum csak megtekintésre nyílik meg. Lépjen kapcsolatba a(z) %1 értékesítési csapattal a személyes frissítés feltételekért.",
"warnNoLicenseUsers": "Elérte a(z) %1 szerkesztőhöz tartozó felhasználói korlátját. Vegye fel a kapcsolatot a(z) %1 értékesítési csapattal a személyes frissítési feltételekért.",
- "warnProcessRightsChange": "Nincs engedélye a fájl szerkesztésére."
+ "warnProcessRightsChange": "Nincs engedélye a fájl szerkesztésére.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/id.json b/apps/presentationeditor/mobile/locale/id.json
index c1e902b36..211d6701e 100644
--- a/apps/presentationeditor/mobile/locale/id.json
+++ b/apps/presentationeditor/mobile/locale/id.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Anda sudah mencapai batas user untuk %1 editor. Hubungi admin Anda untuk mempelajari lebih lanjut.",
"warnNoLicense": "Anda sudah mencapai batas untuk koneksi bersamaan ke %1 editor. Dokumen ini akan dibuka untuk dilihat saja. Hubungi %1 tim sales untuk syarat personal upgrade.",
"warnNoLicenseUsers": "Anda sudah mencapai batas user untuk %1 editor. Hubungi %1 tim sales untuk syarat personal upgrade.",
- "warnProcessRightsChange": "Anda tidak memiliki izin edit file ini."
+ "warnProcessRightsChange": "Anda tidak memiliki izin edit file ini.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/it.json b/apps/presentationeditor/mobile/locale/it.json
index 9efb1e4bd..a034a6a2b 100644
--- a/apps/presentationeditor/mobile/locale/it.json
+++ b/apps/presentationeditor/mobile/locale/it.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Hai raggiunto il limite degli utenti per gli editor %1. Ti preghiamo di contattare il tuo amministratore per maggior informazioni.",
"warnNoLicense": "Hai raggiunto il limite delle connessioni simultanee agli editor %1. Questo documento sarà aperto solo in modalità di visualizzazione. Ti preghiamo di contattare il team di vendite di %1 per i termini di aggiornamento personali.",
"warnNoLicenseUsers": "Hai raggiunto il limite degli utenti per gli editor %1. Ti preghiamo di contattare il team di vendite di %1 per i termini di aggiornamento personali.",
- "warnProcessRightsChange": "Non hai il permesso di modificare il file."
+ "warnProcessRightsChange": "Non hai il permesso di modificare il file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/ja.json b/apps/presentationeditor/mobile/locale/ja.json
index 0e20acb99..daddc2959 100644
--- a/apps/presentationeditor/mobile/locale/ja.json
+++ b/apps/presentationeditor/mobile/locale/ja.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "%1エディターのユーザー制限に達しました。 詳細についてはアドミニストレータを連絡してください。",
"warnNoLicense": "%1エディター 時接続数の制限に達しました。この文書が見るだけのために開かれる。個人的なアップグレード条件については、%1営業チームを連絡してください。",
"warnNoLicenseUsers": "%1エディターのユーザー制限に達しました。 個人的なアップグレード条件については、%1営業チームを連絡してください。",
- "warnProcessRightsChange": "ファイルを編集する権限がありません!"
+ "warnProcessRightsChange": "ファイルを編集する権限がありません!",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/ko.json b/apps/presentationeditor/mobile/locale/ko.json
index 9edcda3be..ce085ca61 100644
--- a/apps/presentationeditor/mobile/locale/ko.json
+++ b/apps/presentationeditor/mobile/locale/ko.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "편집자 사용자 한도인 %1명에 도달했습니다. 자세한 내용은 관리자에게 문의하십시오.",
"warnNoLicense": "% 1 편집 연결 수 제한에 도달했습니다. 이 문서는 보기 모드로 열립니다. 개인적인 업그레이드 사항은 % 1 영업팀에 연락하십시오.",
"warnNoLicenseUsers": "ONLYOFFICE 편집자의이 버전은 동시 사용자에게 일정한 제한이 있습니다. 더 필요한 것이 있으면 현재 라이센스를 업그레이드하거나 상용 라이센스를 구입하십시오.",
- "warnProcessRightsChange": "파일을 수정할 수 있는 권한이 없습니다."
+ "warnProcessRightsChange": "파일을 수정할 수 있는 권한이 없습니다.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/lo.json b/apps/presentationeditor/mobile/locale/lo.json
index dcaecb5fe..a9333171d 100644
--- a/apps/presentationeditor/mobile/locale/lo.json
+++ b/apps/presentationeditor/mobile/locale/lo.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "ຈໍານວນ ການເຊື່ອມຕໍ່ພ້ອມກັນກັບຜູ້ແກ້ໄຂ ແມ່ນເກີນກໍານົດ % 1. ຕິດຕໍ່ທີມບໍລິຫານເພື່ອຂໍ້ມູນເພີ່ມເຕີ່ມ",
"warnNoLicense": "ທ່ານໄດ້ຖືກຈຳກັດສິດພຽງເທົ່ານີ້ສຳຫລັບການເຊື່່ອມພ້ອມກັນກັບເຄື່ອງມືແກ້ໄຂ %1 ແລ້ວເອກະສານນີ້ຈະເປີດໃຫ້ເບີ່ງເທົ່ານັ້ນ ຕິດຕໍ່ທີມຂາຍ %1 ສຳຫລັບເງື່ອນໄຂການອັບເກດສ່ວນບຸກຄົນ",
"warnNoLicenseUsers": "ຈໍານວນການເຊື່ອມຕໍ່ພ້ອມກັນກັບບັນນາທິການ ແມ່ນເກີນກໍານົດ % 1. ຕິດຕໍ່ ທີມຂາຍ %1 ສຳລັບຂໍ້ກຳນົດການຍົກລະດັບສິດ",
- "warnProcessRightsChange": "ທ່ານບໍ່ມີສິດໃນການແກ້ໄຂໄຟລ໌ນີ້."
+ "warnProcessRightsChange": "ທ່ານບໍ່ມີສິດໃນການແກ້ໄຂໄຟລ໌ນີ້.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/lv.json b/apps/presentationeditor/mobile/locale/lv.json
index 263ce07ec..796b4db4b 100644
--- a/apps/presentationeditor/mobile/locale/lv.json
+++ b/apps/presentationeditor/mobile/locale/lv.json
@@ -126,7 +126,8 @@
"warnProcessRightsChange": "You don't have permission to edit the file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/nb.json b/apps/presentationeditor/mobile/locale/nb.json
index 263ce07ec..796b4db4b 100644
--- a/apps/presentationeditor/mobile/locale/nb.json
+++ b/apps/presentationeditor/mobile/locale/nb.json
@@ -126,7 +126,8 @@
"warnProcessRightsChange": "You don't have permission to edit the file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/nl.json b/apps/presentationeditor/mobile/locale/nl.json
index c042aa342..ef25e9ce8 100644
--- a/apps/presentationeditor/mobile/locale/nl.json
+++ b/apps/presentationeditor/mobile/locale/nl.json
@@ -126,7 +126,8 @@
"warnNoLicenseUsers": "U heeft de gebruikerslimiet voor %1 gelijktijdige gebruikers bereikt. Neem contact op met de verkoopafdeling voor persoonlijke upgradevoorwaarden.",
"warnProcessRightsChange": "Je hebt geen toestemming om het bestand te bewerken.",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}"
+ "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/pl.json b/apps/presentationeditor/mobile/locale/pl.json
index 263ce07ec..796b4db4b 100644
--- a/apps/presentationeditor/mobile/locale/pl.json
+++ b/apps/presentationeditor/mobile/locale/pl.json
@@ -126,7 +126,8 @@
"warnProcessRightsChange": "You don't have permission to edit the file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/pt-PT.json b/apps/presentationeditor/mobile/locale/pt-PT.json
index 3a82e9de6..8a482d860 100644
--- a/apps/presentationeditor/mobile/locale/pt-PT.json
+++ b/apps/presentationeditor/mobile/locale/pt-PT.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Atingiu o limite de %1 editores. Contacte o seu administrador para obter detalhes.",
"warnNoLicense": "Atingiu o limite de ligações simultâneas a %1 editores. Este documento será aberto apenas para visualização. Contacte a %1 equipa de vendas para consultar os termos de atualização para si.",
"warnNoLicenseUsers": "Atingiu o limite de %1 editores. Contacte a equipa comercial %1 para obter mais informações.",
- "warnProcessRightsChange": "Não tem autorização para editar este ficheiro."
+ "warnProcessRightsChange": "Não tem autorização para editar este ficheiro.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/pt.json b/apps/presentationeditor/mobile/locale/pt.json
index 8cd58a9a6..da6679f98 100644
--- a/apps/presentationeditor/mobile/locale/pt.json
+++ b/apps/presentationeditor/mobile/locale/pt.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Você atingiu o limite de usuários para editores %1. Entre em contato com seu administrador para saber mais.",
"warnNoLicense": "Você atingiu o limite de conexões simultâneas para% 1 editores. Este documento será aberto apenas para visualização. Contate a equipe de vendas% 1 para termos de atualização pessoal.",
"warnNoLicenseUsers": "Você atingiu o limite de usuários para editores %1. Entre em contato com a equipe de vendas da %1 para obter os termos de atualização pessoais.",
- "warnProcessRightsChange": "Você não tem permissão para editar o arquivo."
+ "warnProcessRightsChange": "Você não tem permissão para editar o arquivo.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/ro.json b/apps/presentationeditor/mobile/locale/ro.json
index 6d6ab4cb6..3dd6cf550 100644
--- a/apps/presentationeditor/mobile/locale/ro.json
+++ b/apps/presentationeditor/mobile/locale/ro.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Ați atins numărul maxim de utilizatori ai %1 editoare. Pentru detalii, contactați administratorul dvs.",
"warnNoLicense": "Ați atins numărul maxim de conexiuni simultane la %1 de editoare. Documentul este disponibil numai pentru vizualizare. Contactați %1 Departamentul de Vânzări pentru acordarea condițiilor personale de actualizare.",
"warnNoLicenseUsers": "Ați atins numărul maxim de utilizatori ai %1 editoare. Contactați Grup Vânzări %1 pentru acordarea condițiilor personale de licențiere.",
- "warnProcessRightsChange": "Nu aveți permisiunea de editare pentru fișier."
+ "warnProcessRightsChange": "Nu aveți permisiunea de editare pentru fișier.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/ru.json b/apps/presentationeditor/mobile/locale/ru.json
index 0fa3213ec..1565248d5 100644
--- a/apps/presentationeditor/mobile/locale/ru.json
+++ b/apps/presentationeditor/mobile/locale/ru.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Вы достигли лимита на количество пользователей редакторов %1. Свяжитесь с администратором, чтобы узнать больше.",
"warnNoLicense": "Вы достигли лимита на одновременные подключения к редакторам %1. Этот документ будет открыт на просмотр. Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия обновления.",
"warnNoLicenseUsers": "Вы достигли лимита на количество пользователей редакторов %1. Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия обновления.",
- "warnProcessRightsChange": "У вас нет прав на редактирование этого файла."
+ "warnProcessRightsChange": "У вас нет прав на редактирование этого файла.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/sk.json b/apps/presentationeditor/mobile/locale/sk.json
index b6a1304d2..0410c4f7a 100644
--- a/apps/presentationeditor/mobile/locale/sk.json
+++ b/apps/presentationeditor/mobile/locale/sk.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "Dosiahli ste limit %1 editora v režime spolupráce na úpravách. Ohľadne podrobnosti sa obráťte na svojho správcu. ",
"warnNoLicense": "Dosiahli ste limit pre simultánne pripojenia k %1 editorom. Tento dokument sa otvorí iba na prezeranie. Kontaktujte predajný tím %1 pre osobné podmienky inovácie.",
"warnNoLicenseUsers": "Dosiahli ste limit %1 editora. Pre rozšírenie funkcií kontaktujte %1 obchodné oddelenie.",
- "warnProcessRightsChange": "Nemáte povolenie na úpravu súboru."
+ "warnProcessRightsChange": "Nemáte povolenie na úpravu súboru.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/sl.json b/apps/presentationeditor/mobile/locale/sl.json
index f1677d1ab..4c808d654 100644
--- a/apps/presentationeditor/mobile/locale/sl.json
+++ b/apps/presentationeditor/mobile/locale/sl.json
@@ -398,7 +398,8 @@
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
- "warnProcessRightsChange": "You don't have permission to edit the file."
+ "warnProcessRightsChange": "You don't have permission to edit the file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/tr.json b/apps/presentationeditor/mobile/locale/tr.json
index 569865e35..0ccc92ef6 100644
--- a/apps/presentationeditor/mobile/locale/tr.json
+++ b/apps/presentationeditor/mobile/locale/tr.json
@@ -126,7 +126,8 @@
"warnProcessRightsChange": "Dosyayı düzenleme izniniz yok.",
"textNoTextFound": "Text not found",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}"
+ "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/uk.json b/apps/presentationeditor/mobile/locale/uk.json
index 098e48b70..195909e73 100644
--- a/apps/presentationeditor/mobile/locale/uk.json
+++ b/apps/presentationeditor/mobile/locale/uk.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
- "warnProcessRightsChange": "You don't have permission to edit the file."
+ "warnProcessRightsChange": "You don't have permission to edit the file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/vi.json b/apps/presentationeditor/mobile/locale/vi.json
index 263ce07ec..796b4db4b 100644
--- a/apps/presentationeditor/mobile/locale/vi.json
+++ b/apps/presentationeditor/mobile/locale/vi.json
@@ -126,7 +126,8 @@
"warnProcessRightsChange": "You don't have permission to edit the file.",
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textNoTextFound": "Text not found"
+ "textNoTextFound": "Text not found",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/zh-TW.json b/apps/presentationeditor/mobile/locale/zh-TW.json
index 619916023..fe7cbf700 100644
--- a/apps/presentationeditor/mobile/locale/zh-TW.json
+++ b/apps/presentationeditor/mobile/locale/zh-TW.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "您已達到%1個編輯器的用戶限制。請與您的管理員聯繫以了解更多信息。",
"warnNoLicense": "您已達到同時連接到 %1 編輯器的限制。此文件將只提供檢視。有關個人升級條款,請聯繫 %1 業務團隊。",
"warnNoLicenseUsers": "您已達到%1個編輯器的用戶限制。與%1銷售團隊聯繫以了解個人升級條款。",
- "warnProcessRightsChange": "您沒有編輯此文件的權限。"
+ "warnProcessRightsChange": "您沒有編輯此文件的權限。",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/locale/zh.json b/apps/presentationeditor/mobile/locale/zh.json
index 07a68a2aa..23e5f5190 100644
--- a/apps/presentationeditor/mobile/locale/zh.json
+++ b/apps/presentationeditor/mobile/locale/zh.json
@@ -126,7 +126,8 @@
"warnLicenseUsersExceeded": "你触发了 %1 编辑器的同时在线数限制。可联系管理员来了解更多信息。",
"warnNoLicense": "你已经触发了 %1 编辑器的同时在线数限制. 该文档打开后,你将只能查看。请联系 %1 的销售团队,获取个人升级条款。",
"warnNoLicenseUsers": "你触发了 %1 编辑器的同时在线数限制。可联系管理员来了解更多信息。",
- "warnProcessRightsChange": "你没有编辑文件的权限。"
+ "warnProcessRightsChange": "你没有编辑文件的权限。",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/presentationeditor/mobile/src/controller/Main.jsx b/apps/presentationeditor/mobile/src/controller/Main.jsx
index 67f140034..ae81d1619 100644
--- a/apps/presentationeditor/mobile/src/controller/Main.jsx
+++ b/apps/presentationeditor/mobile/src/controller/Main.jsx
@@ -44,6 +44,7 @@ class MainController extends Component {
};
this.defaultTitleText = __APP_TITLE_TEXT__;
+ this.stackMacrosRequests = [];
const { t } = this.props;
this._t = t('Controller.Main', {returnObjects:true});
@@ -92,6 +93,9 @@ class MainController extends Component {
value = parseInt(value);
}
this.props.storeApplicationSettings.changeMacrosSettings(value);
+
+ value = localStorage.getItem("pe-mobile-allow-macros-request");
+ this.props.storeApplicationSettings.changeMacrosRequest((value !== null) ? parseInt(value) : 0);
};
const loadDocument = data => {
@@ -139,6 +143,7 @@ class MainController extends Component {
this.api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
this.api.asc_registerCallback('asc_onLicenseChanged', this.onLicenseChanged.bind(this));
+ this.api.asc_registerCallback('asc_onMacrosPermissionRequest', this.onMacrosPermissionRequest.bind(this));
this.api.asc_registerCallback('asc_onRunAutostartMacroses', this.onRunAutostartMacroses.bind(this));
this.api.asc_setDocInfo(docInfo);
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
@@ -819,6 +824,70 @@ class MainController extends Component {
}
}
+ onMacrosPermissionRequest (url, callback) {
+ if (url && callback) {
+ this.stackMacrosRequests.push({url: url, callback: callback});
+ if (this.stackMacrosRequests.length>1) {
+ return;
+ }
+ } else if (this.stackMacrosRequests.length>0) {
+ url = this.stackMacrosRequests[0].url;
+ callback = this.stackMacrosRequests[0].callback;
+ } else
+ return;
+
+ const value = this.props.storeApplicationSettings.macrosRequest;
+ if (value>0) {
+ callback && callback(value === 1);
+ this.stackMacrosRequests.shift();
+ this.onMacrosPermissionRequest();
+ } else {
+ const { t } = this.props;
+ const _t = t('Controller.Main', {returnObjects:true});
+ f7.dialog.create({
+ title: _t.notcriticalErrorTitle,
+ text: _t.textRequestMacros.replace('%1', url),
+ cssClass: 'dlg-macros-request',
+ content: `
+
+ ${_t.textRemember}
+
`,
+ buttons: [{
+ text: _t.textYes,
+ onClick: () => {
+ const dontshow = $$('input[name="checkbox-show-macros"]').prop('checked');
+ if (dontshow) {
+ this.props.storeApplicationSettings.changeMacrosRequest(1);
+ LocalStorage.setItem("pe-mobile-allow-macros-request", 1);
+ }
+ setTimeout(() => {
+ if (callback) callback(true);
+ this.stackMacrosRequests.shift();
+ this.onMacrosPermissionRequest();
+ }, 1);
+ }},
+ {
+ text: _t.textNo,
+ onClick: () => {
+ const dontshow = $$('input[name="checkbox-show-macros"]').prop('checked');
+ if (dontshow) {
+ this.props.storeApplicationSettings.changeMacrosRequest(2);
+ LocalStorage.setItem("pe-mobile-allow-macros-request", 2);
+ }
+ setTimeout(() => {
+ if (callback) callback(false);
+ this.stackMacrosRequests.shift();
+ this.onMacrosPermissionRequest();
+ }, 1);
+ }
+ }]
+ }).open();
+ }
+ }
+
onProcessSaveResult (data) {
this.api.asc_OnSaveEnd(data.result);
diff --git a/apps/presentationeditor/mobile/src/index_dev.html b/apps/presentationeditor/mobile/src/index_dev.html
index 13efdb7ea..631114ced 100644
--- a/apps/presentationeditor/mobile/src/index_dev.html
+++ b/apps/presentationeditor/mobile/src/index_dev.html
@@ -2,7 +2,7 @@
-
+
diff --git a/apps/presentationeditor/mobile/src/store/applicationSettings.js b/apps/presentationeditor/mobile/src/store/applicationSettings.js
index 46a9f1e8f..d1b2c85c1 100644
--- a/apps/presentationeditor/mobile/src/store/applicationSettings.js
+++ b/apps/presentationeditor/mobile/src/store/applicationSettings.js
@@ -6,15 +6,18 @@ export class storeApplicationSettings {
unitMeasurement: observable,
isSpellChecking: observable,
macrosMode: observable,
+ macrosRequest: observable,
changeUnitMeasurement: action,
changeSpellCheck: action,
- changeMacrosSettings: action
+ changeMacrosSettings: action,
+ changeMacrosRequest: action
});
}
unitMeasurement = 1;
isSpellChecking = true;
macrosMode = 0;
+ macrosRequest = 0;
changeUnitMeasurement(value) {
this.unitMeasurement = +value;
@@ -27,4 +30,8 @@ export class storeApplicationSettings {
changeMacrosSettings(value) {
this.macrosMode = +value;
}
+
+ changeMacrosRequest(value) {
+ this.macrosRequest = value;
+ }
}
\ No newline at end of file
diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js
index dceebf095..778a8bc05 100644
--- a/apps/spreadsheeteditor/main/app/controller/Main.js
+++ b/apps/spreadsheeteditor/main/app/controller/Main.js
@@ -230,7 +230,7 @@ define([
strongCompare : this._compareActionWeak,
weakCompare : this._compareActionWeak
});
-
+ this.stackMacrosRequests = [];
this.isShowOpenDialog = false;
// Initialize api gateway
@@ -463,6 +463,9 @@ define([
value = parseInt(value);
Common.Utils.InternalSettings.set("sse-macros-mode", value);
+ value = Common.localStorage.getItem("sse-allow-macros-request");
+ Common.Utils.InternalSettings.set("sse-allow-macros-request", (value !== null) ? parseInt(value) : 0);
+
this.appOptions.wopi = this.editorConfig.wopi;
this.isFrameClosed = (this.appOptions.isEditDiagram || this.appOptions.isEditMailMerge || this.appOptions.isEditOle);
@@ -520,6 +523,7 @@ define([
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
this.api.asc_registerCallback('asc_onLicenseChanged', _.bind(this.onLicenseChanged, this));
+ this.api.asc_registerCallback('asc_onMacrosPermissionRequest', _.bind(this.onMacrosPermissionRequest, this));
this.api.asc_registerCallback('asc_onRunAutostartMacroses', _.bind(this.onRunAutostartMacroses, this));
this.api.asc_setDocInfo(docInfo);
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
@@ -2841,6 +2845,47 @@ define([
}
},
+ onMacrosPermissionRequest: function(url, callback) {
+ if (url && callback) {
+ this.stackMacrosRequests.push({url: url, callback: callback});
+ if (this.stackMacrosRequests.length>1) {
+ return;
+ }
+ } else if (this.stackMacrosRequests.length>0) {
+ url = this.stackMacrosRequests[0].url;
+ callback = this.stackMacrosRequests[0].callback;
+ } else
+ return;
+
+ var me = this;
+ var value = Common.Utils.InternalSettings.get("sse-allow-macros-request");
+ if (value>0) {
+ callback && callback(value === 1);
+ this.stackMacrosRequests.shift();
+ this.onMacrosPermissionRequest();
+ } else {
+ Common.UI.warning({
+ msg: this.textRequestMacros.replace('%1', url),
+ buttons: ['yes', 'no'],
+ primary: 'yes',
+ dontshow: true,
+ textDontShow: this.textRememberMacros,
+ maxwidth: 600,
+ callback: function(btn, dontshow){
+ if (dontshow) {
+ Common.Utils.InternalSettings.set("sse-allow-macros-request", (btn == 'yes') ? 1 : 2);
+ Common.localStorage.setItem("sse-allow-macros-request", (btn == 'yes') ? 1 : 2);
+ }
+ setTimeout(function() {
+ if (callback) callback(btn == 'yes');
+ me.stackMacrosRequests.shift();
+ me.onMacrosPermissionRequest();
+ }, 1);
+ }
+ });
+ }
+ },
+
loadAutoCorrectSettings: function() {
// autocorrection
var me = this;
@@ -3537,7 +3582,9 @@ define([
textFormulaFilledFirstRowsOtherIsEmpty: 'Formula filled only first {0} rows by memory save reason. Other rows in this sheet don\'t have data.',
textFormulaFilledFirstRowsOtherHaveData: 'Formula filled only first {0} rows have data by memory save reason. There are other {1} rows have data in this sheet. You can fill them manually.',
textReconnect: 'Connection is restored',
- errorCannotUseCommandProtectedSheet: 'You cannot use this command on a protected sheet. To use this command, unprotect the sheet. You might be requested to enter a password.'
+ errorCannotUseCommandProtectedSheet: 'You cannot use this command on a protected sheet. To use this command, unprotect the sheet. You might be requested to enter a password.',
+ textRequestMacros: 'A macro makes a request to URL. Do you want to allow the request to the %1?',
+ textRememberMacros: 'Remember my choice for all macros'
}
})(), SSE.Controllers.Main || {}))
});
diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json
index d17607c69..527070c36 100644
--- a/apps/spreadsheeteditor/main/locale/en.json
+++ b/apps/spreadsheeteditor/main/locale/en.json
@@ -788,6 +788,7 @@
"SSE.Controllers.Main.textPleaseWait": "The operation might take more time than expected. Please wait...",
"SSE.Controllers.Main.textReconnect": "Connection is restored",
"SSE.Controllers.Main.textRemember": "Remember my choice for all files",
+ "SSE.Controllers.Main.textRememberMacros": "Remember my choice for all macros",
"SSE.Controllers.Main.textRenameError": "User name must not be empty.",
"SSE.Controllers.Main.textRenameLabel": "Enter a name to be used for collaboration",
"SSE.Controllers.Main.textShape": "Shape",
@@ -1063,6 +1064,7 @@
"SSE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"SSE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"SSE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
+ "SSE.Controllers.Main.textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?",
"SSE.Controllers.Print.strAllSheets": "All Sheets",
"SSE.Controllers.Print.textFirstCol": "First column",
"SSE.Controllers.Print.textFirstRow": "First row",
diff --git a/apps/spreadsheeteditor/mobile/locale/az.json b/apps/spreadsheeteditor/mobile/locale/az.json
index 3ec04cf8f..5d19f4d0c 100644
--- a/apps/spreadsheeteditor/mobile/locale/az.json
+++ b/apps/spreadsheeteditor/mobile/locale/az.json
@@ -160,7 +160,8 @@
"textNoTextFound": "Text not found",
"textOk": "Ok",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}"
+ "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/be.json b/apps/spreadsheeteditor/mobile/locale/be.json
index b4d3132cd..1e918cf09 100644
--- a/apps/spreadsheeteditor/mobile/locale/be.json
+++ b/apps/spreadsheeteditor/mobile/locale/be.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
- "warnProcessRightsChange": "You don't have permission to edit the file."
+ "warnProcessRightsChange": "You don't have permission to edit the file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/bg.json b/apps/spreadsheeteditor/mobile/locale/bg.json
index 4e287043e..47b59e13d 100644
--- a/apps/spreadsheeteditor/mobile/locale/bg.json
+++ b/apps/spreadsheeteditor/mobile/locale/bg.json
@@ -160,7 +160,8 @@
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
"textNoTextFound": "Text not found",
- "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required."
+ "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/ca.json b/apps/spreadsheeteditor/mobile/locale/ca.json
index 4cf66c2ed..0f6f183bc 100644
--- a/apps/spreadsheeteditor/mobile/locale/ca.json
+++ b/apps/spreadsheeteditor/mobile/locale/ca.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Heu arribat al límit d'usuaris per a %1 editors. Contacteu amb el vostre administrador per a més informació.",
"warnNoLicense": "Heu arribat al límit de connexions simultànies a %1 editors. Aquest document només s'obrirà en mode lectura. Contacteu amb l'equip de vendes %1 per a les condicions d'una actualització personal.",
"warnNoLicenseUsers": "Heu arribat al límit d'usuaris per a %1 editors. Contacteu amb l'equip de vendes de %1 per obtenir les condicions de millora personals dels vostres serveis.",
- "warnProcessRightsChange": "No teniu permís per editar el fitxer."
+ "warnProcessRightsChange": "No teniu permís per editar el fitxer.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/cs.json b/apps/spreadsheeteditor/mobile/locale/cs.json
index 0b530f889..dbcaa591c 100644
--- a/apps/spreadsheeteditor/mobile/locale/cs.json
+++ b/apps/spreadsheeteditor/mobile/locale/cs.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Došlo dosažení limitu %1 editorů v režimu spolupráce na úpravách. Ohledně podrobností se obraťte na svého správce.",
"warnNoLicense": "Došlo k dosažení limitu souběžného připojení %1 editorů. Tento dokument bude otevřen pouze pro náhled. Pro rozšíření funkcí kontaktujte %1 obchodní oddělení.",
"warnNoLicenseUsers": "Došlo k dosažení limitu %1 editorů. Pro rozšíření funkcí kontaktujte %1 obchodní oddělení.",
- "warnProcessRightsChange": "Nemáte oprávnění pro úpravu tohoto dokumentu."
+ "warnProcessRightsChange": "Nemáte oprávnění pro úpravu tohoto dokumentu.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/da.json b/apps/spreadsheeteditor/mobile/locale/da.json
index d46b2b02a..9b46909be 100644
--- a/apps/spreadsheeteditor/mobile/locale/da.json
+++ b/apps/spreadsheeteditor/mobile/locale/da.json
@@ -160,7 +160,8 @@
"warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
- "warnProcessRightsChange": "You don't have permission to edit the file."
+ "warnProcessRightsChange": "You don't have permission to edit the file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/de.json b/apps/spreadsheeteditor/mobile/locale/de.json
index db1ed98ff..b10fd17d9 100644
--- a/apps/spreadsheeteditor/mobile/locale/de.json
+++ b/apps/spreadsheeteditor/mobile/locale/de.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Sie haben das Benutzerlimit für %1-Editoren erreicht. Bitte wenden Sie sich an Ihren Administrator, um weitere Informationen zu erhalten.",
"warnNoLicense": "Sie haben die maximale Anzahl von gleichzeitigen Verbindungen in %1-Editoren erreicht. Die Bearbeitung ist jetzt in diesem Dokument nicht verfügbar. Bitte kontaktieren Sie unser Verkaufsteam, um persönliche Upgrade-Bedingungen zu erhalten.",
"warnNoLicenseUsers": "Sie haben das Benutzerlimit für %1-Editoren erreicht. Bitte kontaktieren Sie unser Verkaufsteam, um persönliche Upgrade-Bedingungen zu erhalten.",
- "warnProcessRightsChange": "Sie können diese Datei nicht bearbeiten."
+ "warnProcessRightsChange": "Sie können diese Datei nicht bearbeiten.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/el.json b/apps/spreadsheeteditor/mobile/locale/el.json
index 8ef0760a4..a6ed05544 100644
--- a/apps/spreadsheeteditor/mobile/locale/el.json
+++ b/apps/spreadsheeteditor/mobile/locale/el.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Έχετε φτάσει το όριο χρήστη για συντάκτες %1. Επικοινωνήστε με τον διαχειριστή σας για περισσότερες πληροφορίες.",
"warnNoLicense": "Φτάσατε το όριο ταυτόχρονων συνδέσεων σε %1 συντάκτες. Το έγγραφο θα ανοίξει μόνο για ανάγνωση. Επικοινωνήστε με την ομάδα πωλήσεων %1 για τους όρους αναβάθμισης.",
"warnNoLicenseUsers": "Έχετε φτάσει το όριο χρήστη για συντάκτες %1. Επικοινωνήστε με την ομάδα πωλήσεων %1 για προσωπικούς όρους αναβάθμισης.",
- "warnProcessRightsChange": "Δεν έχετε δικαίωμα επεξεργασίας του αρχείου."
+ "warnProcessRightsChange": "Δεν έχετε δικαίωμα επεξεργασίας του αρχείου.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json
index 7b3f29ccf..c8c76c0ca 100644
--- a/apps/spreadsheeteditor/mobile/locale/en.json
+++ b/apps/spreadsheeteditor/mobile/locale/en.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.",
"warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only. Contact %1 sales team for personal upgrade terms.",
"warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
- "warnProcessRightsChange": "You don't have permission to edit the file."
+ "warnProcessRightsChange": "You don't have permission to edit the file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/es.json b/apps/spreadsheeteditor/mobile/locale/es.json
index aed29d2cb..5bbd449fb 100644
--- a/apps/spreadsheeteditor/mobile/locale/es.json
+++ b/apps/spreadsheeteditor/mobile/locale/es.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Ha alcanzado el límite de usuarios para %1 editores. Póngase en contacto con su administrador para saber más.",
"warnNoLicense": "Ha alcanzado el límite de conexiones simultáneas con %1 editores. Este documento se abrirá sólo para su visualización. Póngase en contacto con el equipo de ventas de %1 para conocer las condiciones de actualización personal.",
"warnNoLicenseUsers": "Ha alcanzado el límite de usuarios para %1 editores. Póngase en contacto con el equipo de ventas de %1 para conocer las condiciones de actualización personal.",
- "warnProcessRightsChange": "No tiene permiso para editar el archivo."
+ "warnProcessRightsChange": "No tiene permiso para editar el archivo.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/fr.json b/apps/spreadsheeteditor/mobile/locale/fr.json
index ac0615a4b..54100db8c 100644
--- a/apps/spreadsheeteditor/mobile/locale/fr.json
+++ b/apps/spreadsheeteditor/mobile/locale/fr.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Vous avez dépassé le nombre maximal d’utilisateurs des éditeurs %1. Pour en savoir plus, contactez votre administrateur.",
"warnNoLicense": "Vous avez dépassé le nombre maximal de connexions simultanées aux éditeurs %1. Ce document sera ouvert en lecture seule. Contactez l’équipe des ventes %1 pour mettre à jour les termes de la licence.",
"warnNoLicenseUsers": "Vous avez dépassé le nombre maximal d’utilisateurs des éditeurs %1. Contactez l’équipe des ventes %1 pour mettre à jour les termes de la licence.",
- "warnProcessRightsChange": "Vous n'avez pas la permission de modifier ce fichier."
+ "warnProcessRightsChange": "Vous n'avez pas la permission de modifier ce fichier.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/gl.json b/apps/spreadsheeteditor/mobile/locale/gl.json
index dd7621b13..59201a367 100644
--- a/apps/spreadsheeteditor/mobile/locale/gl.json
+++ b/apps/spreadsheeteditor/mobile/locale/gl.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Alcanzou o límite de usuarios para os editores de %1. Por favor, contacte co se uadministrador para recibir máis información.",
"warnNoLicense": "Alcanzou o límite de conexións simultáneas con %1 editores. Este documento abrirase para as úa visualización. Póñase en contacto co equipo de vendas de %1 para coñecer as condicións de actualización persoal.",
"warnNoLicenseUsers": "Alcanzou o límite de usuarios para os editores de %1. Contacte co equipo de vendas de %1 para coñecer os termos de actualización persoal.",
- "warnProcessRightsChange": "Non ten permiso para editar o ficheiro."
+ "warnProcessRightsChange": "Non ten permiso para editar o ficheiro.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/hu.json b/apps/spreadsheeteditor/mobile/locale/hu.json
index 118ac503a..41d532e27 100644
--- a/apps/spreadsheeteditor/mobile/locale/hu.json
+++ b/apps/spreadsheeteditor/mobile/locale/hu.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Elérte a(z) %1 szerkesztőhöz tartozó felhasználói korlátját. További információért forduljon rendszergazdájához.",
"warnNoLicense": "Elérte a(z) %1 szerkesztővel való egyidejű kapcsolódási korlátot. Ez a dokumentum csak megtekintésre nyílik meg. Lépjen kapcsolatba a(z) %1 értékesítési csapattal a személyes frissítés feltételekért.",
"warnNoLicenseUsers": "Elérte a(z) %1 szerkesztőhöz tartozó felhasználói korlátját. Vegye fel a kapcsolatot a(z) %1 értékesítési csapattal a személyes frissítési feltételekért.",
- "warnProcessRightsChange": "Nincs engedélye a fájl szerkesztésére."
+ "warnProcessRightsChange": "Nincs engedélye a fájl szerkesztésére.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/id.json b/apps/spreadsheeteditor/mobile/locale/id.json
index 4362082d8..b08a58c1f 100644
--- a/apps/spreadsheeteditor/mobile/locale/id.json
+++ b/apps/spreadsheeteditor/mobile/locale/id.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Anda sudah mencapai batas user untuk %1 editor. Hubungi admin Anda untuk mempelajari lebih lanjut.",
"warnNoLicense": "Anda sudah mencapai batas untuk koneksi bersamaan ke %1 editor. Dokumen ini akan dibuka untuk dilihat saja. Hubungi %1 tim sales untuk syarat personal upgrade.",
"warnNoLicenseUsers": "Anda sudah mencapai batas user untuk %1 editor. Hubungi %1 tim sales untuk syarat personal upgrade.",
- "warnProcessRightsChange": "Anda tidak memiliki izin edit file ini."
+ "warnProcessRightsChange": "Anda tidak memiliki izin edit file ini.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/it.json b/apps/spreadsheeteditor/mobile/locale/it.json
index 8a42e3515..01da539f0 100644
--- a/apps/spreadsheeteditor/mobile/locale/it.json
+++ b/apps/spreadsheeteditor/mobile/locale/it.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Hai raggiunto il limite degli utenti per gli editor %1. Ti preghiamo di contattare il tuo amministratore per maggior informazioni.",
"warnNoLicense": "Hai raggiunto il limite delle connessioni simultanee agli editor %1. Questo documento sarà aperto solo in modalità di visualizzazione. Ti preghiamo di contattare il team di vendite di %1 per i termini di aggiornamento personali.",
"warnNoLicenseUsers": "Hai raggiunto il limite degli utenti per gli editor %1. Ti preghiamo di contattare il team di vendite di %1 per i termini di aggiornamento personali.",
- "warnProcessRightsChange": "Non hai il permesso di modificare il file."
+ "warnProcessRightsChange": "Non hai il permesso di modificare il file.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/ja.json b/apps/spreadsheeteditor/mobile/locale/ja.json
index b24ca368f..43ef972e3 100644
--- a/apps/spreadsheeteditor/mobile/locale/ja.json
+++ b/apps/spreadsheeteditor/mobile/locale/ja.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "%1エディターのユーザー制限に達しました。 詳細についてはアドミニストレータを連絡してください。",
"warnNoLicense": "%1エディター 時接続数の制限に達しました。この文書が見るだけのために開かれる。個人的なアップグレード条件については、%1営業チームを連絡してください。",
"warnNoLicenseUsers": "%1エディターのユーザー制限に達しました。 個人的なアップグレード条件については、%1営業チームを連絡してください。",
- "warnProcessRightsChange": "ファイルを編集する権限がありません!"
+ "warnProcessRightsChange": "ファイルを編集する権限がありません!",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/ko.json b/apps/spreadsheeteditor/mobile/locale/ko.json
index 29b693a4d..f3d4db495 100644
--- a/apps/spreadsheeteditor/mobile/locale/ko.json
+++ b/apps/spreadsheeteditor/mobile/locale/ko.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "편집자 사용자 한도인 %1명에 도달했습니다. 자세한 내용은 관리자에게 문의하십시오.",
"warnNoLicense": "% 1 편집 연결 수 제한에 도달했습니다. 이 문서는 보기 모드로 열립니다. 개인적인 업그레이드 사항은 % 1 영업팀에 연락하십시오.",
"warnNoLicenseUsers": "ONLYOFFICE 편집자의이 버전은 동시 사용자에게 일정한 제한이 있습니다. 더 필요한 것이 있으면 현재 라이센스를 업그레이드하거나 상용 라이센스를 구입하십시오.",
- "warnProcessRightsChange": "파일을 수정할 수 있는 권한이 없습니다."
+ "warnProcessRightsChange": "파일을 수정할 수 있는 권한이 없습니다.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/lo.json b/apps/spreadsheeteditor/mobile/locale/lo.json
index 57f9e408f..2ce86e35a 100644
--- a/apps/spreadsheeteditor/mobile/locale/lo.json
+++ b/apps/spreadsheeteditor/mobile/locale/lo.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "ຈໍານວນ ການເຊື່ອມຕໍ່ພ້ອມກັນກັບຜູ້ແກ້ໄຂ ແມ່ນເກີນກໍານົດ % 1. ຕິດຕໍ່ ທີມບໍລິຫານເພື່ອຂໍ້ມູນເພີ່ມເຕີ່ມ",
"warnNoLicense": "ທ່ານໄດ້ຖືກຈຳກັດສິດພຽງເທົ່ານີ້ສຳຫລັບການເຊື່່ອມພ້ອມກັນກັບເຄື່ອງມືແກ້ໄຂ %1 ແລ້ວເອກະສານນີ້ຈະເປີດໃຫ້ເບີ່ງເທົ່ານັ້ນ ຕິດຕໍ່ທີມຂາຍ %1 ສຳຫລັບເງື່ອນໄຂການອັບເກດສ່ວນບຸກຄົນ",
"warnNoLicenseUsers": "ຈໍານວນ ການເຊື່ອມຕໍ່ພ້ອມກັນກັບບັນນາທິການ ແມ່ນເກີນກໍານົດ % 1. ຕິດຕໍ່ ທີມຂາຍ% 1 ສຳ ລັບຂໍ້ ກຳນົດການຍົກລະດັບສິດ",
- "warnProcessRightsChange": "ທ່ານບໍ່ມີສິດໃນການແກ້ໄຂໄຟລ໌ນີ້."
+ "warnProcessRightsChange": "ທ່ານບໍ່ມີສິດໃນການແກ້ໄຂໄຟລ໌ນີ້.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/lv.json b/apps/spreadsheeteditor/mobile/locale/lv.json
index 4e287043e..47b59e13d 100644
--- a/apps/spreadsheeteditor/mobile/locale/lv.json
+++ b/apps/spreadsheeteditor/mobile/locale/lv.json
@@ -160,7 +160,8 @@
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
"textNoTextFound": "Text not found",
- "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required."
+ "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/nb.json b/apps/spreadsheeteditor/mobile/locale/nb.json
index 4e287043e..47b59e13d 100644
--- a/apps/spreadsheeteditor/mobile/locale/nb.json
+++ b/apps/spreadsheeteditor/mobile/locale/nb.json
@@ -160,7 +160,8 @@
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
"textNoTextFound": "Text not found",
- "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required."
+ "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/nl.json b/apps/spreadsheeteditor/mobile/locale/nl.json
index 4ea377b37..1f22b933b 100644
--- a/apps/spreadsheeteditor/mobile/locale/nl.json
+++ b/apps/spreadsheeteditor/mobile/locale/nl.json
@@ -160,7 +160,8 @@
"textNoTextFound": "Text not found",
"textOk": "Ok",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
- "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}"
+ "textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/pl.json b/apps/spreadsheeteditor/mobile/locale/pl.json
index 4e287043e..47b59e13d 100644
--- a/apps/spreadsheeteditor/mobile/locale/pl.json
+++ b/apps/spreadsheeteditor/mobile/locale/pl.json
@@ -160,7 +160,8 @@
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
"textNoTextFound": "Text not found",
- "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required."
+ "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/pt-PT.json b/apps/spreadsheeteditor/mobile/locale/pt-PT.json
index 004dacc51..4584ecc84 100644
--- a/apps/spreadsheeteditor/mobile/locale/pt-PT.json
+++ b/apps/spreadsheeteditor/mobile/locale/pt-PT.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Atingiu o limite de %1 editores. Contacte o seu administrador para obter detalhes.",
"warnNoLicense": "Atingiu o limite de ligações simultâneas a %1 editores. Este documento será aberto apenas para visualização. Contacte a %1 equipa de vendas para consultar os termos de atualização para si.",
"warnNoLicenseUsers": "Atingiu o limite de %1 editores. Contacte a equipa comercial %1 para obter mais informações.",
- "warnProcessRightsChange": "Não tem autorização para editar este ficheiro."
+ "warnProcessRightsChange": "Não tem autorização para editar este ficheiro.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/pt.json b/apps/spreadsheeteditor/mobile/locale/pt.json
index bcf9197a5..eb35c9190 100644
--- a/apps/spreadsheeteditor/mobile/locale/pt.json
+++ b/apps/spreadsheeteditor/mobile/locale/pt.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Você atingiu o limite de usuários para editores %1. Entre em contato com seu administrador para saber mais.",
"warnNoLicense": "Você atingiu o limite de conexões simultâneas para% 1 editores. Este documento será aberto apenas para visualização. Contate a equipe de vendas% 1 para termos de atualização pessoal.",
"warnNoLicenseUsers": "Você atingiu o limite de usuários para editores %1. Entre em contato com a equipe de vendas da %1 para obter os termos de atualização pessoais.",
- "warnProcessRightsChange": "Você não tem permissão para editar o arquivo."
+ "warnProcessRightsChange": "Você não tem permissão para editar o arquivo.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/ro.json b/apps/spreadsheeteditor/mobile/locale/ro.json
index a808ca1f8..5c0132acb 100644
--- a/apps/spreadsheeteditor/mobile/locale/ro.json
+++ b/apps/spreadsheeteditor/mobile/locale/ro.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Ați atins numărul maxim de utilizatori ai %1 editoare. Pentru detalii, contactați administratorul dvs.",
"warnNoLicense": "Ați atins numărul maxim de conexiuni simultane la %1 de editoare. Documentul este disponibil numai pentru vizualizare. Contactați %1 Departamentul de Vânzări pentru acordarea condițiilor personale de actualizare.",
"warnNoLicenseUsers": "Ați atins numărul maxim de utilizatori ai %1 editoare. Contactați Grup Vânzări %1 pentru acordarea condițiilor personale de licențiere.",
- "warnProcessRightsChange": "Nu aveți permisiunea de editare pentru fișier."
+ "warnProcessRightsChange": "Nu aveți permisiunea de editare pentru fișier.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/ru.json b/apps/spreadsheeteditor/mobile/locale/ru.json
index f68118e11..fb89bb9cb 100644
--- a/apps/spreadsheeteditor/mobile/locale/ru.json
+++ b/apps/spreadsheeteditor/mobile/locale/ru.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Вы достигли лимита на количество пользователей редакторов %1. Свяжитесь с администратором, чтобы узнать больше.",
"warnNoLicense": "Вы достигли лимита на одновременные подключения к редакторам %1. Этот документ будет открыт на просмотр. Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия обновления.",
"warnNoLicenseUsers": "Вы достигли лимита на количество пользователей редакторов %1. Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия обновления.",
- "warnProcessRightsChange": "У вас нет прав на редактирование этого файла."
+ "warnProcessRightsChange": "У вас нет прав на редактирование этого файла.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/sk.json b/apps/spreadsheeteditor/mobile/locale/sk.json
index c589527c3..506d23b78 100644
--- a/apps/spreadsheeteditor/mobile/locale/sk.json
+++ b/apps/spreadsheeteditor/mobile/locale/sk.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "Dosiahli ste limit %1 editora v režime spolupráce na úpravách. Ohľadne podrobnosti sa obráťte na svojho správcu. ",
"warnNoLicense": "Dosiahli ste limit pre simultánne pripojenia k %1 editorom. Tento dokument sa otvorí iba na prezeranie. Kontaktujte predajný tím %1 pre osobné podmienky inovácie.",
"warnNoLicenseUsers": "Dosiahli ste limit %1 editora. Pre rozšírenie funkcií kontaktujte %1 obchodné oddelenie.",
- "warnProcessRightsChange": "Nemáte povolenie na úpravu súboru."
+ "warnProcessRightsChange": "Nemáte povolenie na úpravu súboru.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/sl.json b/apps/spreadsheeteditor/mobile/locale/sl.json
index 4e287043e..47b59e13d 100644
--- a/apps/spreadsheeteditor/mobile/locale/sl.json
+++ b/apps/spreadsheeteditor/mobile/locale/sl.json
@@ -160,7 +160,8 @@
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
"textNoTextFound": "Text not found",
- "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required."
+ "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/tr.json b/apps/spreadsheeteditor/mobile/locale/tr.json
index ba264eb1c..a6cfc960b 100644
--- a/apps/spreadsheeteditor/mobile/locale/tr.json
+++ b/apps/spreadsheeteditor/mobile/locale/tr.json
@@ -160,7 +160,8 @@
"warnNoLicense": "%1 düzenleyiciye eşzamanlı bağlantı sınırına ulaştınız. Bu belge yalnızca görüntüleme için açılacaktır. Kişisel yükseltme koşulları için %1 satış ekibiyle iletişime geçin.",
"warnNoLicenseUsers": "%1 düzenleyici için kullanıcı sınırına ulaştınız. Kişisel yükseltme koşulları için %1 satış ekibiyle iletişime geçin.",
"warnProcessRightsChange": "Dosyayı düzenleme izniniz yok.",
- "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required."
+ "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/uk.json b/apps/spreadsheeteditor/mobile/locale/uk.json
index 4e287043e..47b59e13d 100644
--- a/apps/spreadsheeteditor/mobile/locale/uk.json
+++ b/apps/spreadsheeteditor/mobile/locale/uk.json
@@ -160,7 +160,8 @@
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
"textNoTextFound": "Text not found",
- "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required."
+ "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/vi.json b/apps/spreadsheeteditor/mobile/locale/vi.json
index 4e287043e..47b59e13d 100644
--- a/apps/spreadsheeteditor/mobile/locale/vi.json
+++ b/apps/spreadsheeteditor/mobile/locale/vi.json
@@ -160,7 +160,8 @@
"textReplaceSuccess": "The search has been done. Occurrences replaced: {0}",
"textReplaceSkipped": "The replacement has been made. {0} occurrences were skipped.",
"textNoTextFound": "Text not found",
- "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required."
+ "errorOpensource": "Using the free Community version, you can open documents for viewing only. To access mobile web editors, a commercial license is required.",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/zh-TW.json b/apps/spreadsheeteditor/mobile/locale/zh-TW.json
index 6f863a83f..671b26601 100644
--- a/apps/spreadsheeteditor/mobile/locale/zh-TW.json
+++ b/apps/spreadsheeteditor/mobile/locale/zh-TW.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "您已達到 %1 個編輯器的使用者限制。請聯繫您的管理員以了解更多資訊。",
"warnNoLicense": "您已達到同時連接到 %1 編輯器的限制。此文件將只提供檢視。有關個人升級條款,請聯繫 %1 業務團隊。",
"warnNoLicenseUsers": "您已達到%1個編輯器的用戶限制。與%1銷售團隊聯繫以了解個人升級條款。",
- "warnProcessRightsChange": "您沒有編輯此文件的權限。"
+ "warnProcessRightsChange": "您沒有編輯此文件的權限。",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/locale/zh.json b/apps/spreadsheeteditor/mobile/locale/zh.json
index 6cf7ed8e4..3bfffc346 100644
--- a/apps/spreadsheeteditor/mobile/locale/zh.json
+++ b/apps/spreadsheeteditor/mobile/locale/zh.json
@@ -160,7 +160,8 @@
"warnLicenseUsersExceeded": "你触发了 %1 编辑器的同时在线数限制。可联系管理员来了解更多信息。",
"warnNoLicense": "你已经触发了 %1 编辑器的同时在线数限制. 该文档打开后,你将只能查看。请联系 %1 的销售团队,获取个人升级条款。",
"warnNoLicenseUsers": "你触发了 %1 编辑器的同时在线数限制。请与 %1 的销售团队联系,以获取个人升级条款。",
- "warnProcessRightsChange": "你没有编辑文件的权限。"
+ "warnProcessRightsChange": "你没有编辑文件的权限。",
+ "textRequestMacros": "A macro makes a request to URL. Do you want to allow the request to the %1?"
}
},
"Error": {
diff --git a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx
index 462324309..0beb6c1a5 100644
--- a/apps/spreadsheeteditor/mobile/src/controller/Main.jsx
+++ b/apps/spreadsheeteditor/mobile/src/controller/Main.jsx
@@ -56,6 +56,7 @@ class MainController extends Component {
'DeleteRows', 'Sort', 'AutoFilter', 'PivotTables', 'Objects', 'Scenarios'];
this.defaultTitleText = __APP_TITLE_TEXT__;
+ this.stackMacrosRequests = [];
const { t } = this.props;
this._t = t('Controller.Main', {returnObjects:true});
@@ -138,6 +139,9 @@ class MainController extends Component {
value = parseInt(value);
}
this.props.storeApplicationSettings.changeMacrosSettings(value);
+
+ value = localStorage.getItem("sse-mobile-allow-macros-request");
+ this.props.storeApplicationSettings.changeMacrosRequest((value !== null) ? parseInt(value) : 0);
};
const loadDocument = data => {
@@ -187,6 +191,7 @@ class MainController extends Component {
this.api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
this.api.asc_registerCallback('asc_onLicenseChanged', this.onLicenseChanged.bind(this));
+ this.api.asc_registerCallback('asc_onMacrosPermissionRequest', this.onMacrosPermissionRequest.bind(this));
this.api.asc_registerCallback('asc_onRunAutostartMacroses', this.onRunAutostartMacroses.bind(this));
this.api.asc_setDocInfo(docInfo);
this.api.asc_getEditorPermissions(this.editorConfig.licenseUrl, this.editorConfig.customerId);
@@ -790,6 +795,70 @@ class MainController extends Component {
}
}
+ onMacrosPermissionRequest (url, callback) {
+ if (url && callback) {
+ this.stackMacrosRequests.push({url: url, callback: callback});
+ if (this.stackMacrosRequests.length>1) {
+ return;
+ }
+ } else if (this.stackMacrosRequests.length>0) {
+ url = this.stackMacrosRequests[0].url;
+ callback = this.stackMacrosRequests[0].callback;
+ } else
+ return;
+
+ const value = this.props.storeApplicationSettings.macrosRequest;
+ if (value>0) {
+ callback && callback(value === 1);
+ this.stackMacrosRequests.shift();
+ this.onMacrosPermissionRequest();
+ } else {
+ const { t } = this.props;
+ const _t = t('Controller.Main', {returnObjects:true});
+ f7.dialog.create({
+ title: _t.notcriticalErrorTitle,
+ text: _t.textRequestMacros.replace('%1', url),
+ cssClass: 'dlg-macros-request',
+ content: `