mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 11:47:04 +08:00
[DE] Print preview refactoring
This commit is contained in:
@ -281,6 +281,7 @@ define([
|
||||
this.api.asc_drawPrintPreview(this._navigationPreview.currentPreviewPage);
|
||||
this.updateNavigationButtons(this._navigationPreview.currentPreviewPage, this._navigationPreview.pageCount);
|
||||
this.SetDisabled();
|
||||
this._isPreviewVisible = true;
|
||||
},
|
||||
|
||||
onPaperSizeSelect: function(combo, record) {
|
||||
@ -413,7 +414,7 @@ define([
|
||||
|
||||
onHidePrintMenu: function () {
|
||||
if (this._isPreviewVisible) {
|
||||
this.api.asc_closePrintPreview(this._isPrint);
|
||||
this.api.asc_closePrintPreview && this.api.asc_closePrintPreview(this._isPrint);
|
||||
this._isPreviewVisible = false;
|
||||
}
|
||||
},
|
||||
@ -500,12 +501,13 @@ define([
|
||||
this.isInputFirstChange = true;
|
||||
return;
|
||||
}
|
||||
|
||||
this._isPrint = print;
|
||||
|
||||
if ( print ) {
|
||||
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86);
|
||||
opts.asc_setAdvancedOptions(this.adjPrintParams);
|
||||
this.api.asc_Print(opts);
|
||||
this._isPrint = false;
|
||||
} else {
|
||||
var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF);
|
||||
opts.asc_setAdvancedOptions(this.adjPrintParams);
|
||||
@ -543,7 +545,6 @@ define([
|
||||
}
|
||||
},
|
||||
|
||||
textWarning: 'Warning',
|
||||
txtCustom: 'Custom',
|
||||
txtPrintRangeInvalid: 'Invalid print range',
|
||||
textMarginsLast: 'Last Custom'
|
||||
|
||||
@ -2654,7 +2654,6 @@ define([
|
||||
txtPage: 'Page',
|
||||
txtOf: 'of {0}',
|
||||
txtPageNumInvalid: 'Page number invalid',
|
||||
txtEmptyTable: 'There is nothing to print because the document is empty',
|
||||
txtPages: 'Pages',
|
||||
textMarginsLast: 'Last Custom',
|
||||
textMarginsNormal: 'Normal',
|
||||
|
||||
Reference in New Issue
Block a user