Change usage of asc_Print
This commit is contained in:
parent
b0d6c172b9
commit
39bfe54860
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
},
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
},
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue