Prepare message list to display IMAP folder

pull/193/head
Thomas 11 years ago
parent d016dcc6f6
commit f540f86d19

@ -5998,8 +5998,10 @@ function rcube_webmail()
if ((n = $.inArray('status', this.env.coltypes)) >= 0)
this.env.status_col = n;
if (list)
if (list) {
list.hide_column('folder', !(this.env.search_request || this.env.search_id));
list.init_header();
}
};
// replace content of row count display

@ -372,6 +372,20 @@ blur: function()
},
/**
* Set/unset the given column as hidden
*/
hide_column: function(col, hide)
{
var method = hide ? 'addClass' : 'removeClass';
if (this.fixed_header)
$(this.row_tagname()+' '+this.col_tagname()+'.'+col, this.fixed_header)[method]('hidden');
$(this.row_tagname()+' '+this.col_tagname()+'.'+col, this.list)[method]('hidden');
},
/**
* onmousedown-handler of message list column
*/

@ -1076,6 +1076,7 @@ class rcube_imap extends rcube_storage
}
foreach ($headers as $h) {
$h->folder = $folder;
$a_msg_headers[$h->uid] = $h;
}

@ -166,6 +166,13 @@ class rcube_message_header
*/
public $mdn_to;
/**
* IMAP folder this message is stored in
*
* @var string
*/
public $folder;
/**
* Other message headers
*
@ -189,6 +196,8 @@ class rcube_message_header
'reply-to' => 'replyto',
'cc' => 'cc',
'bcc' => 'bcc',
'mbox' => 'folder',
'folder' => 'folder',
'content-transfer-encoding' => 'encoding',
'in-reply-to' => 'in_reply_to',
'content-type' => 'ctype',

@ -363,6 +363,8 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
$cont = show_bytes($header->$col);
else if ($col == 'date')
$cont = format_date($header->date);
else if ($col == 'folder')
$cont = Q(rcube_charset::convert($header->folder, 'UTF7-IMAP'));
else
$cont = Q($header->$col);
@ -386,7 +388,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $a_show_cols=null
$a_msg_flags['prio'] = (int) $header->priority;
$a_msg_flags['ctype'] = Q($header->ctype);
$a_msg_flags['mbox'] = $mbox;
$a_msg_flags['mbox'] = $header->folder;
// merge with plugin result (Deprecated, use $header->flags)
if (!empty($header->list_flags) && is_array($header->list_flags))

@ -521,6 +521,14 @@ table.messagelist.fixedcopy {
width: 135px;
}
.messagelist tr td.folder {
width: 135px;
}
.messagelist tr td.hidden {
display: none;
}
.messagelist tr.message {
/* background-color: #fff; */
}

Loading…
Cancel
Save