Merge pull request #2448 from ONLYOFFICE/feature/Update-PrintSettings

[SSE] Update print settings
This commit is contained in:
maxkadushkin
2023-06-22 06:17:41 -04:00
committed by GitHub
5 changed files with 11 additions and 4 deletions

View File

@ -266,7 +266,9 @@ define([
case 'back': break;
case 'save': this.api.asc_Save(); break;
case 'save-desktop': this.api.asc_DownloadAs(); break;
case 'export-pdf': this.clickSaveAsFormat(menu, Asc.c_oAscFileType.PDF); break;
case 'export-pdf':
Common.NotificationCenter.trigger('export:to', this.leftMenu, Asc.c_oAscFileType.PDF);
break;
case 'print': Common.NotificationCenter.trigger('print', this.leftMenu); break;
case 'exit': Common.NotificationCenter.trigger('goback'); break;
case 'edit':

View File

@ -75,6 +75,7 @@ define([
});
Common.NotificationCenter.on('print', _.bind(this.openPrintSettings, this, 'print'));
Common.NotificationCenter.on('download:settings', _.bind(this.openPrintSettings, this, 'download'));
Common.NotificationCenter.on('export:to', _.bind(this.openPrintSettings, this, 'export'));
},
onLaunch: function() {

View File

@ -631,6 +631,6 @@ define([
btnHistoryCaption : 'Versions History',
btnExitCaption : 'Exit',
btnFileOpenCaption : 'Open...',
btnExportToPDFCaption : 'Export to PDF'
btnExportToPDFCaption : 'Export to PDF'
}, SSE.Views.FileMenu || {}));
});

View File

@ -56,6 +56,8 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
initialize : function(options) {
this.type = options.type || 'print';
var txtBtn = (this.type == 'print') ? this.btnPrint :
(this.type == 'export') ? this.btnExport : this.btnDownload;
_.extend(this.options, {
title: (this.type == 'print') ? this.textTitle : this.textTitlePDF,
template: [
@ -76,7 +78,7 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
'<div class="footer justify">',
'<button id="printadv-dlg-btn-hide" class="btn btn-text-default" style="min-width: 100px;width: auto;">' + this.textHideDetails + '</button>',
'<button class="btn normal dlg-btn float-right" result="cancel" style="width: 86px;">' + this.cancelButtonText + '</button>',
'<button class="btn normal dlg-btn primary float-right margin-left-10" result="ok" style="width: 150px;">' + ((this.type == 'print') ? this.btnPrint : this.btnDownload) + '</button>',
'<button class="btn normal dlg-btn primary float-right margin-left-10" result="ok" style="width: 150px;">' + txtBtn + '</button>',
'</div>'
].join('')
}, options);
@ -422,7 +424,8 @@ define([ 'text!spreadsheeteditor/main/app/template/PrintSettings.template',
textMarginsNormal: 'Normal',
textMarginsNarrow: 'Narrow',
textMarginsWide: 'Wide',
txtMarginsLast: 'Last Custom'
txtMarginsLast: 'Last Custom',
btnExport: 'Save & Export'
}, SSE.Views.PrintSettings || {}));
});

View File

@ -3196,6 +3196,7 @@
"SSE.Views.PivotTable.txtTable_PivotStyleMedium": "Pivot Table Style Medium",
"SSE.Views.PrintSettings.btnDownload": "Save & Download",
"SSE.Views.PrintSettings.btnPrint": "Save & Print",
"SSE.Views.PrintSettings.btnExport": "Save & Export",
"SSE.Views.PrintSettings.strBottom": "Bottom",
"SSE.Views.PrintSettings.strLandscape": "Landscape",
"SSE.Views.PrintSettings.strLeft": "Left",