diff --git a/apps/pdfeditor/main/app/controller/DocumentHolder.js b/apps/pdfeditor/main/app/controller/DocumentHolder.js index 15cf19fd9e..ee1da2500a 100644 --- a/apps/pdfeditor/main/app/controller/DocumentHolder.js +++ b/apps/pdfeditor/main/app/controller/DocumentHolder.js @@ -81,7 +81,10 @@ define([ 'DocumentHolder': { 'createdelayedelements': this.createDelayedElements, 'equation:callback': this.equationCallback - } + }, + 'FileMenu': { + 'settings:apply': _.bind(this.applySettings, this) + }, }); var me = this; @@ -2811,7 +2814,7 @@ define([ } this.lastAnnotBarBounds = bounds; - if (bounds[3] < 0 || bounds[1] > this._Height) { + if (bounds[3] < 0 || bounds[1] > this._Height || !Common.Utils.InternalSettings.get('pdfe-settings-annot-bar')) { this.onHideAnnotBar(); return; } @@ -2901,6 +2904,10 @@ define([ editComplete: function() { this.documentHolder && this.documentHolder.fireEvent('editcomplete', this.documentHolder); + }, + + applySettings: function() { + !Common.Utils.InternalSettings.get('pdfe-settings-annot-bar') && this.onHideAnnotBar(); } }); }); \ No newline at end of file diff --git a/apps/pdfeditor/main/app/controller/Main.js b/apps/pdfeditor/main/app/controller/Main.js index 7b3be5fa30..d0666afad9 100644 --- a/apps/pdfeditor/main/app/controller/Main.js +++ b/apps/pdfeditor/main/app/controller/Main.js @@ -1015,6 +1015,8 @@ define([ value = Common.localStorage.getBool("pdfe-settings-show-alt-hints", Common.Utils.isMac ? false : true); Common.Utils.InternalSettings.set("pdfe-settings-show-alt-hints", value); + value = Common.localStorage.getBool("pdfe-settings-annot-bar", true); + Common.Utils.InternalSettings.set("pdfe-settings-annot-bar", value); /** coauthoring begin **/ me.onPdfModeCoAuthApply(); diff --git a/apps/pdfeditor/main/app/view/FileMenuPanels.js b/apps/pdfeditor/main/app/view/FileMenuPanels.js index 0b1126580f..f0607cee8c 100644 --- a/apps/pdfeditor/main/app/view/FileMenuPanels.js +++ b/apps/pdfeditor/main/app/view/FileMenuPanels.js @@ -346,6 +346,9 @@ define([ '', '
', '', + '', + '
', + '', '', '
Beta', '', @@ -361,7 +364,7 @@ define([ '
', '
', '', - '', + '', '', '', '', @@ -410,6 +413,14 @@ define([ }); (Common.Utils.isIE || Common.Utils.isMac && Common.Utils.isGecko) && this.chUseAltKey.$el.parent().parent().hide(); + this.chUseAnnotateBar = new Common.UI.CheckBox({ + el: $markup.findById('#fms-chb-annotation-bar'), + labelText: this.txtUseAnnotateBar, + dataHint: '2', + dataHintDirection: 'left', + dataHintOffset: 'small' + }); + this.chScreenReader = new Common.UI.CheckBox({ el: $markup.findById('#fms-chb-scrn-reader'), labelText: this.txtScreenReader, @@ -690,7 +701,8 @@ define([ var fast_coauth = Common.Utils.InternalSettings.get("pdfe-settings-coauthmode"), canPDFSave = (mode.isPDFAnnotate || mode.isPDFEdit) && mode.canSaveToFile && !mode.isOffline; - $('tr.edit', this.el)[mode.isPDFEdit?'show':'hide'](); + $('tr.edit', this.el)[mode.isEdit?'show':'hide'](); + $('tr.edit-pdf', this.el)[mode.isPDFEdit?'show':'hide'](); $('tr.autosave', this.el)[mode.isEdit && canPDFSave && (mode.canChangeCoAuthoring || !fast_coauth) ? 'show' : 'hide'](); $('tr.forcesave', this.el)[mode.canForcesave && canPDFSave ? 'show' : 'hide'](); $('tr.editsave',this.el)[(mode.isEdit || mode.canForcesave) && canPDFSave ? 'show' : 'hide'](); @@ -719,6 +731,7 @@ define([ updateSettings: function() { this.chUseAltKey.setValue(Common.Utils.InternalSettings.get("pdfe-settings-show-alt-hints")); this.chScreenReader.setValue(Common.Utils.InternalSettings.get("app-settings-screen-reader")); + this.chUseAnnotateBar.setValue(Common.Utils.InternalSettings.get("pdfe-settings-annot-bar")); var value = Common.Utils.InternalSettings.get("pdfe-settings-zoom"); value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : 100); @@ -788,6 +801,8 @@ define([ Common.localStorage.setItem("pdfe-settings-zoom", this.cmbZoom.getValue()); Common.Utils.InternalSettings.set("pdfe-settings-zoom", Common.localStorage.getItem("pdfe-settings-zoom")); Common.localStorage.setItem("app-settings-screen-reader", this.chScreenReader.isChecked() ? 1 : 0); + Common.localStorage.setItem("pdfe-settings-annot-bar", this.chUseAnnotateBar.isChecked() ? 1 : 0); + Common.Utils.InternalSettings.set("pdfe-settings-annot-bar", Common.localStorage.getBool("pdfe-settings-annot-bar")); /** coauthoring begin **/ Common.Utils.InternalSettings.set("pdfe-settings-livecomment", this.chLiveComment.isChecked()); @@ -897,7 +912,8 @@ define([ strUnit: 'Unit of Measurement', txtInch: 'Inch', txtCm: 'Centimeter', - txtPt: 'Point' + txtPt: 'Point', + txtUseAnnotateBar: 'Use the mini toolbar when selecting text' }, PDFE.Views.FileMenuPanels.Settings || {})); diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index 611518c63c..c4a87fce62 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -1320,6 +1320,7 @@ "PDFE.Views.FileMenuPanels.Settings.txtUseOptionKey": "Use Option key to navigate the user interface using the keyboard", "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.ViewSaveAs.textDownloadAs": "Download as", "PDFE.Views.FileMenuPanels.ViewSaveCopy.textSaveCopyAs": "Save Copy as", "PDFE.Views.HyperlinkSettingsDialog.strDisplay": "Display",