v5.0-git
--------
+[mms] Add message information to preview screen (DIMP).
[mms] Add Alt + PGUP/PGDN shortcut to scroll through preview message (DIMP).
[jan] Show possible event conflicts in iTip viewer (Request #3991, Gonçalo
Queirós <goncalo.queiros@portugalmail.net>).
$('msgAtc').hide();
}
+ // Add message information
+ if (r.log) {
+ $('msgInfo').show();
+ $('infolist_col').show();
+ $('infolist_exp').hide();
+
+ tmp = '';
+ r.log.each(function(entry) {
+ tmp += '<tr><td>' + entry + '</td></tr>';
+ });
+ $('infolist').down('TABLE').update(tmp);
+ } else {
+ $('msgInfo').hide();
+ }
+
$('msgBody').update(r.msgtext);
this.loadingImg('msg', false);
$('previewInfo').hide();
$('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);
}
/**
- * Retrieve any history for the given Message-ID and display via the
- * Horde notification system.
+ * Retrieve any history for the given Message-ID and (optionally) display
+ * via the Horde notification system.
*
* @param string $msg_id The Message-ID of the message.
*/
static public function displayLog($msg_id)
{
+ foreach (self::parseLog($msg_id) as $entry) {
+ $GLOBALS['notification']->push($entry['msg'], 'imp.' . $entry['action']);
+ }
+ }
+
+ /**
+ * TODO
+ */
+ static public function parseLog($msg_id)
+ {
try {
- $msg_history = self::getLog($msg_id);
+ if (!$msg_history = self::getLog($msg_id)) {
+ return array();
+ }
} catch (Horde_Exception $e) {
- return;
+ return array();
}
- if (!$msg_history) {
- return;
- }
+ $df = $GLOBALS['prefs']->getValue('date_format');
+ $tf = $GLOBALS['prefs']->getValue('time_format');
+ $ret = array();
foreach ($msg_history->getData() as $entry) {
$msg = null;
+
if (isset($entry['desc'])) {
$msg = $entry['desc'];
} else {
break;
}
}
+
if ($msg) {
- $GLOBALS['notification']->push(htmlspecialchars(@sprintf($msg, strftime($GLOBALS['prefs']->getValue('date_format') . ' ' . $GLOBALS['prefs']->getValue('time_format'), $entry['ts']))), 'imp.' . $entry['action']);
+ $ret[] = array(
+ 'action' => $entry['action'],
+ 'msg' => @sprintf($msg, strftime($df . ' ' . $tf, $entry['ts']))
+ );
}
}
+
+ return $ret;
}
/**
}
}
- /* Get minidate. */
if ($preview) {
+ /* Get minidate. */
$imp_mailbox_ui = new IMP_UI_Mailbox();
$minidate = $imp_mailbox_ui->getDate($envelope['date']);
if (empty($minidate)) {
$minidate = _("Unknown Date");
}
$result['minidate'] = htmlspecialchars($minidate);
- }
- /* Display the user-specified headers for the current identity. */
- if (!$preview) {
+ /* Grab maillog information. */
+ if (!empty($GLOBALS['conf']['maillog']['use_maillog'])) {
+ foreach (IMP_Maillog::parseLog($envelope['message-id']) as $val) {
+ $result['log'][] = htmlspecialchars($val['msg']);
+ }
+ }
+ } else {
+ /* Display the user-specified headers for the current identity. */
$user_hdrs = $imp_ui->getUserHeaders();
foreach ($user_hdrs as $user_hdr) {
$user_val = $mime_headers->getValue($user_hdr);
</div>
</td>
</tr>
+ <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">
+ <table cellspacing="2"></table>
+ </div>
+ </td>
+ </tr>
</thead>
</table>
</div>
#msgAtc td {
padding-bottom: 0;
}
-.atcLabel {
+.atcLabel, .infoLabel {
font-weight: bold;
padding-right: 5px;
}
width: 0;
margin-right: 0;
}
-#th_expand span.iconImg, #partlist_col {
+#th_expand span.iconImg, #partlist_col, #infolist_col {
background-image: url("graphics/arrow_collapsed.png");
}
-#th_collapse span.iconImg, #partlist_exp {
+#th_collapse span.iconImg, #partlist_exp, #infolist_exp {
background-image: url("graphics/arrow_expanded.png");
}
#msg_view_source span.iconImg {
background-image: url("graphics/search.png");
}
-#th_expand span.iconImg, #partlist_col {
+#th_expand span.iconImg, #partlist_col, #infolist_col {
background-image: url("graphics/arrow_collapsed.png");
}
-#th_collapse span.iconImg, #partlist_exp {
+#th_collapse span.iconImg, #partlist_exp, #infolist_exp {
background-image: url("graphics/arrow_expanded.png");
}
#msg_view_source span.iconImg {