mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
fix selector for Mailvelope iframe under Firefox
This commit is contained in:
parent
6ac985bb88
commit
2699dddc4e
@ -184,7 +184,7 @@ app.classes.mail = AppJS.extend(
|
||||
// Prepare display dialog for printing
|
||||
// copies iframe content to a DIV, as iframe causes
|
||||
// trouble for multipage printing
|
||||
|
||||
|
||||
jQuery('iframe#mail-display_mailDisplayBodySrc').one('load', function(e)
|
||||
{
|
||||
// encrypt body if mailvelope is available
|
||||
@ -194,7 +194,7 @@ app.classes.mail = AppJS.extend(
|
||||
|
||||
this.mail_isMainWindow = false;
|
||||
this.mail_display();
|
||||
|
||||
|
||||
// Register attachments for drag
|
||||
this.register_for_drag(
|
||||
this.et2.getArrayMgr("content").getEntry('mail_id'),
|
||||
@ -883,7 +883,7 @@ app.classes.mail = AppJS.extend(
|
||||
|
||||
// show iframe, in case we hide it from mailvelopes one and remove that
|
||||
jQuery(IframeHandle.getDOMNode()).show()
|
||||
.next('iframe[src^=chrome-extension]').remove();
|
||||
.next(this.mailvelope_iframe_selector).remove();
|
||||
|
||||
// Set up additional content that can be expanded.
|
||||
// We add a new URL widget for each address, so they get all the UI
|
||||
@ -4534,7 +4534,7 @@ app.classes.mail = AppJS.extend(
|
||||
{
|
||||
self.et2.getWidgetById('mimeType').set_readonly(false);
|
||||
self.et2.getWidgetById('mail_plaintext').set_disabled(false);
|
||||
jQuery('iframe[src^=chrome-extension]').remove();
|
||||
jQuery(self.mailvelope_iframe_selector).remove();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -881,6 +881,11 @@ var AppJS = Class.extend(
|
||||
*/
|
||||
mailvelope_keyring: undefined,
|
||||
|
||||
/**
|
||||
* jQuery selector for Mailvelope iframes in all browsers
|
||||
*/
|
||||
mailvelope_iframe_selector: 'iframe[src^="chrome-extension"],iframe[src^="about:blank?mvelo"]',
|
||||
|
||||
/**
|
||||
* Open (or create) "egroupware" keyring and call callback with it
|
||||
*
|
||||
@ -908,6 +913,8 @@ var AppJS = Class.extend(
|
||||
mailvelope.createKeyring('egroupware').then(function(_keyring)
|
||||
{
|
||||
self.mailvelope_keyring = _keyring;
|
||||
var mvelo_settings_selector = self.mailvelope_iframe_selector
|
||||
.split(',').map(function(_val){return 'body>'+_val;}).join(',');
|
||||
|
||||
mailvelope.createSettingsContainer('body', _keyring, {
|
||||
email: self.egw.user('account_email'),
|
||||
@ -915,7 +922,7 @@ var AppJS = Class.extend(
|
||||
}).then(function()
|
||||
{
|
||||
// make only Mailvelope settings dialog visible
|
||||
jQuery('body > iframe[src^=chrome]').css({position: 'absolute', top: 0});
|
||||
jQuery(mvelo_settings_selector).css({position: 'absolute', top: 0});
|
||||
// add a close button, so we know when to offer storing public key to AB
|
||||
jQuery('<button class="et2_button et2_button_text" id="mailvelope_close_settings">'+self.egw.lang('Close')+'</button>')
|
||||
.css({position: 'absolute', top: 8, right: 8})
|
||||
@ -925,7 +932,7 @@ var AppJS = Class.extend(
|
||||
self.mailvelope_keyring.exportOwnPublicKey(self.egw.user('account_email')).then(function(_pubKey)
|
||||
{
|
||||
// if yes, hide settings dialog
|
||||
jQuery('body > iframe[src^=chrome]').remove();
|
||||
jQuery(mvelo_settings_selector).remove();
|
||||
jQuery('button#mailvelope_close_settings').remove();
|
||||
// offer user to store his public key to AB for other users to find
|
||||
var buttons = [
|
||||
|
Loading…
Reference in New Issue
Block a user