[PDF] Add customize quick access in advanced settings

This commit is contained in:
Julia.Svinareva
2024-06-17 16:44:16 +03:00
parent 641a5799df
commit 6b50f87bba
2 changed files with 41 additions and 2 deletions

View File

@ -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([
'<label class="comment-text"><%= scope.txtQuickPrintTip %></label></span></div>',
'</td>',
'</tr>',*/
'<tr class="edit quick-access">',
'<td colspan="2"><button type="button" class="btn btn-text-default" id="fms-btn-customize-quick-access" style="width:auto;display:inline-block;padding-right:10px;padding-left:10px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.txtCustomizeQuickAccess %></button></div></td>',
'</tr>',
'<tr class="themes">',
'<td><label><%= scope.strTheme %></label></td>',
'<td>',
@ -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 || {}));

View File

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