Merge pull request #821 from ONLYOFFICE/fix/print

Fix Bug 34613
This commit is contained in:
Julia Radzhabova 2021-04-20 18:50:38 +03:00 committed by GitHub
commit aacb8dcfab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 19 additions and 19 deletions

View file

@ -213,7 +213,7 @@ DE.ApplicationController = new(function(){
function onPrint() {
if ( permissions.print!==false )
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
}
function onPrintUrl(url) {
@ -277,7 +277,7 @@ DE.ApplicationController = new(function(){
common.utils.openLink(embedConfig.saveUrl);
} else
if (api && permissions.print!==false){
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
}
Common.Analytics.trackEvent('Save');
@ -285,7 +285,7 @@ DE.ApplicationController = new(function(){
DE.ApplicationView.tools.get('#idt-print')
.on('click', function(){
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
Common.Analytics.trackEvent('Print');
});

View file

@ -236,7 +236,7 @@ define([
if ( isopts ) close_menu = false;
else this.clickSaveCopyAsFormat(undefined);
break;
case 'print': this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); break;
case 'print': this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86)); break;
case 'exit': Common.NotificationCenter.trigger('goback'); break;
case 'edit':
this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText);

View file

@ -2278,7 +2278,7 @@ define([
if (!this.appOptions.canPrint || Common.Utils.ModalWindow.isVisible()) return;
if (this.api)
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
Common.component.Analytics.trackEvent('Print');
},

View file

@ -1055,7 +1055,7 @@ define([
onPrint: function(e) {
if (this.api)
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
Common.NotificationCenter.trigger('edit:complete', this.toolbar);

View file

@ -1857,7 +1857,7 @@ define([
if (this.api){
var printopt = new Asc.asc_CAdjustPrint();
printopt.asc_setPrintType(Asc.c_oAscPrintType.Selection);
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
opts.asc_setAdvancedOptions(printopt);
this.api.asc_Print(opts);
this.fireEvent('editcomplete', this);

View file

@ -210,7 +210,7 @@ PE.ApplicationController = new(function(){
function onPrint() {
if (permissions.print!==false)
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
}
function onPrintUrl(url) {
@ -285,7 +285,7 @@ PE.ApplicationController = new(function(){
common.utils.openLink(embedConfig.saveUrl);
} else
if (api && permissions.print!==false){
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
}
Common.Analytics.trackEvent('Save');
@ -293,7 +293,7 @@ PE.ApplicationController = new(function(){
PE.ApplicationView.tools.get('#idt-print')
.on('click', function(){
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
Common.Analytics.trackEvent('Print');
});

View file

@ -214,7 +214,7 @@ define([
case 'back': break;
case 'save': this.api.asc_Save(); break;
case 'save-desktop': this.api.asc_DownloadAs(); break;
case 'print': this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); break;
case 'print': this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86)); break;
case 'exit': Common.NotificationCenter.trigger('goback'); break;
case 'edit':
this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText);

View file

@ -1918,7 +1918,7 @@ define([
if (!this.appOptions.canPrint || Common.Utils.ModalWindow.isVisible()) return;
if (this.api)
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
Common.component.Analytics.trackEvent('Print');
},

View file

@ -953,7 +953,7 @@ define([
onPrint: function(e) {
if (this.api)
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
this.api.asc_Print(new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
Common.NotificationCenter.trigger('edit:complete', this.toolbar);

View file

@ -1856,7 +1856,7 @@ define([
if (me.api){
var printopt = new Asc.asc_CAdjustPrint();
printopt.asc_setPrintType(Asc.c_oAscPrintType.Selection);
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
opts.asc_setAdvancedOptions(printopt);
me.api.asc_Print(opts);
me.fireEvent('editcomplete', me);
@ -1962,7 +1962,7 @@ define([
if (me.api){
var printopt = new Asc.asc_CAdjustPrint();
printopt.asc_setPrintType(Asc.c_oAscPrintType.Selection);
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event
opts.asc_setAdvancedOptions(printopt);
me.api.asc_Print(opts);
me.fireEvent('editcomplete', me);

View file

@ -165,7 +165,7 @@ SSE.ApplicationController = new(function(){
function onPrint() {
if ( permissions.print!==false )
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
}
function onPrintUrl(url) {
@ -222,7 +222,7 @@ SSE.ApplicationController = new(function(){
common.utils.openLink(embedConfig.saveUrl);
} else
if (permissions.print!==false){
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
}
Common.Analytics.trackEvent('Save');
@ -230,7 +230,7 @@ SSE.ApplicationController = new(function(){
SSE.ApplicationView.tools.get('#idt-print')
.on('click', function(){
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera));
api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera || $.browser.mozilla && $.browser.versionNumber>86));
Common.Analytics.trackEvent('Print');
});

View file

@ -310,7 +310,7 @@ define([
Common.localStorage.setItem("sse-print-settings-range", printtype);
if ( this.printSettingsDlg.type=='print' ) {
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera);
var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera || Common.Utils.isGecko && Common.Utils.firefoxVersion>86);
opts.asc_setAdvancedOptions(this.adjPrintParams);
this.api.asc_Print(opts);
} else {