diff --git a/apps/documenteditor/embed/js/ApplicationController.js b/apps/documenteditor/embed/js/ApplicationController.js index 7a551c55d..07d2debb1 100644 --- a/apps/documenteditor/embed/js/ApplicationController.js +++ b/apps/documenteditor/embed/js/ApplicationController.js @@ -204,7 +204,7 @@ DE.ApplicationController = new(function(){ function onPrint() { if ( permissions.print!==false ) - api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } function onPrintUrl(url) { @@ -259,7 +259,7 @@ DE.ApplicationController = new(function(){ common.utils.openLink(embedConfig.saveUrl); } else if (api && permissions.print!==false){ - api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } Common.Analytics.trackEvent('Save'); diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 921b52e72..e30618447 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -237,7 +237,7 @@ define([ if ( isopts ) close_menu = false; else this.clickSaveCopyAsFormat(undefined); break; - case 'print': this.api.asc_Print(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)); break; case 'exit': Common.NotificationCenter.trigger('goback'); break; case 'edit': this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index ba5ab5465..3a2efd1c6 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -2073,7 +2073,7 @@ define([ if (!this.appOptions.canPrint || this.isModalShowed) return; if (this.api) - this.api.asc_Print(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)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event Common.component.Analytics.trackEvent('Print'); }, diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index f32b7224a..38d4f5857 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -966,7 +966,7 @@ define([ onPrint: function(e) { if (this.api) - this.api.asc_Print(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)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event Common.NotificationCenter.trigger('edit:complete', this.toolbar); diff --git a/apps/presentationeditor/embed/js/ApplicationController.js b/apps/presentationeditor/embed/js/ApplicationController.js index 5229c9ae4..a425b3840 100644 --- a/apps/presentationeditor/embed/js/ApplicationController.js +++ b/apps/presentationeditor/embed/js/ApplicationController.js @@ -201,7 +201,7 @@ PE.ApplicationController = new(function(){ function onPrint() { if (permissions.print!==false) - api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } function onPrintUrl(url) { @@ -267,7 +267,7 @@ PE.ApplicationController = new(function(){ common.utils.openLink(embedConfig.saveUrl); } else if (api && permissions.print!==false){ - api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } Common.Analytics.trackEvent('Save'); diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index 943cfb61a..c206574d2 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -215,7 +215,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(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)); break; case 'exit': Common.NotificationCenter.trigger('goback'); break; case 'edit': this.getApplication().getController('Statusbar').setStatusCaption(this.requestEditRightsText); diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index c88587ea9..888098165 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -1758,7 +1758,7 @@ define([ if (!this.appOptions.canPrint || this.isModalShowed) return; if (this.api) - this.api.asc_Print(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)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event Common.component.Analytics.trackEvent('Print'); }, diff --git a/apps/presentationeditor/main/app/controller/Toolbar.js b/apps/presentationeditor/main/app/controller/Toolbar.js index c1712c590..4d32a2ae5 100644 --- a/apps/presentationeditor/main/app/controller/Toolbar.js +++ b/apps/presentationeditor/main/app/controller/Toolbar.js @@ -893,7 +893,7 @@ define([ onPrint: function(e) { if (this.api) - this.api.asc_Print(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)); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event Common.NotificationCenter.trigger('edit:complete', this.toolbar); diff --git a/apps/spreadsheeteditor/embed/js/ApplicationController.js b/apps/spreadsheeteditor/embed/js/ApplicationController.js index 4586f1580..9dafa9ae0 100644 --- a/apps/spreadsheeteditor/embed/js/ApplicationController.js +++ b/apps/spreadsheeteditor/embed/js/ApplicationController.js @@ -156,7 +156,7 @@ SSE.ApplicationController = new(function(){ function onPrint() { if ( permissions.print!==false ) - api.asc_Print(undefined, $.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } function onPrintUrl(url) { @@ -204,7 +204,7 @@ SSE.ApplicationController = new(function(){ common.utils.openLink(embedConfig.saveUrl); } else if (permissions.print!==false){ - api.asc_Print(undefined, $.browser.chrome || $.browser.safari || $.browser.opera); + api.asc_Print(new Asc.asc_CDownloadOptions(null, $.browser.chrome || $.browser.safari || $.browser.opera)); } Common.Analytics.trackEvent('Save'); diff --git a/apps/spreadsheeteditor/main/app/controller/Print.js b/apps/spreadsheeteditor/main/app/controller/Print.js index d2899e595..4ffddea96 100644 --- a/apps/spreadsheeteditor/main/app/controller/Print.js +++ b/apps/spreadsheeteditor/main/app/controller/Print.js @@ -266,9 +266,11 @@ define([ this.adjPrintParams.asc_setIgnorePrintArea(this.printSettingsDlg.getIgnorePrintArea()); Common.localStorage.setItem("sse-print-settings-range", printtype); - if ( this.printSettingsDlg.type=='print' ) - this.api.asc_Print(this.adjPrintParams, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); - else { + if ( this.printSettingsDlg.type=='print' ) { + var opts = new Asc.asc_CDownloadOptions(null, Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); + opts.asc_setAdjustPrint(this.adjPrintParams); + this.api.asc_Print(opts); + } else { var opts = new Asc.asc_CDownloadOptions(this.downloadFormat, this.asUrl); opts.asc_setAdjustPrint(this.adjPrintParams); this.api.asc_DownloadAs(opts);