mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Fix mail display print with IE load issue
This commit is contained in:
parent
e611eed179
commit
f64e44ffad
@ -185,11 +185,19 @@ app.classes.mail = AppJS.extend(
|
||||
// copies iframe content to a DIV, as iframe causes
|
||||
// trouble for multipage printing
|
||||
|
||||
jQuery('iframe#mail-display_mailDisplayBodySrc').one('load', function(e)
|
||||
jQuery('iframe#mail-display_mailDisplayBodySrc').on('load', function(e)
|
||||
{
|
||||
// encrypt body if mailvelope is available
|
||||
self.mailvelopeAvailable(self.mailvelopeDisplay);
|
||||
self.mail_prepare_print();
|
||||
|
||||
// Trigger print command if the mail oppend for printing porpuse
|
||||
// load event fires twice in IE and the first time the content is not ready
|
||||
// Check if the iframe content is loaded then trigger the print command
|
||||
if (window.location.search.search('&print=') >= 0 && jQuery(this.contentWindow.document.body).children().length >0 )
|
||||
{
|
||||
self.mail_print();
|
||||
}
|
||||
});
|
||||
|
||||
this.mail_isMainWindow = false;
|
||||
@ -794,14 +802,6 @@ app.classes.mail = AppJS.extend(
|
||||
var toolbaractions = ((typeof dataElem != 'undefined' && typeof dataElem.data != 'undefined' && typeof dataElem.data.displayToolbaractions != 'undefined')?JSON.parse(dataElem.data.displayToolbaractions):undefined);
|
||||
if (toolbaractions) this.et2.getWidgetById('displayToolbar').set_actions(toolbaractions);
|
||||
}
|
||||
|
||||
// Trigger print command if the mail oppend for printing porpuse
|
||||
if (window.location.search.search('&print=') >= 0)
|
||||
{
|
||||
var that = this;
|
||||
jQuery('iFrame#mail-display_mailDisplayBodySrc').one('load',function(){that.mail_print();});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user