Fix Bug 42160
This commit is contained in:
parent
f97967a60c
commit
bf92472a4a
|
@ -44,7 +44,7 @@
|
||||||
newDocumentPage.focus();
|
newDocumentPage.focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
, dialogPrint: function(url) {
|
, dialogPrint: function(url, api) {
|
||||||
$('#id-print-frame').remove();
|
$('#id-print-frame').remove();
|
||||||
|
|
||||||
if ( !!url ) {
|
if ( !!url ) {
|
||||||
|
@ -59,10 +59,14 @@
|
||||||
document.body.appendChild(iframePrint);
|
document.body.appendChild(iframePrint);
|
||||||
|
|
||||||
iframePrint.onload = function () {
|
iframePrint.onload = function () {
|
||||||
|
try {
|
||||||
iframePrint.contentWindow.focus();
|
iframePrint.contentWindow.focus();
|
||||||
iframePrint.contentWindow.print();
|
iframePrint.contentWindow.print();
|
||||||
iframePrint.contentWindow.blur();
|
iframePrint.contentWindow.blur();
|
||||||
window.focus();
|
window.focus();
|
||||||
|
} catch (e) {
|
||||||
|
api.asc_DownloadAs(Asc.c_oAscFileType.PDF);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
iframePrint.src = url;
|
iframePrint.src = url;
|
||||||
|
|
|
@ -208,7 +208,7 @@ DE.ApplicationController = new(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPrintUrl(url) {
|
function onPrintUrl(url) {
|
||||||
common.utils.dialogPrint(url);
|
common.utils.dialogPrint(url, api);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidePreloader() {
|
function hidePreloader() {
|
||||||
|
|
|
@ -2090,10 +2090,14 @@ define([
|
||||||
this.iframePrint.style.bottom = "0";
|
this.iframePrint.style.bottom = "0";
|
||||||
document.body.appendChild(this.iframePrint);
|
document.body.appendChild(this.iframePrint);
|
||||||
this.iframePrint.onload = function() {
|
this.iframePrint.onload = function() {
|
||||||
|
try {
|
||||||
me.iframePrint.contentWindow.focus();
|
me.iframePrint.contentWindow.focus();
|
||||||
me.iframePrint.contentWindow.print();
|
me.iframePrint.contentWindow.print();
|
||||||
me.iframePrint.contentWindow.blur();
|
me.iframePrint.contentWindow.blur();
|
||||||
window.focus();
|
window.focus();
|
||||||
|
} catch (e) {
|
||||||
|
me.api.asc_DownloadAs(Asc.c_oAscFileType.PDF);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (url) this.iframePrint.src = url;
|
if (url) this.iframePrint.src = url;
|
||||||
|
|
|
@ -205,7 +205,7 @@ PE.ApplicationController = new(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPrintUrl(url) {
|
function onPrintUrl(url) {
|
||||||
common.utils.dialogPrint(url);
|
common.utils.dialogPrint(url, api);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidePreloader() {
|
function hidePreloader() {
|
||||||
|
|
|
@ -1778,10 +1778,14 @@ define([
|
||||||
this.iframePrint.style.bottom = "0";
|
this.iframePrint.style.bottom = "0";
|
||||||
document.body.appendChild(this.iframePrint);
|
document.body.appendChild(this.iframePrint);
|
||||||
this.iframePrint.onload = function() {
|
this.iframePrint.onload = function() {
|
||||||
|
try {
|
||||||
me.iframePrint.contentWindow.focus();
|
me.iframePrint.contentWindow.focus();
|
||||||
me.iframePrint.contentWindow.print();
|
me.iframePrint.contentWindow.print();
|
||||||
me.iframePrint.contentWindow.blur();
|
me.iframePrint.contentWindow.blur();
|
||||||
window.focus();
|
window.focus();
|
||||||
|
} catch (e) {
|
||||||
|
me.api.asc_DownloadAs(Asc.c_oAscFileType.PDF);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (url) this.iframePrint.src = url;
|
if (url) this.iframePrint.src = url;
|
||||||
|
|
|
@ -160,7 +160,7 @@ SSE.ApplicationController = new(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPrintUrl(url) {
|
function onPrintUrl(url) {
|
||||||
common.utils.dialogPrint(url);
|
common.utils.dialogPrint(url, api);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidePreloader() {
|
function hidePreloader() {
|
||||||
|
|
|
@ -2015,10 +2015,14 @@ define([
|
||||||
this.iframePrint.style.bottom = "0";
|
this.iframePrint.style.bottom = "0";
|
||||||
document.body.appendChild(this.iframePrint);
|
document.body.appendChild(this.iframePrint);
|
||||||
this.iframePrint.onload = function() {
|
this.iframePrint.onload = function() {
|
||||||
|
try {
|
||||||
me.iframePrint.contentWindow.focus();
|
me.iframePrint.contentWindow.focus();
|
||||||
me.iframePrint.contentWindow.print();
|
me.iframePrint.contentWindow.print();
|
||||||
me.iframePrint.contentWindow.blur();
|
me.iframePrint.contentWindow.blur();
|
||||||
window.focus();
|
window.focus();
|
||||||
|
} catch (e) {
|
||||||
|
me.api.asc_DownloadAs(Asc.c_oAscFileType.PDF, false, me.getApplication().getController('Print').getPrintParams());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (url) this.iframePrint.src = url;
|
if (url) this.iframePrint.src = url;
|
||||||
|
|
|
@ -349,6 +349,10 @@ define([
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getPrintParams: function() {
|
||||||
|
return this.adjPrintParams;
|
||||||
|
},
|
||||||
|
|
||||||
warnCheckMargings: 'Margins are incorrect',
|
warnCheckMargings: 'Margins are incorrect',
|
||||||
strAllSheets: 'All Sheets',
|
strAllSheets: 'All Sheets',
|
||||||
textWarning: 'Warning',
|
textWarning: 'Warning',
|
||||||
|
|
Loading…
Reference in a new issue