[PDF] Fix Bug 68455

This commit is contained in:
Julia Radzhabova
2024-06-13 20:35:46 +03:00
parent 35ce5a9613
commit 74eeb99704
4 changed files with 31 additions and 5 deletions

View File

@ -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();
}
});
});

View File

@ -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();

View File

@ -346,6 +346,9 @@ define([
'<tr>',
'<td colspan="2"><div id="fms-chb-use-alt-key"></div></td>',
'</tr>',
'<tr class="edit">',
'<td colspan="2"><div id="fms-chb-annotation-bar"></div></td>',
'</tr>',
'<tr class="ui-rtl">',
'<td colspan="2"><div id="fms-chb-rtl-ui" style="display: inline-block;"></div><span class="beta-hint">Beta</span></td>',
'</tr>',
@ -361,7 +364,7 @@ define([
'<div><div id="fms-cmb-theme"></div>',
'<div id="fms-chb-dark-mode"></div></div></td>',
'</tr>',
'<tr class="edit">',
'<tr class="edit-pdf">',
'<td><label><%= scope.strUnit %></label></td>',
'<td><span id="fms-cmb-unit"></span></td>',
'</tr>',
@ -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 || {}));

View File

@ -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",