Alter flag text color based on background color in dimp
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 7 Oct 2009 09:11:15 +0000 (03:11 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 7 Oct 2009 18:30:35 +0000 (12:30 -0600)
imp/js/DimpBase.js
imp/templates/javascript_defs_dimp.php

index 55665c3..1220bc7 100644 (file)
@@ -477,7 +477,7 @@ var DimpBase = {
                                 /* Until text-overflow is supported on all
                                  * browsers, need to truncate label text
                                  * ourselves. */
-                                ptr.elt = '<span class="' + ptr.c + '" title="' + ptr.l + '" style="background:' + ptr.b + '">' + ptr.l.truncate(10) + '</span>';
+                                ptr.elt = '<span class="' + ptr.c + '" title="' + ptr.l + '" style="background:' + ptr.b + ';color:' + ptr.f + '">' + ptr.l.truncate(10) + '</span>';
                             }
                             row.subjectdata += ptr.elt;
                         } else {
index 8039004..9cdce88 100644 (file)
@@ -29,10 +29,11 @@ foreach ($dimp_block_list as $block) {
 
 /* Generate flag array. */
 $imp_flags = IMP_Imap_Flags::singleton();
-foreach ($imp_flags->getList() as $val) {
+foreach ($imp_flags->getList(array('fgcolor' => true)) as $val) {
     $flags[$val['flag']] = array_filter(array(
         'b' => isset($val['b']) ? $val['b'] : null,
         'c' => $val['c'],
+        'f' => $val['f'],
         'l' => $val['l'],
         'n' => isset($val['n']) ? $val['n'] : null,
         // Indicate if this is a user *P*ref flag