From 6c0b1fde43a79d2c31b3f1fc94868e67936280ea Mon Sep 17 00:00:00 2001
From: cmcnulty <cmcnulty@kznf.com>
Date: Wed, 06 Nov 2013 23:04:09 -0500
Subject: [PATCH] Move focus column to the left-most side

---
 skins/larry/templates/mail.html       |    1 -
 program/steps/mail/func.inc           |   11 +++++++++--
 program/localization/en_US/labels.inc |    1 -
 config/defaults.inc.php               |    2 +-
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/config/defaults.inc.php b/config/defaults.inc.php
index b430e1d..ab0e188 100644
--- a/config/defaults.inc.php
+++ b/config/defaults.inc.php
@@ -496,7 +496,7 @@
 
 // These cols are shown in the message list. Available cols are:
 // subject, from, to, fromto, cc, replyto, date, size, status, flag, attachment, 'priority'
-$config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment', 'focus');
+$config['list_cols'] = array('subject', 'status', 'fromto', 'date', 'size', 'flag', 'attachment');
 
 // the default locale setting (leave empty for auto-detection)
 // RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index 8084365..8f221a3 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -53,7 +53,6 @@
 $labels['priority'] = 'Priority';
 $labels['organization'] = 'Organization';
 $labels['readstatus'] = 'Read status';
-$labels['focus'] = 'Focus';
 $labels['listoptions'] = 'List options...';
 
 $labels['mailboxlist'] = 'Folders';
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 0019d79..4cc5787 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -255,11 +255,15 @@
 
   // save some variables for use in ajax list
   $_SESSION['list_attrib'] = $attrib;
+  
   // make sure 'threads' and 'subject' columns are present
   if (!in_array('subject', $a_show_cols))
     array_unshift($a_show_cols, 'subject');
   if (!in_array('threads', $a_show_cols))
     array_unshift($a_show_cols, 'threads');
+
+  // always put focus first
+  array_unshift($a_show_cols, 'focus');  
 
   $_SESSION['skin_path'] = $CONFIG['skin_path'];
 
@@ -303,13 +307,16 @@
   }
 
   $mbox = $RCMAIL->storage->get_folder();
-
+  
   // make sure 'threads' and 'subject' columns are present
   if (!in_array('subject', $a_show_cols))
     array_unshift($a_show_cols, 'subject');
   if (!in_array('threads', $a_show_cols))
     array_unshift($a_show_cols, 'threads');
-	
+
+  // always put focus first
+  array_unshift($a_show_cols, 'focus');  
+    
   $_SESSION['list_attrib']['columns'] = $a_show_cols;
 
   // Make sure there are no duplicated columns (#1486999)
diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html
index 640c739..f60fe2a 100644
--- a/skins/larry/templates/mail.html
+++ b/skins/larry/templates/mail.html
@@ -192,7 +192,6 @@
 			<li><label><input type="checkbox" name="list_col[]" value="attachment" /> <span><roundcube:label name="attachment" /></span></label></li>
 			<li><label><input type="checkbox" name="list_col[]" value="flag" /> <span><roundcube:label name="flag" /></span></label></li>
 			<li><label><input type="checkbox" name="list_col[]" value="priority" /> <span><roundcube:label name="priority" /></span></label></li>
-			<li><label><input type="checkbox" name="list_col[]" value="focus" /> <span><roundcube:label name="focus" /></span></label></li>		
 		</ul>
 	</fieldset>
 	<roundcube:endif />

--
Gitblit v1.9.1