diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 8c2bedcf91..c2e454897a 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -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 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 c98f38f7ae..5e074c710a 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)); @@ -1016,6 +1017,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1745,6 +1750,9 @@ define([ 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) + var suggestUrl = '{{SUGGEST_URL}}'; + this.appOptions.canSuggest = suggestUrl && !((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) this.appOptions.canRequestEditRights = false; // if open form in viewer - check permissions.edit option 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/locale/en.json b/apps/documenteditor/main/locale/en.json index bc9dc835e6..e1510eb7bc 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -2193,6 +2193,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/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 ed9f1d598d..eb9bdf02c2 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(); }, @@ -1372,6 +1377,9 @@ define([ this.appOptions.canDownload = this.permissions.download !== false; this.appOptions.showSaveButton = this.appOptions.isEdit && !this.appOptions.isPDFFill && (this.appOptions.canSaveToFile || this.appOptions.canDownload); + var suggestUrl = '{{SUGGEST_URL}}'; + this.appOptions.canSuggest = suggestUrl && !((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/en.json b/apps/pdfeditor/main/locale/en.json index 70a9d52138..5fe5f39f51 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -1260,6 +1260,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/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 ec57ad6816..ef09c43be3 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)); @@ -657,6 +658,10 @@ define([ } }, + onSuggest: function() { + window.open('{{SUGGEST_URL}}', "_blank"); + }, + closeEditor: function() { this.appOptions.canRequestClose && this.onRequestClose(); }, @@ -1379,6 +1384,9 @@ define([ this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; this.appOptions.showSaveButton = this.appOptions.isEdit; + var suggestUrl = '{{SUGGEST_URL}}'; + this.appOptions.canSuggest = suggestUrl && !((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/locale/en.json b/apps/presentationeditor/main/locale/en.json index d6aaf4f19d..d582cabc41 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -2076,6 +2076,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/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 b736b9a2a5..061afecabe 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_onOleEditorReady', _.bind(this.onOleEditorReady, 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(); }, @@ -1502,6 +1507,9 @@ define([ this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; this.appOptions.showSaveButton = this.appOptions.isEdit; + var suggestUrl = '{{SUGGEST_URL}}'; + this.appOptions.canSuggest = suggestUrl && !((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/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 4ce7b02130..10147cefde 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2686,6 +2686,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/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 7cd3226dc1..49086949d4 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(); }, @@ -1176,6 +1181,9 @@ define([ this.appOptions.canSaveToFile = this.appOptions.isEdit || this.appOptions.isRestrictedEdit; this.appOptions.showSaveButton = this.appOptions.isEdit; + var suggestUrl = '{{SUGGEST_URL}}'; + this.appOptions.canSuggest = suggestUrl && !((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/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/build/Gruntfile.js b/build/Gruntfile.js index efd803b9d1..28f199c5ed 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.DEFAULT_LANG) || 'https://feedback.onlyoffice.com/forums/966080-your-voice-matters?category_id=519084' }]; var helpreplacements = [