Mercurial > hg > rc2
comparison program/steps/mail/func.inc @ 2:0cac1d1e799f
weld in some support for Dates column
author | Charlie Root |
---|---|
date | Tue, 16 Jan 2018 17:54:18 -0500 |
parents | 4681f974d28b |
children | 3a5f959af5ae |
comparison
equal
deleted
inserted
replaced
1:6c5d8a539d98 | 2:0cac1d1e799f |
---|---|
391 /** | 391 /** |
392 * return javascript commands to add rows to the message list | 392 * return javascript commands to add rows to the message list |
393 */ | 393 */ |
394 function rcmail_js_message_list($a_headers, $insert_top=false, $a_show_cols=null) | 394 function rcmail_js_message_list($a_headers, $insert_top=false, $a_show_cols=null) |
395 { | 395 { |
396 // Will _not_ have been sorted if sort_col is a flag param, e.g. dates | |
396 global $RCMAIL, $OUTPUT; | 397 global $RCMAIL, $OUTPUT; |
397 | 398 |
398 if (empty($a_show_cols)) { | 399 if (empty($a_show_cols)) { |
399 if (!empty($_SESSION['list_attrib']['columns'])) | 400 if (!empty($_SESSION['list_attrib']['columns'])) |
400 $a_show_cols = $_SESSION['list_attrib']['columns']; | 401 $a_show_cols = $_SESSION['list_attrib']['columns']; |
446 $plugin = $RCMAIL->plugins->exec_hook('messages_list', | 447 $plugin = $RCMAIL->plugins->exec_hook('messages_list', |
447 array('messages' => $a_headers, 'cols' => $a_show_cols)); | 448 array('messages' => $a_headers, 'cols' => $a_show_cols)); |
448 | 449 |
449 $a_show_cols = $plugin['cols']; | 450 $a_show_cols = $plugin['cols']; |
450 $a_headers = $plugin['messages']; | 451 $a_headers = $plugin['messages']; |
451 | 452 #rcube::write_log('thunderbird_labels','plugh: '.print_r($a_headers,true)); |
452 if ($RCMAIL->config->get('layout', 'widescreen') == 'widescreen') { | 453 if ($RCMAIL->config->get('layout', 'widescreen') == 'widescreen') { |
453 if (!$RCMAIL->storage->get_threading()) { | 454 if (!$RCMAIL->storage->get_threading()) { |
454 if (($idx = array_search('threads', $a_show_cols)) !== false) { | 455 if (($idx = array_search('threads', $a_show_cols)) !== false) { |
455 unset($a_show_cols[$idx]); | 456 unset($a_show_cols[$idx]); |
456 } | 457 } |
589 | 590 |
590 // define sortable columns | 591 // define sortable columns |
591 if ($disabled_sort) | 592 if ($disabled_sort) |
592 $a_sort_cols = $sort_col && !$disabled_order ? array($sort_col) : array(); | 593 $a_sort_cols = $sort_col && !$disabled_order ? array($sort_col) : array(); |
593 else | 594 else |
594 $a_sort_cols = array('subject', 'date', 'from', 'to', 'fromto', 'size', 'cc'); | 595 $a_sort_cols = array('subject', 'date', 'from', 'to', 'fromto', 'size', 'cc','dates'); |
595 | 596 |
597 #rcube::write_log('mail','asc: '.print_r($a_sort_cols,true)); | |
596 if (!empty($attrib['optionsmenuicon'])) { | 598 if (!empty($attrib['optionsmenuicon'])) { |
597 $list_menu = rcmail_options_menu_link($attrib); | 599 $list_menu = rcmail_options_menu_link($attrib); |
598 } | 600 } |
599 | 601 |
600 $cells = $coltypes = array(); | 602 $cells = $coltypes = array(); |