diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 8c2bedcf91..bc40135ae8 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -185,7 +185,7 @@ view: { navigation: false/true // navigation button in de } / false / true, // view tab - save: false/true // save button on toolbar in + save: false/true // save button on toolbar in } / false / true, // use instead of customization.toolbar, header: { users: false/true // users list button @@ -274,7 +274,8 @@ showHorizontalScroll: true/false, // show/hide scroll in the spreadsheet editor by default startFillingForm: { text: 'Share & collect' // caption of the start filling button, used for pdf-forms - } + }, + suggestFeature: true/false }, coEditing: { mode: 'fast', // , 'fast' or 'strict'. if 'fast' and 'customization.autosave'=false -> set 'customization.autosave'=true. 'fast' - default for editor @@ -548,7 +549,7 @@ _config.document.token = _config.token; } - + return true; }; @@ -1070,7 +1071,9 @@ function isLocalStorageAvailable() { try { - return !!window['localStorage']; + localStorage.setItem('test', 'test'); + localStorage.removeItem('test'); + return true; } catch(e) { return false; diff --git a/apps/common/main/lib/util/LocalStorage.js b/apps/common/main/lib/util/LocalStorage.js index ef9024ef71..efc0130469 100644 --- a/apps/common/main/lib/util/LocalStorage.js +++ b/apps/common/main/lib/util/LocalStorage.js @@ -117,7 +117,9 @@ define(['gateway'], function () { }; try { - var _lsAllowed = !!window.localStorage; + localStorage.setItem('test', 1); // for WebView checking !!window.localStorage not enough + localStorage.removeItem('test'); + var _lsAllowed = true; } catch (e) { _lsAllowed = false; } diff --git a/apps/common/main/lib/util/htmlutils.js b/apps/common/main/lib/util/htmlutils.js index e1b062d432..2d237655c7 100644 --- a/apps/common/main/lib/util/htmlutils.js +++ b/apps/common/main/lib/util/htmlutils.js @@ -32,7 +32,8 @@ var checkLocalStorage = (function () { try { - var storage = window['localStorage']; + localStorage.setItem('test', 1); // for WebView checking !!window.localStorage not enough + localStorage.removeItem('test'); return true; } catch(e) { diff --git a/apps/common/main/lib/view/MacrosDialog.js b/apps/common/main/lib/view/MacrosDialog.js index 1858606b24..ae8fd92d6e 100644 --- a/apps/common/main/lib/view/MacrosDialog.js +++ b/apps/common/main/lib/view/MacrosDialog.js @@ -429,7 +429,7 @@ define([], function () { }); } - if(macrosList.length > 0) { + if(macrosList && macrosList.length > 0) { macrosList.forEach(function (macros) { macros.autostart = !!macros.autostart; macros.currentPos = {row: 3, column: 0}; diff --git a/apps/common/main/resources/img/toolbar/1.25x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/1.25x/btn-suggest-feature.png new file mode 100644 index 0000000000..56321383e3 Binary files /dev/null and b/apps/common/main/resources/img/toolbar/1.25x/btn-suggest-feature.png differ diff --git a/apps/common/main/resources/img/toolbar/1.5x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/1.5x/btn-suggest-feature.png new file mode 100644 index 0000000000..168378f315 Binary files /dev/null and b/apps/common/main/resources/img/toolbar/1.5x/btn-suggest-feature.png differ diff --git a/apps/common/main/resources/img/toolbar/1.75x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/1.75x/btn-suggest-feature.png new file mode 100644 index 0000000000..af94150bb3 Binary files /dev/null and b/apps/common/main/resources/img/toolbar/1.75x/btn-suggest-feature.png differ diff --git a/apps/common/main/resources/img/toolbar/1x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/1x/btn-suggest-feature.png new file mode 100644 index 0000000000..22db9e4f99 Binary files /dev/null and b/apps/common/main/resources/img/toolbar/1x/btn-suggest-feature.png differ diff --git a/apps/common/main/resources/img/toolbar/2.5x/btn-suggest-feature.svg b/apps/common/main/resources/img/toolbar/2.5x/btn-suggest-feature.svg new file mode 100644 index 0000000000..dc8de16a45 --- /dev/null +++ b/apps/common/main/resources/img/toolbar/2.5x/btn-suggest-feature.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/common/main/resources/img/toolbar/2x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/2x/btn-suggest-feature.png new file mode 100644 index 0000000000..b41f1ef10f Binary files /dev/null and b/apps/common/main/resources/img/toolbar/2x/btn-suggest-feature.png differ diff --git a/apps/common/main/resources/img/toolbar/v2/1.25x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/v2/1.25x/btn-suggest-feature.png new file mode 100644 index 0000000000..ce2d6996f3 Binary files /dev/null and b/apps/common/main/resources/img/toolbar/v2/1.25x/btn-suggest-feature.png differ diff --git a/apps/common/main/resources/img/toolbar/v2/1.5x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/v2/1.5x/btn-suggest-feature.png new file mode 100644 index 0000000000..6f2b101fb3 Binary files /dev/null and b/apps/common/main/resources/img/toolbar/v2/1.5x/btn-suggest-feature.png differ diff --git a/apps/common/main/resources/img/toolbar/v2/1.75x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/v2/1.75x/btn-suggest-feature.png new file mode 100644 index 0000000000..1b24df6097 Binary files /dev/null and b/apps/common/main/resources/img/toolbar/v2/1.75x/btn-suggest-feature.png differ diff --git a/apps/common/main/resources/img/toolbar/v2/1x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/v2/1x/btn-suggest-feature.png new file mode 100644 index 0000000000..7e6e3ef6ac Binary files /dev/null and b/apps/common/main/resources/img/toolbar/v2/1x/btn-suggest-feature.png differ diff --git a/apps/common/main/resources/img/toolbar/v2/2.5x/btn-suggest-feature.svg b/apps/common/main/resources/img/toolbar/v2/2.5x/btn-suggest-feature.svg new file mode 100644 index 0000000000..6415e90c04 --- /dev/null +++ b/apps/common/main/resources/img/toolbar/v2/2.5x/btn-suggest-feature.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/common/main/resources/img/toolbar/v2/2x/btn-suggest-feature.png b/apps/common/main/resources/img/toolbar/v2/2x/btn-suggest-feature.png new file mode 100644 index 0000000000..46b4cf2bcd Binary files /dev/null and b/apps/common/main/resources/img/toolbar/v2/2x/btn-suggest-feature.png differ diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index cae04b4a11..aa48d23510 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -307,6 +307,7 @@ define([ case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break; + case 'suggest': Common.NotificationCenter.trigger('suggest'); break; default: close_menu = false; } diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index df6fb83b28..3a35b4d6e3 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -243,6 +243,7 @@ define([ Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); + Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this)); Common.NotificationCenter.on('close', _.bind(this.closeEditor, this)); Common.NotificationCenter.on('markfavorite', _.bind(this.markFavorite, this)); Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this)); @@ -1020,6 +1021,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1755,6 +1760,7 @@ define([ this.appOptions.canDownloadOrigin = false; this.appOptions.canDownload = this.permissions.download !== false; this.appOptions.showSaveButton = this.appOptions.isEdit || !this.appOptions.isRestrictedEdit && this.appOptions.isPDFForm && this.appOptions.canDownload; // save to file or save to file copy (for pdf-form viewer) + this.appOptions.canSuggest = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false); if (this.appOptions.isPDFForm && !this.appOptions.isEdit && !this.appOptions.isRestrictedEdit) { if (!this.appOptions.isRestrictedEdit && !this.appOptions.canEdit) diff --git a/apps/documenteditor/main/app/template/FileMenu.template b/apps/documenteditor/main/app/template/FileMenu.template index a52eb60ae4..7bdc786891 100644 --- a/apps/documenteditor/main/app/template/FileMenu.template +++ b/apps/documenteditor/main/app/template/FileMenu.template @@ -22,6 +22,7 @@
  • +
  • diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index dd81d13dc4..2e28396b8f 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -312,6 +312,17 @@ define([ iconCls: 'menu__icon btn-goback' }); + this.miSuggest = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-suggest'), + action : 'suggest', + caption : this.btnSuggestCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [-2, 22], + iconCls: 'menu__icon btn-suggest-feature' + }); + this.items = []; this.items.push( this.miClose, @@ -331,7 +342,8 @@ define([ this.miHistory, this.miSettings, this.miHelp, - this.miBack + this.miBack, + this.miSuggest ); this.rendered = true; @@ -441,6 +453,8 @@ define([ this.miSettings[isVisible?'show':'hide'](); isVisible = this.mode.canHelp; this.miHelp[isVisible ?'show':'hide'](); + isVisible = this.mode.canSuggest; + this.miSuggest[isVisible ?'show':'hide'](); // 5: Close button isVisible = this.mode.canBack; diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 6a56f8d27c..3bfc97ee48 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -1999,6 +1999,8 @@ define([], function () { value = value ? this.txtYes : this.txtNo; } else if (type === AscCommon.c_oVariantTypes.vtFiletime) { value = this.dateToString(new Date(value), true); + } else { + value = Common.Utils.String.htmlEncode(value); } return '' + diff --git a/apps/documenteditor/main/locale/de.json b/apps/documenteditor/main/locale/de.json index 582b86dd7c..416521bf4b 100644 --- a/apps/documenteditor/main/locale/de.json +++ b/apps/documenteditor/main/locale/de.json @@ -2212,6 +2212,7 @@ "DE.Views.FileMenu.btnSaveCaption": "Speichern", "DE.Views.FileMenu.btnSaveCopyAsCaption": "Kopie speichern als", "DE.Views.FileMenu.btnSettingsCaption": "Erweiterte Einstellungen", + "DE.Views.FileMenu.btnSuggestCaption": "Eine Funktion vorschlagen", "DE.Views.FileMenu.btnSwitchToMobileCaption": "In den Mobilmodus wechseln", "DE.Views.FileMenu.btnToEditCaption": "Dokument bearbeiten", "DE.Views.FileMenu.textDownload": "Herunterladen", diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index d74f90498f..1c5aaf90fa 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -2301,6 +2301,7 @@ "DE.Views.EditListItemDialog.textValueError": "An item with the same value already exists.", "DE.Views.FileMenu.ariaFileMenu": "File menu", "DE.Views.FileMenu.btnBackCaption": "Open File Location", + "DE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature", "DE.Views.FileMenu.btnCloseEditor": "Close File", "DE.Views.FileMenu.btnCloseMenuCaption": "Back", "DE.Views.FileMenu.btnCreateNewCaption": "Create New", diff --git a/apps/documenteditor/main/locale/es.json b/apps/documenteditor/main/locale/es.json index bbd50d6254..5d43010db1 100644 --- a/apps/documenteditor/main/locale/es.json +++ b/apps/documenteditor/main/locale/es.json @@ -2212,6 +2212,7 @@ "DE.Views.FileMenu.btnSaveCaption": "Guardar", "DE.Views.FileMenu.btnSaveCopyAsCaption": "Guardar copia como", "DE.Views.FileMenu.btnSettingsCaption": "Configuración avanzada", + "DE.Views.FileMenu.btnSuggestCaption": "Sugerir una función", "DE.Views.FileMenu.btnSwitchToMobileCaption": "Cambiar a móvil", "DE.Views.FileMenu.btnToEditCaption": "Editar documento", "DE.Views.FileMenu.textDownload": "Descargar", diff --git a/apps/documenteditor/main/locale/fr.json b/apps/documenteditor/main/locale/fr.json index f1fc37d387..39a36ce029 100644 --- a/apps/documenteditor/main/locale/fr.json +++ b/apps/documenteditor/main/locale/fr.json @@ -2212,6 +2212,7 @@ "DE.Views.FileMenu.btnSaveCaption": "Enregistrer", "DE.Views.FileMenu.btnSaveCopyAsCaption": "Enregistrer une copie sous", "DE.Views.FileMenu.btnSettingsCaption": "Paramètres avancés", + "DE.Views.FileMenu.btnSuggestCaption": "Proposer une fonctionnalité", "DE.Views.FileMenu.btnSwitchToMobileCaption": "Passer en mode mobile", "DE.Views.FileMenu.btnToEditCaption": "Modifier le document", "DE.Views.FileMenu.textDownload": "Télécharger", diff --git a/apps/documenteditor/main/locale/it.json b/apps/documenteditor/main/locale/it.json index 3e4eb161c3..39d760ed50 100644 --- a/apps/documenteditor/main/locale/it.json +++ b/apps/documenteditor/main/locale/it.json @@ -2212,6 +2212,7 @@ "DE.Views.FileMenu.btnSaveCaption": "Salva", "DE.Views.FileMenu.btnSaveCopyAsCaption": "Salva copia come", "DE.Views.FileMenu.btnSettingsCaption": "Impostazioni avanzate", + "DE.Views.FileMenu.btnSuggestCaption": "Suggerisci una funzione", "DE.Views.FileMenu.btnSwitchToMobileCaption": "Passa a mobile", "DE.Views.FileMenu.btnToEditCaption": "Modifica documento", "DE.Views.FileMenu.textDownload": "Scarica", diff --git a/apps/documenteditor/main/locale/ro.json b/apps/documenteditor/main/locale/ro.json index 54e2e6a72e..3ca4357fb3 100644 --- a/apps/documenteditor/main/locale/ro.json +++ b/apps/documenteditor/main/locale/ro.json @@ -2212,6 +2212,7 @@ "DE.Views.FileMenu.btnSaveCaption": "Salvează", "DE.Views.FileMenu.btnSaveCopyAsCaption": "Salvare copie ca", "DE.Views.FileMenu.btnSettingsCaption": "Setări avansate", + "DE.Views.FileMenu.btnSuggestCaption": "Sugerează o funcție", "DE.Views.FileMenu.btnSwitchToMobileCaption": "Comutare la modul Mobil", "DE.Views.FileMenu.btnToEditCaption": "Editare document", "DE.Views.FileMenu.textDownload": "Descărcare", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index 2f7bc20b27..93b036dd96 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -2212,6 +2212,7 @@ "DE.Views.FileMenu.btnSaveCaption": "Сохранить", "DE.Views.FileMenu.btnSaveCopyAsCaption": "Сохранить копию как", "DE.Views.FileMenu.btnSettingsCaption": "Дополнительные параметры", + "DE.Views.FileMenu.btnSuggestCaption": "Предложить функцию", "DE.Views.FileMenu.btnSwitchToMobileCaption": "Переключиться в мобильный режим", "DE.Views.FileMenu.btnToEditCaption": "Редактировать", "DE.Views.FileMenu.textDownload": "Скачать", diff --git a/apps/documenteditor/mobile/src/view/Toolbar.jsx b/apps/documenteditor/mobile/src/view/Toolbar.jsx index 8e032c11bf..237a04cd34 100644 --- a/apps/documenteditor/mobile/src/view/Toolbar.jsx +++ b/apps/documenteditor/mobile/src/view/Toolbar.jsx @@ -146,12 +146,9 @@ const ToolbarView = props => { } ] : [ - // /!Device.phone && props.forceDesktopMode()}> - // - // , + !Device.phone && props.forceDesktopMode()}> + + , props.movePrevField()}>, props.moveNextField()}>, (props.canSubmitForms ? diff --git a/apps/pdfeditor/main/app/controller/LeftMenu.js b/apps/pdfeditor/main/app/controller/LeftMenu.js index 10d3623e4b..41f710db13 100644 --- a/apps/pdfeditor/main/app/controller/LeftMenu.js +++ b/apps/pdfeditor/main/app/controller/LeftMenu.js @@ -261,6 +261,7 @@ define([ break; case 'close-editor': Common.NotificationCenter.trigger('close'); break; case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break; + case 'suggest': Common.NotificationCenter.trigger('suggest'); break; default: close_menu = false; } diff --git a/apps/pdfeditor/main/app/controller/Main.js b/apps/pdfeditor/main/app/controller/Main.js index 6e33d73d42..01ea067756 100644 --- a/apps/pdfeditor/main/app/controller/Main.js +++ b/apps/pdfeditor/main/app/controller/Main.js @@ -187,6 +187,7 @@ define([ Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); + Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this)); Common.NotificationCenter.on('close', _.bind(this.closeEditor, this)); Common.NotificationCenter.on('markfavorite', _.bind(this.markFavorite, this)); Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this)); @@ -746,6 +747,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1371,6 +1376,7 @@ define([ this.appOptions.canDownloadOrigin = false; this.appOptions.canDownload = this.permissions.download !== false; this.appOptions.showSaveButton = this.appOptions.isEdit && !this.appOptions.isPDFFill && (this.appOptions.canSaveToFile || this.appOptions.canDownload); + this.appOptions.canSuggest = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false); this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader; this.appOptions.twoLevelHeader = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; // when compactHeader=true some buttons move to toolbar diff --git a/apps/pdfeditor/main/app/template/FileMenu.template b/apps/pdfeditor/main/app/template/FileMenu.template index 2c9db50a27..cbd27ae5cf 100644 --- a/apps/pdfeditor/main/app/template/FileMenu.template +++ b/apps/pdfeditor/main/app/template/FileMenu.template @@ -20,6 +20,7 @@
  • +
  • diff --git a/apps/pdfeditor/main/app/view/FileMenu.js b/apps/pdfeditor/main/app/view/FileMenu.js index 9657408b3c..e29b69970e 100644 --- a/apps/pdfeditor/main/app/view/FileMenu.js +++ b/apps/pdfeditor/main/app/view/FileMenu.js @@ -299,6 +299,17 @@ define([ iconCls: 'menu__icon btn-goback' }); + this.miSuggest = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-suggest'), + action : 'suggest', + caption : this.btnSuggestCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [-2, 22], + iconCls: 'menu__icon btn-suggest-feature' + }); + this.items = []; this.items.push( this.miClose, @@ -317,7 +328,8 @@ define([ this.miAccess, this.miSettings, this.miHelp, - this.miBack + this.miBack, + this.miSuggest ); this.rendered = true; @@ -421,6 +433,9 @@ define([ isVisible = this.mode.canBack; this.miBack[isVisible ?'show':'hide'](); + isVisible = this.mode.canSuggest; + this.miSuggest[isVisible ?'show':'hide'](); + if (!this.customizationDone) { this.customizationDone = true; this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text); diff --git a/apps/pdfeditor/main/locale/de.json b/apps/pdfeditor/main/locale/de.json index 2e6c32b782..101bb42720 100644 --- a/apps/pdfeditor/main/locale/de.json +++ b/apps/pdfeditor/main/locale/de.json @@ -1278,6 +1278,7 @@ "PDFE.Views.FileMenu.btnSaveCaption": "Speichern", "PDFE.Views.FileMenu.btnSaveCopyAsCaption": "Kopie speichern als", "PDFE.Views.FileMenu.btnSettingsCaption": "Erweiterte Einstellungen", + "PDFE.Views.FileMenu.btnSuggestCaption": "Eine Funktion vorschlagen", "PDFE.Views.FileMenu.btnSwitchToMobileCaption": "In den Mobilmodus wechseln", "PDFE.Views.FileMenu.btnToEditCaption": "Dokument bearbeiten", "PDFE.Views.FileMenu.textDownload": "Herunterladen", diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index 15e4ff6483..a26c444d97 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -1262,6 +1262,7 @@ "PDFE.Views.DocumentHolder.vertAlignText": "Vertical alignment", "PDFE.Views.FileMenu.ariaFileMenu": "File menu", "PDFE.Views.FileMenu.btnBackCaption": "Open File Location", + "PDFE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature", "PDFE.Views.FileMenu.btnCloseEditor": "Close File", "PDFE.Views.FileMenu.btnCloseMenuCaption": "Back", "PDFE.Views.FileMenu.btnCreateNewCaption": "Create New", diff --git a/apps/pdfeditor/main/locale/es.json b/apps/pdfeditor/main/locale/es.json index fda68f5a6f..59f70fa03d 100644 --- a/apps/pdfeditor/main/locale/es.json +++ b/apps/pdfeditor/main/locale/es.json @@ -1278,6 +1278,7 @@ "PDFE.Views.FileMenu.btnSaveCaption": "Guardar", "PDFE.Views.FileMenu.btnSaveCopyAsCaption": "Guardar copia como", "PDFE.Views.FileMenu.btnSettingsCaption": "Configuración avanzada", + "PDFE.Views.FileMenu.btnSuggestCaption": "Sugerir una función", "PDFE.Views.FileMenu.btnSwitchToMobileCaption": "Cambiar a móvil", "PDFE.Views.FileMenu.btnToEditCaption": "Editar documento", "PDFE.Views.FileMenu.textDownload": "Descargar", diff --git a/apps/pdfeditor/main/locale/fr.json b/apps/pdfeditor/main/locale/fr.json index 04790b0ca9..d1249e4cb9 100644 --- a/apps/pdfeditor/main/locale/fr.json +++ b/apps/pdfeditor/main/locale/fr.json @@ -1278,6 +1278,7 @@ "PDFE.Views.FileMenu.btnSaveCaption": "Enregistrer", "PDFE.Views.FileMenu.btnSaveCopyAsCaption": "Enregistrer une copie sous", "PDFE.Views.FileMenu.btnSettingsCaption": "Paramètres avancés", + "PDFE.Views.FileMenu.btnSuggestCaption": "Proposer une fonctionnalité", "PDFE.Views.FileMenu.btnSwitchToMobileCaption": "Passer en mode mobile", "PDFE.Views.FileMenu.btnToEditCaption": "Modifier le document", "PDFE.Views.FileMenu.textDownload": "Télécharger", diff --git a/apps/pdfeditor/main/locale/it.json b/apps/pdfeditor/main/locale/it.json index 79996362a4..72672031d1 100644 --- a/apps/pdfeditor/main/locale/it.json +++ b/apps/pdfeditor/main/locale/it.json @@ -1278,6 +1278,7 @@ "PDFE.Views.FileMenu.btnSaveCaption": "Salva", "PDFE.Views.FileMenu.btnSaveCopyAsCaption": "Salva copia come", "PDFE.Views.FileMenu.btnSettingsCaption": "Impostazioni avanzate", + "PDFE.Views.FileMenu.btnSuggestCaption": "Suggerisci una funzione", "PDFE.Views.FileMenu.btnSwitchToMobileCaption": "Passa a mobile", "PDFE.Views.FileMenu.btnToEditCaption": "Modifica documento", "PDFE.Views.FileMenu.textDownload": "Scarica", diff --git a/apps/pdfeditor/main/locale/ro.json b/apps/pdfeditor/main/locale/ro.json index 6365173ba2..d9eaf97f03 100644 --- a/apps/pdfeditor/main/locale/ro.json +++ b/apps/pdfeditor/main/locale/ro.json @@ -1278,6 +1278,7 @@ "PDFE.Views.FileMenu.btnSaveCaption": "Salvare", "PDFE.Views.FileMenu.btnSaveCopyAsCaption": "Salvare copie ca", "PDFE.Views.FileMenu.btnSettingsCaption": "Setări avansate", + "PDFE.Views.FileMenu.btnSuggestCaption": "Sugerează o funcție", "PDFE.Views.FileMenu.btnSwitchToMobileCaption": "Comutare la modul Mobil", "PDFE.Views.FileMenu.btnToEditCaption": "Editare document", "PDFE.Views.FileMenu.textDownload": "Descărcare", diff --git a/apps/pdfeditor/main/locale/ru.json b/apps/pdfeditor/main/locale/ru.json index 186a2bc048..ac770373c2 100644 --- a/apps/pdfeditor/main/locale/ru.json +++ b/apps/pdfeditor/main/locale/ru.json @@ -1278,6 +1278,7 @@ "PDFE.Views.FileMenu.btnSaveCaption": "Сохранить", "PDFE.Views.FileMenu.btnSaveCopyAsCaption": "Сохранить копию как", "PDFE.Views.FileMenu.btnSettingsCaption": "Дополнительные параметры", + "PDFE.Views.FileMenu.btnSuggestCaption": "Предложить функцию", "PDFE.Views.FileMenu.btnSwitchToMobileCaption": "Переключиться в мобильный режим", "PDFE.Views.FileMenu.btnToEditCaption": "Редактировать документ", "PDFE.Views.FileMenu.textDownload": "Скачать", diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index bcd57959d7..4dbef27e9d 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -279,6 +279,7 @@ define([ case 'external-help': close_menu = true; break; case 'close-editor': Common.NotificationCenter.trigger('close'); break; case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break; + case 'suggest': Common.NotificationCenter.trigger('suggest'); break; default: close_menu = false; } diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index fa061b2e31..64a1bcf4c0 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -233,6 +233,7 @@ define([ this.api.asc_registerCallback('asc_onEndDemonstration', _.bind(this.onEndDemonstration, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); + Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this)); Common.NotificationCenter.on('close', _.bind(this.closeEditor, this)); Common.NotificationCenter.on('showmessage', _.bind(this.onExternalMessage, this)); Common.NotificationCenter.on('showerror', _.bind(this.onError, this)); @@ -660,6 +661,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1388,6 +1393,7 @@ define([ this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && this.appOptions.canComments; this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; this.appOptions.showSaveButton = this.appOptions.isEdit; + this.appOptions.canSuggest = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false); this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader; this.appOptions.twoLevelHeader = this.appOptions.isEdit; // when compactHeader=true some buttons move to toolbar diff --git a/apps/presentationeditor/main/app/template/FileMenu.template b/apps/presentationeditor/main/app/template/FileMenu.template index a52eb60ae4..7bdc786891 100644 --- a/apps/presentationeditor/main/app/template/FileMenu.template +++ b/apps/presentationeditor/main/app/template/FileMenu.template @@ -22,6 +22,7 @@
  • +
  • diff --git a/apps/presentationeditor/main/app/view/FileMenu.js b/apps/presentationeditor/main/app/view/FileMenu.js index 91440a1ce8..cad0141014 100644 --- a/apps/presentationeditor/main/app/view/FileMenu.js +++ b/apps/presentationeditor/main/app/view/FileMenu.js @@ -311,6 +311,17 @@ define([ iconCls: 'menu__icon btn-goback' }); + this.miSuggest = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-suggest'), + action : 'suggest', + caption : this.btnSuggestCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [-2, 22], + iconCls: 'menu__icon btn-suggest-feature' + }); + this.items = []; this.items.push( this.miClose, @@ -330,7 +341,8 @@ define([ this.miHistory, this.miSettings, this.miHelp, - this.miBack + this.miBack, + this.miSuggest ); this.rendered = true; @@ -435,6 +447,9 @@ define([ isVisible = this.mode.canBack; this.miBack[isVisible ?'show':'hide'](); + isVisible = this.mode.canSuggest; + this.miSuggest[isVisible ?'show':'hide'](); + if (!this.customizationDone) { this.customizationDone = true; this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text); diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index d564bc0031..5ce4b175b8 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -1426,6 +1426,8 @@ define([], function () { value = value ? this.txtYes : this.txtNo; } else if (type === AscCommon.c_oVariantTypes.vtFiletime) { value = this.dateToString(new Date(value), true); + } else { + value = Common.Utils.String.htmlEncode(value); } return '' + diff --git a/apps/presentationeditor/main/locale/de.json b/apps/presentationeditor/main/locale/de.json index 81b1c35a07..b071e0883f 100644 --- a/apps/presentationeditor/main/locale/de.json +++ b/apps/presentationeditor/main/locale/de.json @@ -2095,6 +2095,7 @@ "PE.Views.FileMenu.btnSaveCaption": "Speichern", "PE.Views.FileMenu.btnSaveCopyAsCaption": "Kopie speichern als", "PE.Views.FileMenu.btnSettingsCaption": "Erweiterte Einstellungen", + "PE.Views.FileMenu.btnSuggestCaption": "Eine Funktion vorschlagen", "PE.Views.FileMenu.btnSwitchToMobileCaption": "In den Mobilmodus wechseln", "PE.Views.FileMenu.btnToEditCaption": "Präsentation bearbeiten", "PE.Views.FileMenuPanels.CreateNew.txtBlank": "Leere Präsentation", diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index ff91b3b3e4..de0d0419c5 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -2257,6 +2257,7 @@ "PE.Views.FileMenu.ariaFileMenu": "File menu", "PE.Views.FileMenu.btnAboutCaption": "About", "PE.Views.FileMenu.btnBackCaption": "Open File Location", + "PE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature", "PE.Views.FileMenu.btnCloseEditor": "Close File", "PE.Views.FileMenu.btnCloseMenuCaption": "Back", "PE.Views.FileMenu.btnCreateNewCaption": "Create New", diff --git a/apps/presentationeditor/main/locale/es.json b/apps/presentationeditor/main/locale/es.json index 9e7da42071..b9743a2961 100644 --- a/apps/presentationeditor/main/locale/es.json +++ b/apps/presentationeditor/main/locale/es.json @@ -2095,6 +2095,7 @@ "PE.Views.FileMenu.btnSaveCaption": "Guardar", "PE.Views.FileMenu.btnSaveCopyAsCaption": "Guardar copia como", "PE.Views.FileMenu.btnSettingsCaption": "Ajustes avanzados", + "PE.Views.FileMenu.btnSuggestCaption": "Sugerir una función", "PE.Views.FileMenu.btnSwitchToMobileCaption": "Cambiar a móvil", "PE.Views.FileMenu.btnToEditCaption": "Editar presentación", "PE.Views.FileMenuPanels.CreateNew.txtBlank": "Presentación en blanco", diff --git a/apps/presentationeditor/main/locale/fr.json b/apps/presentationeditor/main/locale/fr.json index 587f497a15..a70d818a1a 100644 --- a/apps/presentationeditor/main/locale/fr.json +++ b/apps/presentationeditor/main/locale/fr.json @@ -2095,6 +2095,7 @@ "PE.Views.FileMenu.btnSaveCaption": "Enregistrer", "PE.Views.FileMenu.btnSaveCopyAsCaption": "Enregistrer une copie sous", "PE.Views.FileMenu.btnSettingsCaption": "Paramètres avancés", + "PE.Views.FileMenu.btnSuggestCaption": "Proposer une fonctionnalité", "PE.Views.FileMenu.btnSwitchToMobileCaption": "Passer en mode mobile", "PE.Views.FileMenu.btnToEditCaption": "Modifier la présentation", "PE.Views.FileMenuPanels.CreateNew.txtBlank": "Présentation vide", diff --git a/apps/presentationeditor/main/locale/it.json b/apps/presentationeditor/main/locale/it.json index 29c90ae66d..3d7dd3ca0a 100644 --- a/apps/presentationeditor/main/locale/it.json +++ b/apps/presentationeditor/main/locale/it.json @@ -2095,6 +2095,7 @@ "PE.Views.FileMenu.btnSaveCaption": "Salva", "PE.Views.FileMenu.btnSaveCopyAsCaption": "Salva copia come", "PE.Views.FileMenu.btnSettingsCaption": "Impostazioni avanzate", + "PE.Views.FileMenu.btnSuggestCaption": "Suggerisci una funzione", "PE.Views.FileMenu.btnSwitchToMobileCaption": "Passa a mobile", "PE.Views.FileMenu.btnToEditCaption": "Modifica presentazione", "PE.Views.FileMenuPanels.CreateNew.txtBlank": "Presentazione vuota", diff --git a/apps/presentationeditor/main/locale/ro.json b/apps/presentationeditor/main/locale/ro.json index e921bb01c4..519af294d9 100644 --- a/apps/presentationeditor/main/locale/ro.json +++ b/apps/presentationeditor/main/locale/ro.json @@ -2095,6 +2095,7 @@ "PE.Views.FileMenu.btnSaveCaption": "Salvează", "PE.Views.FileMenu.btnSaveCopyAsCaption": "Salvare copie ca", "PE.Views.FileMenu.btnSettingsCaption": "Setări avansate", + "PE.Views.FileMenu.btnSuggestCaption": "Sugerează o funcție", "PE.Views.FileMenu.btnSwitchToMobileCaption": "Comutare la modul Mobil", "PE.Views.FileMenu.btnToEditCaption": "Editarea prezentării", "PE.Views.FileMenuPanels.CreateNew.txtBlank": "Prezentare necompletată", diff --git a/apps/presentationeditor/main/locale/ru.json b/apps/presentationeditor/main/locale/ru.json index 533e1adce6..2654f20894 100644 --- a/apps/presentationeditor/main/locale/ru.json +++ b/apps/presentationeditor/main/locale/ru.json @@ -2095,6 +2095,7 @@ "PE.Views.FileMenu.btnSaveCaption": "Сохранить", "PE.Views.FileMenu.btnSaveCopyAsCaption": "Сохранить копию как", "PE.Views.FileMenu.btnSettingsCaption": "Дополнительные параметры", + "PE.Views.FileMenu.btnSuggestCaption": "Предложить функцию", "PE.Views.FileMenu.btnSwitchToMobileCaption": "Переключиться в мобильный режим", "PE.Views.FileMenu.btnToEditCaption": "Редактировать", "PE.Views.FileMenuPanels.CreateNew.txtBlank": "Пустая презентация", diff --git a/apps/presentationeditor/mobile/src/controller/Main.jsx b/apps/presentationeditor/mobile/src/controller/Main.jsx index 4b8320b8cc..856bd4d064 100644 --- a/apps/presentationeditor/mobile/src/controller/Main.jsx +++ b/apps/presentationeditor/mobile/src/controller/Main.jsx @@ -615,7 +615,7 @@ class MainController extends Component { } onOrientationChange (event) { - const isPortrait = event.matches; + const isPortrait = screen.orientation?.type?.startsWith("portrait") || event.matches; let position = Common.Locale.isCurrentLangRtl ? AscCommon.thumbnailsPositionMap.right : AscCommon.thumbnailsPositionMap.left; if(isPortrait) { position = AscCommon.thumbnailsPositionMap.bottom; diff --git a/apps/presentationeditor/mobile/src/controller/Preview.jsx b/apps/presentationeditor/mobile/src/controller/Preview.jsx index 8497600090..c74d827262 100644 --- a/apps/presentationeditor/mobile/src/controller/Preview.jsx +++ b/apps/presentationeditor/mobile/src/controller/Preview.jsx @@ -105,12 +105,12 @@ const PreviewController = props => { const onTouchEnd = e => { e.preventDefault(); - const api = Common.EditorApi.get(); - - if (_touchEnd[0] - _touchStart[0] > 20) - api.DemonstrationPrevSlide(); - else if (_touchStart[0] - _touchEnd[0] > 20 || (Math.abs(_touchEnd[0] - _touchStart[0]) < 1 && Math.abs(_touchEnd[1] - _touchStart[1]) < 1)) - api.DemonstrationNextSlide(); + // const api = Common.EditorApi.get(); + // + // if (_touchEnd[0] - _touchStart[0] > 20) + // api.DemonstrationPrevSlide(); + // else if (_touchStart[0] - _touchEnd[0] > 20 || (Math.abs(_touchEnd[0] - _touchStart[0]) < 1 && Math.abs(_touchEnd[1] - _touchStart[1]) < 1)) + // api.DemonstrationNextSlide(); }; // API Handlers diff --git a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js index c1564c6ae3..b38f53c9e2 100644 --- a/apps/spreadsheeteditor/main/app/controller/LeftMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/LeftMenu.js @@ -332,6 +332,7 @@ define([ case 'external-help': close_menu = true; break; case 'close-editor': Common.NotificationCenter.trigger('close'); break; case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break; + case 'suggest': Common.NotificationCenter.trigger('suggest'); break; default: close_menu = false; } diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index c926ce7ec4..d81f844c9a 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -243,6 +243,7 @@ define([ this.api.asc_registerCallback('asc_onFrameEditorReady', _.bind(this.onFrameEditorReady, this)); Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); + Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this)); Common.NotificationCenter.on('close', _.bind(this.closeEditor, this)); Common.NotificationCenter.on('namedrange:locked', _.bind(this.onNamedRangeLocked, this)); Common.NotificationCenter.on('protectedrange:locked', _.bind(this.onProtectedRangeLocked, this)); @@ -740,6 +741,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1493,6 +1498,7 @@ define([ this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && this.appOptions.canComments; this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; this.appOptions.showSaveButton = this.appOptions.isEdit; + this.appOptions.canSuggest = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false); this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader; this.appOptions.twoLevelHeader = this.appOptions.isEdit; // when compactHeader=true some buttons move to toolbar diff --git a/apps/spreadsheeteditor/main/app/template/FileMenu.template b/apps/spreadsheeteditor/main/app/template/FileMenu.template index 74738688a0..22df29f200 100644 --- a/apps/spreadsheeteditor/main/app/template/FileMenu.template +++ b/apps/spreadsheeteditor/main/app/template/FileMenu.template @@ -22,6 +22,7 @@
  • +
  • diff --git a/apps/spreadsheeteditor/main/app/view/FileMenu.js b/apps/spreadsheeteditor/main/app/view/FileMenu.js index 8652b5869a..66ab5b77a6 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenu.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenu.js @@ -292,6 +292,17 @@ define([ iconCls: 'menu__icon btn-goback' }); + this.miSuggest = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-suggest'), + action : 'suggest', + caption : this.btnSuggestCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [-2, 22], + iconCls: 'menu__icon btn-suggest-feature' + }); + this.items = []; this.items.push( this.miClose, @@ -311,7 +322,8 @@ define([ this.miHistory, this.miSettings, this.miHelp, - this.miBack + this.miBack, + this.miSuggest ); this.rendered = true; @@ -417,6 +429,9 @@ define([ isVisible = this.mode.canBack; this.miBack[isVisible ?'show':'hide'](); + isVisible = this.mode.canSuggest; + this.miSuggest[isVisible ?'show':'hide'](); + if (!this.customizationDone) { this.customizationDone = true; this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text); diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 0727ab370e..964e1855a0 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -2043,6 +2043,8 @@ define([], function () { value = value ? this.txtYes : this.txtNo; } else if (type === AscCommon.c_oVariantTypes.vtFiletime) { value = this.dateToString(new Date(value), true); + } else { + value = Common.Utils.String.htmlEncode(value); } return '' + diff --git a/apps/spreadsheeteditor/main/locale/de.json b/apps/spreadsheeteditor/main/locale/de.json index 95e9fb878a..da8ded9c66 100644 --- a/apps/spreadsheeteditor/main/locale/de.json +++ b/apps/spreadsheeteditor/main/locale/de.json @@ -2706,6 +2706,7 @@ "SSE.Views.FileMenu.btnSaveCaption": "Speichern", "SSE.Views.FileMenu.btnSaveCopyAsCaption": "Kopie speichern als", "SSE.Views.FileMenu.btnSettingsCaption": "Erweiterte Einstellungen", + "SSE.Views.FileMenu.btnSuggestCaption": "Eine Funktion vorschlagen", "SSE.Views.FileMenu.btnSwitchToMobileCaption": "In den Mobilmodus wechseln", "SSE.Views.FileMenu.btnToEditCaption": "Tabelle bearbeiten", "SSE.Views.FileMenuPanels.CreateNew.txtBlank": "Leere Tabellenkalkulation", diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index fc9eac351e..3884114925 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2768,6 +2768,7 @@ "SSE.Views.FieldSettingsDialog.txtVarp": "Varp", "SSE.Views.FileMenu.ariaFileMenu": "File menu", "SSE.Views.FileMenu.btnBackCaption": "Open File Location", + "SSE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature", "SSE.Views.FileMenu.btnCloseEditor": "Close File", "SSE.Views.FileMenu.btnCloseMenuCaption": "Back", "SSE.Views.FileMenu.btnCreateNewCaption": "Create New", diff --git a/apps/spreadsheeteditor/main/locale/es.json b/apps/spreadsheeteditor/main/locale/es.json index 1b03910a95..419a64d51e 100644 --- a/apps/spreadsheeteditor/main/locale/es.json +++ b/apps/spreadsheeteditor/main/locale/es.json @@ -2706,6 +2706,7 @@ "SSE.Views.FileMenu.btnSaveCaption": "Guardar", "SSE.Views.FileMenu.btnSaveCopyAsCaption": "Guardar copia como", "SSE.Views.FileMenu.btnSettingsCaption": "Ajustes avanzados", + "SSE.Views.FileMenu.btnSuggestCaption": "Sugerir una función", "SSE.Views.FileMenu.btnSwitchToMobileCaption": "Cambiar a móvil", "SSE.Views.FileMenu.btnToEditCaption": "Editar hoja de cálculo", "SSE.Views.FileMenuPanels.CreateNew.txtBlank": "Hoja de cálculo en blanco", diff --git a/apps/spreadsheeteditor/main/locale/fr.json b/apps/spreadsheeteditor/main/locale/fr.json index cc2a29eb0b..b2a1b3cecf 100644 --- a/apps/spreadsheeteditor/main/locale/fr.json +++ b/apps/spreadsheeteditor/main/locale/fr.json @@ -2706,6 +2706,7 @@ "SSE.Views.FileMenu.btnSaveCaption": "Enregistrer", "SSE.Views.FileMenu.btnSaveCopyAsCaption": "Enregistrer une copie sous", "SSE.Views.FileMenu.btnSettingsCaption": "Paramètres avancés", + "SSE.Views.FileMenu.btnSuggestCaption": "Proposer une fonctionnalité", "SSE.Views.FileMenu.btnSwitchToMobileCaption": "Passer en mode mobile", "SSE.Views.FileMenu.btnToEditCaption": "Modifier la feuille de calcul", "SSE.Views.FileMenuPanels.CreateNew.txtBlank": "Feuille de calcul vide", diff --git a/apps/spreadsheeteditor/main/locale/it.json b/apps/spreadsheeteditor/main/locale/it.json index 6494c6b6ab..48ab9254d1 100644 --- a/apps/spreadsheeteditor/main/locale/it.json +++ b/apps/spreadsheeteditor/main/locale/it.json @@ -2706,6 +2706,7 @@ "SSE.Views.FileMenu.btnSaveCaption": "Salva", "SSE.Views.FileMenu.btnSaveCopyAsCaption": "Salva copia come", "SSE.Views.FileMenu.btnSettingsCaption": "Impostazioni avanzate", + "SSE.Views.FileMenu.btnSuggestCaption": "Suggerisci una funzione", "SSE.Views.FileMenu.btnSwitchToMobileCaption": "Passa al cellulare", "SSE.Views.FileMenu.btnToEditCaption": "Modifica foglio di calcolo", "SSE.Views.FileMenuPanels.CreateNew.txtBlank": "Folio di calcolo vuoto", diff --git a/apps/spreadsheeteditor/main/locale/ro.json b/apps/spreadsheeteditor/main/locale/ro.json index fffbd0662c..853b75317d 100644 --- a/apps/spreadsheeteditor/main/locale/ro.json +++ b/apps/spreadsheeteditor/main/locale/ro.json @@ -2706,6 +2706,7 @@ "SSE.Views.FileMenu.btnSaveCaption": "Salvează", "SSE.Views.FileMenu.btnSaveCopyAsCaption": "Salvare copie ca", "SSE.Views.FileMenu.btnSettingsCaption": "Setări avansate", + "SSE.Views.FileMenu.btnSuggestCaption": "Sugerează o funcție", "SSE.Views.FileMenu.btnSwitchToMobileCaption": "Comutare la modul Mobil", "SSE.Views.FileMenu.btnToEditCaption": "Editare foaie de calcul", "SSE.Views.FileMenuPanels.CreateNew.txtBlank": "Foaie de calcul necompletată", diff --git a/apps/spreadsheeteditor/main/locale/ru.json b/apps/spreadsheeteditor/main/locale/ru.json index 2bf9ddfea1..7a5270a2ee 100644 --- a/apps/spreadsheeteditor/main/locale/ru.json +++ b/apps/spreadsheeteditor/main/locale/ru.json @@ -2706,6 +2706,7 @@ "SSE.Views.FileMenu.btnSaveCaption": "Сохранить", "SSE.Views.FileMenu.btnSaveCopyAsCaption": "Сохранить копию как", "SSE.Views.FileMenu.btnSettingsCaption": "Дополнительные параметры", + "SSE.Views.FileMenu.btnSuggestCaption": "Предложить функцию", "SSE.Views.FileMenu.btnSwitchToMobileCaption": "Переключиться в мобильный режим", "SSE.Views.FileMenu.btnToEditCaption": "Редактировать таблицу", "SSE.Views.FileMenuPanels.CreateNew.txtBlank": "Пустая таблица", diff --git a/apps/spreadsheeteditor/mobile/src/less/celleditor.less b/apps/spreadsheeteditor/mobile/src/less/celleditor.less index 629d016091..d14d77c327 100644 --- a/apps/spreadsheeteditor/mobile/src/less/celleditor.less +++ b/apps/spreadsheeteditor/mobile/src/less/celleditor.less @@ -60,6 +60,8 @@ line-height: 30px; //font-size: 17px; text-align: center; + white-space: nowrap; + overflow: hidden; color: @text-normal; diff --git a/apps/visioeditor/main/app/controller/LeftMenu.js b/apps/visioeditor/main/app/controller/LeftMenu.js index f1696934c3..be7b89f41e 100644 --- a/apps/visioeditor/main/app/controller/LeftMenu.js +++ b/apps/visioeditor/main/app/controller/LeftMenu.js @@ -222,6 +222,7 @@ define([ break; case 'close-editor': Common.NotificationCenter.trigger('close'); break; case 'switch:mobile': Common.Gateway.switchEditorType('mobile', true); break; + case 'suggest': Common.NotificationCenter.trigger('suggest'); break; default: close_menu = false; } diff --git a/apps/visioeditor/main/app/controller/Main.js b/apps/visioeditor/main/app/controller/Main.js index 03ee23c429..9ba60f25d6 100644 --- a/apps/visioeditor/main/app/controller/Main.js +++ b/apps/visioeditor/main/app/controller/Main.js @@ -171,6 +171,7 @@ define([ Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this)); Common.NotificationCenter.on('goback', _.bind(this.goBack, this)); + Common.NotificationCenter.on('suggest', _.bind(this.onSuggest, this)); Common.NotificationCenter.on('close', _.bind(this.closeEditor, this)); Common.NotificationCenter.on('markfavorite', _.bind(this.markFavorite, this)); Common.NotificationCenter.on('download:advanced', _.bind(this.onAdvancedOptions, this)); @@ -649,6 +650,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1175,6 +1180,7 @@ define([ this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && this.appOptions.canComments; this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; this.appOptions.showSaveButton = this.appOptions.isEdit; + this.appOptions.canSuggest = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.suggestFeature===false); this.appOptions.compactHeader = this.appOptions.customization && (typeof (this.appOptions.customization) == 'object') && !!this.appOptions.customization.compactHeader; this.appOptions.twoLevelHeader = this.appOptions.isEdit; // when compactHeader=true some buttons move to toolbar diff --git a/apps/visioeditor/main/app/template/FileMenu.template b/apps/visioeditor/main/app/template/FileMenu.template index 42aacd17e8..619bde2e36 100644 --- a/apps/visioeditor/main/app/template/FileMenu.template +++ b/apps/visioeditor/main/app/template/FileMenu.template @@ -17,6 +17,7 @@
  • +
  • diff --git a/apps/visioeditor/main/app/view/FileMenu.js b/apps/visioeditor/main/app/view/FileMenu.js index 68d05c1940..5e43e6ae79 100644 --- a/apps/visioeditor/main/app/view/FileMenu.js +++ b/apps/visioeditor/main/app/view/FileMenu.js @@ -240,6 +240,17 @@ define([ iconCls: 'menu__icon btn-goback' }); + this.miSuggest = new Common.UI.MenuItem({ + el : $markup.elementById('#fm-btn-suggest'), + action : 'suggest', + caption : this.btnSuggestCaption, + canFocused: false, + dataHint: 1, + dataHintDirection: 'left-top', + dataHintOffset: [-2, 22], + iconCls: 'menu__icon btn-suggest-feature' + }); + this.items = []; this.items.push( this.miClose, @@ -254,7 +265,8 @@ define([ this.miAccess, this.miSettings, this.miHelp, - this.miBack + this.miBack, + this.miSuggest ); this.rendered = true; @@ -352,6 +364,9 @@ define([ isVisible = this.mode.canBack; this.miBack[isVisible ?'show':'hide'](); + isVisible = this.mode.canSuggest; + this.miSuggest[isVisible ?'show':'hide'](); + if (!this.customizationDone) { this.customizationDone = true; this.mode.canBack && this.mode.customization.goback.text && typeof this.mode.customization.goback.text === 'string' && this.miBack.setCaption(this.mode.customization.goback.text); diff --git a/apps/visioeditor/main/app/view/FileMenuPanels.js b/apps/visioeditor/main/app/view/FileMenuPanels.js index 88f221b1d3..57ac4c0b63 100644 --- a/apps/visioeditor/main/app/view/FileMenuPanels.js +++ b/apps/visioeditor/main/app/view/FileMenuPanels.js @@ -1087,6 +1087,8 @@ define([], function () { value = value ? this.txtYes : this.txtNo; } else if (type === AscCommon.c_oVariantTypes.vtFiletime) { value = this.dateToString(new Date(value), true); + } else { + value = Common.Utils.String.htmlEncode(value); } return '' + diff --git a/apps/visioeditor/main/locale/de.json b/apps/visioeditor/main/locale/de.json index 22cf736535..37776e1aac 100644 --- a/apps/visioeditor/main/locale/de.json +++ b/apps/visioeditor/main/locale/de.json @@ -334,6 +334,7 @@ "VE.Views.FileMenu.btnSaveAsCaption": "Speichern als", "VE.Views.FileMenu.btnSaveCopyAsCaption": "Kopie speichern als", "VE.Views.FileMenu.btnSettingsCaption": "Erweiterte Einstellungen", + "VE.Views.FileMenu.btnSuggestCaption": "Eine Funktion vorschlagen", "VE.Views.FileMenu.btnSwitchToMobileCaption": "In den Mobilmodus wechseln", "VE.Views.FileMenu.textDownload": "Herunterladen", "VE.Views.FileMenuPanels.CreateNew.txtBlank": "Leeres Dokument", diff --git a/apps/visioeditor/main/locale/en.json b/apps/visioeditor/main/locale/en.json index 86d3a26b30..01e6bb75d4 100644 --- a/apps/visioeditor/main/locale/en.json +++ b/apps/visioeditor/main/locale/en.json @@ -318,6 +318,7 @@ "VE.Views.DocumentHolder.txtWarnUrl": "Clicking this link can be harmful to your device and data.
    Are you sure you want to continue?", "VE.Views.FileMenu.ariaFileMenu": "File menu", "VE.Views.FileMenu.btnBackCaption": "Open File Location", + "VE.Views.FileMenu.btnSuggestCaption": "Suggest a Feature", "VE.Views.FileMenu.btnCloseEditor": "Close File", "VE.Views.FileMenu.btnCloseMenuCaption": "Back", "VE.Views.FileMenu.btnCreateNewCaption": "Create New", diff --git a/apps/visioeditor/main/locale/es.json b/apps/visioeditor/main/locale/es.json index e82bfd032c..8b5cda985b 100644 --- a/apps/visioeditor/main/locale/es.json +++ b/apps/visioeditor/main/locale/es.json @@ -334,6 +334,7 @@ "VE.Views.FileMenu.btnSaveAsCaption": "Guardar como", "VE.Views.FileMenu.btnSaveCopyAsCaption": "Guardar copia como", "VE.Views.FileMenu.btnSettingsCaption": "Configuración avanzada", + "VE.Views.FileMenu.btnSuggestCaption": "Sugerir una función", "VE.Views.FileMenu.btnSwitchToMobileCaption": "Cambiar a móvil", "VE.Views.FileMenu.textDownload": "Descargar", "VE.Views.FileMenuPanels.CreateNew.txtBlank": "Documento en blanco", diff --git a/apps/visioeditor/main/locale/fr.json b/apps/visioeditor/main/locale/fr.json index 36ed90c401..e9b1b97ea1 100644 --- a/apps/visioeditor/main/locale/fr.json +++ b/apps/visioeditor/main/locale/fr.json @@ -334,6 +334,7 @@ "VE.Views.FileMenu.btnSaveAsCaption": "Enregistrer sous", "VE.Views.FileMenu.btnSaveCopyAsCaption": "Enregistrer une copie sous", "VE.Views.FileMenu.btnSettingsCaption": "Paramètres avancés", + "VE.Views.FileMenu.btnSuggestCaption": "Proposer une fonctionnalité", "VE.Views.FileMenu.btnSwitchToMobileCaption": "Passer en mode mobile", "VE.Views.FileMenu.textDownload": "Télécharger", "VE.Views.FileMenuPanels.CreateNew.txtBlank": "Document vide", diff --git a/apps/visioeditor/main/locale/it.json b/apps/visioeditor/main/locale/it.json index 580734eb3a..03acad6a7c 100644 --- a/apps/visioeditor/main/locale/it.json +++ b/apps/visioeditor/main/locale/it.json @@ -334,6 +334,7 @@ "VE.Views.FileMenu.btnSaveAsCaption": "Salva come", "VE.Views.FileMenu.btnSaveCopyAsCaption": "Salva copia come", "VE.Views.FileMenu.btnSettingsCaption": "Impostazioni avanzate", + "VE.Views.FileMenu.btnSuggestCaption": "Suggerisci una funzione", "VE.Views.FileMenu.btnSwitchToMobileCaption": "Passa a mobile", "VE.Views.FileMenu.textDownload": "Scarica", "VE.Views.FileMenuPanels.CreateNew.txtBlank": "Documento vuoto", diff --git a/apps/visioeditor/main/locale/ro.json b/apps/visioeditor/main/locale/ro.json index 3325e0bcfe..2142218e44 100644 --- a/apps/visioeditor/main/locale/ro.json +++ b/apps/visioeditor/main/locale/ro.json @@ -334,6 +334,7 @@ "VE.Views.FileMenu.btnSaveAsCaption": "Salvare ca", "VE.Views.FileMenu.btnSaveCopyAsCaption": "Salvare copie ca", "VE.Views.FileMenu.btnSettingsCaption": "Setări avansate", + "VE.Views.FileMenu.btnSuggestCaption": "Sugerează o funcție", "VE.Views.FileMenu.btnSwitchToMobileCaption": "Comutare la modul Mobil", "VE.Views.FileMenu.textDownload": "Descărcare", "VE.Views.FileMenuPanels.CreateNew.txtBlank": "Document necompletat", diff --git a/apps/visioeditor/main/locale/ru.json b/apps/visioeditor/main/locale/ru.json index a342a18bb7..6948c2e0c0 100644 --- a/apps/visioeditor/main/locale/ru.json +++ b/apps/visioeditor/main/locale/ru.json @@ -334,6 +334,7 @@ "VE.Views.FileMenu.btnSaveAsCaption": "Сохранить как", "VE.Views.FileMenu.btnSaveCopyAsCaption": "Сохранить копию как", "VE.Views.FileMenu.btnSettingsCaption": "Дополнительные параметры", + "VE.Views.FileMenu.btnSuggestCaption": "Предложить функцию", "VE.Views.FileMenu.btnSwitchToMobileCaption": "Переключиться в мобильный режим", "VE.Views.FileMenu.textDownload": "Скачать", "VE.Views.FileMenuPanels.CreateNew.txtBlank": "Пустой документ", diff --git a/build/Gruntfile.js b/build/Gruntfile.js index efd803b9d1..044fa02213 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -110,6 +110,9 @@ module.exports = function(grunt) { }, { from: /\{\{DEFAULT_LANG\}\}/g, to: _encode(process.env.DEFAULT_LANG) || 'en' + }, { + from: /\{\{SUGGEST_URL\}\}/g, + to: _encode(process.env.SUGGEST_URL) || 'https://feedback.onlyoffice.com/forums/966080-your-voice-matters?category_id=519084' }]; var helpreplacements = [