From 7a2bade211d2e8951dda2b88754a564670847b35 Mon Sep 17 00:00:00 2001 From: alecpl Date: Mon, 22 Aug 2011 15:44:07 +0000 Subject: - Added 'priority' column on messages list --- program/include/rcube_imap.php | 1 - program/include/rcube_imap_generic.php | 2 +- program/js/app.js | 6 ++++++ program/steps/mail/func.inc | 5 ++++- 4 files changed, 11 insertions(+), 3 deletions(-) (limited to 'program') diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 6a35af0a8..4a37af6e0 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -96,7 +96,6 @@ class rcube_imap 'MESSAGE-ID', 'CONTENT-TRANSFER-ENCODING', 'REFERENCES', - 'X-PRIORITY', 'X-DRAFT-INFO', 'MAIL-FOLLOWUP-TO', 'MAIL-REPLY-TO', diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index e3c987cd3..dd10033bc 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -1537,7 +1537,7 @@ class rcube_imap_generic if ($bodystr) $request .= "BODYSTRUCTURE "; $request .= "BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE "; - $request .= "CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO".$add.")])"; + $request .= "CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO X-PRIORITY".$add.")])"; if (!$this->putLine($request)) { $this->setError(self::ERROR_COMMAND, "Unable to send command: $request"); diff --git a/program/js/app.js b/program/js/app.js index bbb14e7ad..9da19b2bb 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1778,6 +1778,12 @@ function rcube_webmail() html = expando; else if (c == 'subject') html = tree + cols[c]; + else if (c == 'priority') { + if (flags.prio > 0 && flags.prio < 6) + html = ' '; + else + html = ' '; + } else html = cols[c]; diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index b04628fa4..50de7108d 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -253,7 +253,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null return; // remove 'threads', 'attachment', 'flag', 'status' columns, we don't need them here - foreach (array('threads', 'attachment', 'flag', 'status') as $col) { + foreach (array('threads', 'attachment', 'flag', 'status', 'priority') as $col) { if (($key = array_search($col, $a_show_cols)) !== FALSE) unset($a_show_cols[$key]); } @@ -309,6 +309,8 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null $a_msg_flags['flagged'] = 1; if ($header->others['list-post']) $a_msg_flags['ml'] = 1; + if ($header->priority) + $a_msg_flags['prio'] = (int) $header->priority; $a_msg_flags['ctype'] = Q($header->ctype); $a_msg_flags['mbox'] = $mbox; @@ -372,6 +374,7 @@ function rcmail_message_list_head($attrib, $a_show_cols) $col_name = ' '; break; case 'attachment': + case 'priority': case 'status': $col_name = ' '; break; -- cgit v1.2.3