S/MIME:
- Preset smime_sign and smime_encrypt toolbar actions if the original mail is smime. - Fix smime alignment of smime icons in mail preview
@ -220,7 +220,7 @@ class mail_compose
|
||||
$actions = array_merge($actions, array(
|
||||
'smime_sign' => array (
|
||||
'caption' => 'SMIME Sign',
|
||||
'icon' => 'smimeSignature',
|
||||
'icon' => 'smime_sign',
|
||||
'group' => ++$group,
|
||||
'onExecute' => 'javaScript:app.mail.compose_setToggle',
|
||||
'checkbox' => true,
|
||||
@ -228,7 +228,7 @@ class mail_compose
|
||||
),
|
||||
'smime_encrypt' => array (
|
||||
'caption' => 'SMIME Encryption',
|
||||
'icon' => 'smimeEncryption',
|
||||
'icon' => 'smime_encrypt',
|
||||
'group' => ++$group,
|
||||
'onExecute' => 'javaScript:app.mail.compose_setToggle',
|
||||
'checkbox' => true,
|
||||
@ -324,6 +324,13 @@ class mail_compose
|
||||
// Additionally may be changed
|
||||
$_focusElement, $suppressSigOnTop, $isReply
|
||||
));
|
||||
if (isset($_GET['smime_type'])) $smime_type = $_GET['smime_type'];
|
||||
// pre set smime_sign and smime_encrypt actions if the original
|
||||
// message is smime.
|
||||
$_content['smime_sign'] = $smime_type == (Mail\Smime::TYPE_SIGN ||
|
||||
$smime_type == Mail\Smime::TYPE_SIGN_ENCRYPT) ? 'on' : 'off';
|
||||
$_content['smime_encrypt'] = ($smime_type == Mail\Smime::TYPE_ENCRYPT) ? 'on' : 'off';
|
||||
|
||||
$actionToProcess = $_GET['from'];
|
||||
unset($_GET['from']);
|
||||
unset($_GET['reply_id']);
|
||||
|
@ -1835,7 +1835,8 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
{
|
||||
if (Mail\Smime::isSmime($attch['mimeType']))
|
||||
{
|
||||
$data['smime'] = Mail\Smime::isSmimeSignatureOnly($attch['mimeType']) ? 'smimeSignature' : 'smimeEncryption';
|
||||
$data['smime'] = Mail\Smime::isSmimeSignatureOnly($attch['mimeType'])?
|
||||
Mail\Smime::TYPE_SIGN : Mail\Smime::TYPE_ENCRYPT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -227,9 +227,9 @@ app.classes.mail = AppJS.extend(
|
||||
// removed once the issue is solved.
|
||||
var password = this.et2.getWidgetById('password');
|
||||
if (password) password.set_value('');
|
||||
|
||||
if (this.et2.getWidgetById('composeToolbar')._actionManager.getActionById('pgp') &&
|
||||
this.et2.getWidgetById('composeToolbar')._actionManager.getActionById('pgp').checked ||
|
||||
var composeToolbar = this.et2.getWidgetById('composeToolbar');
|
||||
if (composeToolbar._actionManager.getActionById('pgp') &&
|
||||
composeToolbar._actionManager.getActionById('pgp').checked ||
|
||||
this.et2.getArrayMgr('content').data.mail_plaintext &&
|
||||
this.et2.getArrayMgr('content').data.mail_plaintext.indexOf(this.begin_pgp_message) != -1)
|
||||
{
|
||||
@ -313,6 +313,15 @@ app.classes.mail = AppJS.extend(
|
||||
{
|
||||
jQuery('input',to.node).focus();
|
||||
}
|
||||
var smime_sign = this.et2.getWidgetById('smime_sign');
|
||||
var smime_encrypt = this.et2.getWidgetById('smime_encrypt');
|
||||
|
||||
if (composeToolbar._actionManager.getActionById('smime_sign') &&
|
||||
composeToolbar._actionManager.getActionById('smime_encrypt'))
|
||||
{
|
||||
if (smime_sign.getValue() == 'on') composeToolbar.checkbox('smime_sign', true);
|
||||
if (smime_encrypt.getValue() == 'on') composeToolbar.checkbox('smime_encrypt', true);
|
||||
}
|
||||
break;
|
||||
case 'mail.subscribe':
|
||||
if (this.subscription_treeLastState != "")
|
||||
@ -594,7 +603,8 @@ app.classes.mail = AppJS.extend(
|
||||
|
||||
// We only handle one for everything but forward
|
||||
settings.id = (typeof _elems == 'undefined'?'':_elems[0].id);
|
||||
|
||||
var content = egw.dataGetUIDdata(settings.id);
|
||||
if (content) settings.smime_type = content.data['smime'];
|
||||
switch(_action.id)
|
||||
{
|
||||
case 'compose':
|
||||
@ -994,10 +1004,10 @@ app.classes.mail = AppJS.extend(
|
||||
switch (smime_widgets[i])
|
||||
{
|
||||
case 'smime_signature':
|
||||
widget.set_disabled(!(dataElem.data.smime == 'smimeSignature'));
|
||||
widget.set_disabled(!(dataElem.data.smime == 'smime_sign'));
|
||||
break;
|
||||
case 'smime_encryption':
|
||||
widget.set_disabled(!(dataElem.data.smime == 'smimeEncryption'));
|
||||
widget.set_disabled(!(dataElem.data.smime == 'smime_encrypt'));
|
||||
break;
|
||||
default:
|
||||
widget.set_disabled(true);
|
||||
|
@ -938,4 +938,4 @@ img.smime_cert_notvalid {
|
||||
img.smime_cert_unknownemail {
|
||||
background: #a28cff;
|
||||
}
|
||||
.smimeIcons {position: absolute;right: 0;}
|
||||
.smimeIcons {position: absolute;right: 10px;}
|
@ -47,8 +47,8 @@
|
||||
<description align="left" id="mail_displaysubject" no_lang="1" readonly="true"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<image id="smime_signature" src="smimeSignature" statustext="Smime signed message" disabled="true" align="right" width="24"/>
|
||||
<image id="smime_encryption" src="smimeEncryption" statustext="Smime encrypted message" disabled="true" align="right" width="24"/>
|
||||
<image id="smime_signature" src="smime_sign" statustext="Smime signed message" disabled="true" align="right" width="24"/>
|
||||
<image id="smime_encryption" src="smime_encrypt" statustext="Smime encrypted message" disabled="true" align="right" width="24"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
<vbox class="mailDisplay">
|
||||
|
@ -36,8 +36,8 @@
|
||||
<buttononly class="et2_button ui-button" label="Show all Addresses" image="foldertree_nolines_plus" onclick="app.mail.showAllHeader"/>
|
||||
</hbox>
|
||||
<hbox class="mailPreviewHeaders smimeIcons">
|
||||
<image id="smime_signature" src="smimeSignature" statustext="Smime signed message" disabled="true" align="right" width="24"/>
|
||||
<image id="smime_encryption" src="smimeEncryption" statustext="Smime encrypted message" disabled="true" align="right" width="24"/>
|
||||
<image id="smime_signature" src="smime_sign" statustext="Smime signed message" disabled="true" align="right" width="24"/>
|
||||
<image id="smime_encryption" src="smime_encrypt" statustext="Smime encrypted message" disabled="true" align="right" width="24"/>
|
||||
</hbox>
|
||||
<hbox id="mailPreviewHeadersAttachments" class="mailPreviewHeaders">
|
||||
<description value="Attachments"/>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<rows>
|
||||
<row class="dialogHeader">
|
||||
<description span="2" id="message"/>
|
||||
<image src="smimeSignature" class="@class"/>
|
||||
<image src="smime_sign" class="@class"/>
|
||||
</row>
|
||||
<row>
|
||||
<description id="message2"/>
|
||||
|
@ -927,7 +927,7 @@ img.smime_cert_unknownemail {
|
||||
}
|
||||
.smimeIcons {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
right: 10px;
|
||||
}
|
||||
#popupMainDiv {
|
||||
padding: 5px;
|
||||
|
@ -915,7 +915,7 @@ img.smime_cert_unknownemail {
|
||||
}
|
||||
.smimeIcons {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
right: 10px;
|
||||
}
|
||||
#popupMainDiv {
|
||||
padding: 5px;
|
||||
|
Before Width: | Height: | Size: 565 B After Width: | Height: | Size: 565 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |