- Add message content-type to the message flags in add_message_row(), can be used e.g. to set message row style/icon according to message type

release-0.6
alecpl 14 years ago
parent f1ad3650ed
commit 6b4929278b

@ -1565,6 +1565,7 @@ function rcube_webmail()
parent_uid: flags.parent_uid?flags.parent_uid:0, parent_uid: flags.parent_uid?flags.parent_uid:0,
selected: this.select_all_mode || this.message_list.in_selection(uid), selected: this.select_all_mode || this.message_list.in_selection(uid),
ml: flags.ml?1:0, ml: flags.ml?1:0,
ctype: flags.ctype,
// flags from plugins // flags from plugins
flags: flags.extra_flags flags: flags.extra_flags
}); });
@ -1658,7 +1659,10 @@ function rcube_webmail()
html = '<span id="flagicn'+uid+'" class="'+css_class+'">&nbsp;</span>'; html = '<span id="flagicn'+uid+'" class="'+css_class+'">&nbsp;</span>';
} }
else if (c == 'attachment') { else if (c == 'attachment') {
html = flags.attachment ? '<span class="attachment">&nbsp;</span>' : '&nbsp;'; if (/application\/|multipart\/m/.test(flags.ctype))
html = '<span class="attachment">&nbsp;</span>';
else
html = '&nbsp;';
} }
else if (c == 'threads') else if (c == 'threads')
html = expando; html = expando;

@ -318,8 +318,8 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
$a_msg_flags['flagged'] = 1; $a_msg_flags['flagged'] = 1;
if ($header->others['list-post']) if ($header->others['list-post'])
$a_msg_flags['ml'] = 1; $a_msg_flags['ml'] = 1;
if (preg_match("/(application\/|multipart\/m)/i", $header->ctype))
$a_msg_flags['attachment'] = 1; $a_msg_flags['ctype'] = Q($header->ctype);
$a_msg_flags['mbox'] = $mbox; $a_msg_flags['mbox'] = $mbox;
// merge with plugin result // merge with plugin result

Loading…
Cancel
Save