changeset 2:0cac1d1e799f

weld in some support for Dates column
author Charlie Root
date Tue, 16 Jan 2018 17:54:18 -0500
parents 6c5d8a539d98
children bb8aca0e35ee
files program/js/app.js program/steps/mail/func.inc
diffstat 2 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/program/js/app.js	Tue Jan 16 17:49:55 2018 -0500
+++ b/program/js/app.js	Tue Jan 16 17:54:18 2018 -0500
@@ -221,7 +221,7 @@
         if (this.gui_objects.messagelist) {
           this.env.widescreen_list_template = [
             {className: 'threads', cells: ['threads']},
-            {className: 'subject', cells: ['fromto', 'date', 'status', 'subject']},
+            {className: 'subject', cells: ['fromto', 'date', 'status', 'subject','dates']},
             {className: 'flags', cells: ['flag', 'attachment']}
           ];
 
--- a/program/steps/mail/func.inc	Tue Jan 16 17:49:55 2018 -0500
+++ b/program/steps/mail/func.inc	Tue Jan 16 17:54:18 2018 -0500
@@ -393,6 +393,7 @@
  */
 function rcmail_js_message_list($a_headers, $insert_top=false, $a_show_cols=null)
 {
+  // Will _not_ have been sorted if sort_col is a flag param, e.g. dates
     global $RCMAIL, $OUTPUT;
 
     if (empty($a_show_cols)) {
@@ -448,7 +449,7 @@
 
     $a_show_cols = $plugin['cols'];
     $a_headers   = $plugin['messages'];
-
+    #rcube::write_log('thunderbird_labels','plugh: '.print_r($a_headers,true));
     if ($RCMAIL->config->get('layout', 'widescreen') == 'widescreen') {
         if (!$RCMAIL->storage->get_threading()) {
             if (($idx = array_search('threads', $a_show_cols)) !== false) {
@@ -591,8 +592,9 @@
     if ($disabled_sort)
         $a_sort_cols = $sort_col && !$disabled_order ? array($sort_col) : array();
     else
-        $a_sort_cols = array('subject', 'date', 'from', 'to', 'fromto', 'size', 'cc');
-
+      $a_sort_cols = array('subject', 'date', 'from', 'to', 'fromto', 'size', 'cc','dates');
+    
+    #rcube::write_log('mail','asc: '.print_r($a_sort_cols,true));
     if (!empty($attrib['optionsmenuicon'])) {
         $list_menu = rcmail_options_menu_link($attrib);
     }