diff --git a/apps/pdfeditor/main/app/view/FileMenuPanels.js b/apps/pdfeditor/main/app/view/FileMenuPanels.js index f0607cee8c..5be5df1a5c 100644 --- a/apps/pdfeditor/main/app/view/FileMenuPanels.js +++ b/apps/pdfeditor/main/app/view/FileMenuPanels.js @@ -40,7 +40,8 @@ */ define([ - 'common/main/lib/view/DocumentAccessDialog' + 'common/main/lib/view/DocumentAccessDialog', + 'common/main/lib/view/CustomizeQuickAccessDialog' ], function () { 'use strict'; @@ -358,6 +359,9 @@ define([ '', '', '',*/ + '', + '', + '', '', '', '', @@ -601,6 +605,11 @@ define([ dataHintOffset: 'big' }); + this.btnCustomizeQuickAccess = new Common.UI.Button({ + el: $markup.findById('#fms-btn-customize-quick-access') + }); + this.btnCustomizeQuickAccess.on('click', _.bind(this.customizeQuickAccess, this)); + this.cmbTheme = new Common.UI.ComboBox({ el : $markup.findById('#fms-cmb-theme'), style : 'width: 160px;', @@ -721,6 +730,10 @@ define([ if ( !Common.UI.Themes.available() ) { $('tr.themes, tr.themes + tr.divider', this.el).hide(); } + + if (mode.compactHeader) { + $('tr.quick-access', this.el).hide(); + } }, setApi: function(o) { @@ -869,6 +882,23 @@ define([ this._fontRender = combo.getValue(); }, + customizeQuickAccess: function () { + if (this.dlgQuickAccess && this.dlgQuickAccess.isVisible()) return; + this.dlgQuickAccess = new Common.Views.CustomizeQuickAccessDialog({ + showSave: this.mode.showSaveButton, + showPrint: this.mode.canPrint && this.mode.twoLevelHeader, + showQuickPrint: this.mode.canQuickPrint && this.mode.twoLevelHeader, + props: { + save: Common.localStorage.getBool('pdfe-quick-access-save', true), + print: Common.localStorage.getBool('pdfe-quick-access-print', true), + quickPrint: Common.localStorage.getBool('pdfe-quick-access-quick-print', true), + undo: Common.localStorage.getBool('pdfe-quick-access-undo', true), + redo: Common.localStorage.getBool('pdfe-quick-access-redo', true) + } + }); + this.dlgQuickAccess.show(); + }, + strZoom: 'Default Zoom Value', strShowChanges: 'Real-time Collaboration Changes', txtAll: 'View All', @@ -913,7 +943,8 @@ define([ txtInch: 'Inch', txtCm: 'Centimeter', txtPt: 'Point', - txtUseAnnotateBar: 'Use the mini toolbar when selecting text' + txtUseAnnotateBar: 'Use the mini toolbar when selecting text', + txtCustomizeQuickAccess: 'Customize quick access' }, PDFE.Views.FileMenuPanels.Settings || {})); diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index c4a87fce62..674cec8612 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -328,6 +328,13 @@ "Common.Views.UserNameDialog.textDontShow": "Don't ask me again", "Common.Views.UserNameDialog.textLabel": "Label:", "Common.Views.UserNameDialog.textLabelError": "Label must not be empty.", + "Common.Views.CustomizeQuickAccessDialog.textMsg": "Check the commands that will be displayed on the Quick Access Toolbar", + "Common.Views.CustomizeQuickAccessDialog.textPrint": "Print", + "Common.Views.CustomizeQuickAccessDialog.textQuickPrint": "Quick Print", + "Common.Views.CustomizeQuickAccessDialog.textRedo": "Redo", + "Common.Views.CustomizeQuickAccessDialog.textSave": "Save", + "Common.Views.CustomizeQuickAccessDialog.textTitle": "Customize quick access", + "Common.Views.CustomizeQuickAccessDialog.textUndo": "Undo", "PDFE.Controllers.InsTab.textAccent": "Accents", "PDFE.Controllers.InsTab.textBracket": "Brackets", "PDFE.Controllers.InsTab.textFraction": "Fractions", @@ -1321,6 +1328,7 @@ "PDFE.Views.FileMenuPanels.Settings.txtWin": "as Windows", "PDFE.Views.FileMenuPanels.Settings.txtWorkspace": "Workspace", "PDFE.Views.FileMenuPanels.Settings.txtUseAnnotateBar": "Use the mini toolbar when selecting text", + "PDFE.Views.FileMenuPanels.txtCustomizeQuickAccess": "Customize quick access", "PDFE.Views.FileMenuPanels.ViewSaveAs.textDownloadAs": "Download as", "PDFE.Views.FileMenuPanels.ViewSaveCopy.textSaveCopyAs": "Save Copy as", "PDFE.Views.HyperlinkSettingsDialog.strDisplay": "Display",