// opts = index, mailbox
updateMsgInfo: function(log, opts)
{
- var tmp = '';
+ var tmp;
if (!opts ||
(this.pp.imapuid == opts.index &&
$('infolist_exp').hide();
}
- log.each(function(entry) {
- tmp += '<li><span class="iconImg imp-' + entry.t + '"></span>' + entry.m + '</li>';
- });
-
- $('infolist').down('UL').update(tmp);
+ DimpCore.updateInfoList(log);
}
if (opts) {
$('qsearch_input').focus();
break;
- case 'infolist_toggle':
- $('infolist_col', 'infolist_exp').invoke('toggle');
- Effect.toggle('infolist', 'blind', {
- duration: 0.2,
- queue: {
- position: 'end',
- scope: 'infolist',
- limit: 2
- }
- });
- break;
-
default:
if (elt.hasClassName('RBFolderOk')) {
this.cfolderaction(e);
return elt;
},
+ /* Add message info to message view. */
+ updateInfoList: function(log)
+ {
+ var tmp = '';
+ log.each(function(entry) {
+ tmp += '<li><span class="iconImg imp-' + entry.t + '"></span>' + entry.m + '</li>';
+ });
+ $('infolist').down('UL').update(tmp);
+ },
+
/* Removes event handlers from address links. */
removeAddressLinks: function(id)
{
});
break;
+ case 'infolist_toggle':
+ $('infolist_col', 'infolist_exp').invoke('toggle');
+ Effect.toggle('infolist', 'blind', {
+ duration: 0.2,
+ queue: {
+ position: 'end',
+ scope: 'infolist',
+ limit: 2
+ }
+ });
+ break;
+
case 'msg_print':
window.print();
break;
elt.replace(DimpCore.buildAddressLinks(this[a], elt.cloneNode(false)));
}
}, this);
+
+ /* Add message information. */
+ if (this.log) {
+ $('msgInfo').show();
+ DimpCore.updateInfoList(this.log);
+ }
}
};
* 'from' - The From addresses
* 'folder' - The IMAP folder
* 'index' - The IMAP UID
+ * 'log' - Log information
* 'msgtext' - The text of the message
* 'to' - The To addresses
*
* 'fulldate' - The fully formatted date
* 'js' - Javascript code to run on display (only if the previewview
* hook is active)
- * 'log' - Log information
* 'minidate' - A miniature date
*
* FOR NON-PREVIEW MODE:
}
}
+ /* Grab maillog information. */
+ if (!empty($GLOBALS['conf']['maillog']['use_maillog'])) {
+ foreach (IMP_Maillog::parseLog($envelope['message-id']) as $val) {
+ $result['log'][] = array_map('htmlspecialchars', array(
+ 'm' => $val['msg'],
+ 't' => $val['action']
+ ));
+ }
+ }
+
if ($preview) {
/* Get minidate. */
$imp_mailbox_ui = new IMP_UI_Mailbox();
$minidate = _("Unknown Date");
}
$result['minidate'] = htmlspecialchars($minidate);
-
- /* Grab maillog information. */
- if (!empty($GLOBALS['conf']['maillog']['use_maillog'])) {
- foreach (IMP_Maillog::parseLog($envelope['message-id']) as $val) {
- $result['log'][] = array_map('htmlspecialchars', array(
- 'm' => $val['msg'],
- 't' => $val['action']
- ));
- }
- }
} else {
/* Display the user-specified headers for the current identity. */
$user_hdrs = $imp_ui->getUserHeaders();
array_unshift($part_info, 'id');
}
- /* Retrieve any history information for this message. */
- if (!$preview && !empty($GLOBALS['conf']['maillog']['use_maillog'])) {
- IMP_Maillog::displayLog($mime_headers->getValue('message-id'));
- }
-
/* Do MDN processing now. */
if ($imp_ui->MDNCheck($folder, $index, $mime_headers)) {
$result['msgtext'] .= $imp_ui->formatStatusMsg(array('text' => array(_("The sender of this message is requesting a Message Disposition Notification from you when you have read this message."), sprintf(_("Click %s to send the notification message."), Horde::link('', '', '', '', 'DimpCore.doAction(\'SendMDN\',{folder:\'' . $folder . '\',index:' . $index . '}); return false;', '', '') . _("HERE") . '</a>'))));
'DIMP.conf.msg_folder = "' . $show_msg_result['folder'] . '"'
);
-foreach (array('from', 'to', 'cc', 'bcc', 'replyTo') as $val) {
+foreach (array('from', 'to', 'cc', 'bcc', 'replyTo', 'log') as $val) {
if (!empty($show_msg_result[$val])) {
$js_out[] = 'DimpFullmessage.' . $val . ' = ' . Horde_Serialize::serialize($show_msg_result[$val], Horde_Serialize::JSON);
}
</td>
</tr>
<?php endif; ?>
+ <tr id="msgInfo" style="display:none">
+ <td class="label"><a id="infolist_toggle"><span class="iconImg" id="infolist_col"></span><span class="iconImg" id="infolist_exp" style="display:none"></span></a></td>
+ <td>
+ <div><span class="infoLabel"><?php echo _("Message Information") ?></span></div>
+ <div id="infolist" style="display:none">
+ <ul></ul>
+ </div>
+ </td>
+ </tr>
</thead>
</table>
</div>