[DE] Print preview refactoring
This commit is contained in:
parent
591cf88d5e
commit
d4aed51fdf
|
@ -281,6 +281,7 @@ define([
|
||||||
this.api.asc_drawPrintPreview(this._navigationPreview.currentPreviewPage);
|
this.api.asc_drawPrintPreview(this._navigationPreview.currentPreviewPage);
|
||||||
this.updateNavigationButtons(this._navigationPreview.currentPreviewPage, this._navigationPreview.pageCount);
|
this.updateNavigationButtons(this._navigationPreview.currentPreviewPage, this._navigationPreview.pageCount);
|
||||||
this.SetDisabled();
|
this.SetDisabled();
|
||||||
|
this._isPreviewVisible = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
onPaperSizeSelect: function(combo, record) {
|
onPaperSizeSelect: function(combo, record) {
|
||||||
|
@ -413,7 +414,7 @@ define([
|
||||||
|
|
||||||
onHidePrintMenu: function () {
|
onHidePrintMenu: function () {
|
||||||
if (this._isPreviewVisible) {
|
if (this._isPreviewVisible) {
|
||||||
this.api.asc_closePrintPreview(this._isPrint);
|
this.api.asc_closePrintPreview && this.api.asc_closePrintPreview(this._isPrint);
|
||||||
this._isPreviewVisible = false;
|
this._isPreviewVisible = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -500,12 +501,13 @@ define([
|
||||||
this.isInputFirstChange = true;
|
this.isInputFirstChange = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this._isPrint = print;
|
||||||
|
|
||||||
if ( print ) {
|
if ( print ) {
|
||||||
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86);
|
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);
|
opts.asc_setAdvancedOptions(this.adjPrintParams);
|
||||||
this.api.asc_Print(opts);
|
this.api.asc_Print(opts);
|
||||||
|
this._isPrint = false;
|
||||||
} else {
|
} else {
|
||||||
var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF);
|
var opts = new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PDF);
|
||||||
opts.asc_setAdvancedOptions(this.adjPrintParams);
|
opts.asc_setAdvancedOptions(this.adjPrintParams);
|
||||||
|
@ -543,7 +545,6 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
textWarning: 'Warning',
|
|
||||||
txtCustom: 'Custom',
|
txtCustom: 'Custom',
|
||||||
txtPrintRangeInvalid: 'Invalid print range',
|
txtPrintRangeInvalid: 'Invalid print range',
|
||||||
textMarginsLast: 'Last Custom'
|
textMarginsLast: 'Last Custom'
|
||||||
|
|
|
@ -2654,7 +2654,6 @@ define([
|
||||||
txtPage: 'Page',
|
txtPage: 'Page',
|
||||||
txtOf: 'of {0}',
|
txtOf: 'of {0}',
|
||||||
txtPageNumInvalid: 'Page number invalid',
|
txtPageNumInvalid: 'Page number invalid',
|
||||||
txtEmptyTable: 'There is nothing to print because the document is empty',
|
|
||||||
txtPages: 'Pages',
|
txtPages: 'Pages',
|
||||||
textMarginsLast: 'Last Custom',
|
textMarginsLast: 'Last Custom',
|
||||||
textMarginsNormal: 'Normal',
|
textMarginsNormal: 'Normal',
|
||||||
|
|
Loading…
Reference in a new issue