Changeset 5342 in subversion
- Timestamp:
- Oct 18, 2011 8:53:59 AM (19 months ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 3 edited
-
program/include/main.inc (modified) (4 diffs)
-
program/js/app.js (modified) (3 diffs)
-
skins/default/mail.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/main.inc
r5297 r5342 773 773 */ 774 774 function rcube_table_output($attrib, $table_data, $a_show_cols, $id_col) 775 {775 { 776 776 global $RCMAIL; 777 777 778 778 $table = new html_table(/*array('cols' => count($a_show_cols))*/); 779 779 780 780 // add table header 781 781 if (!$attrib['noheader']) 782 782 foreach ($a_show_cols as $col) 783 783 $table->add_header($col, Q(rcube_label($col))); 784 784 785 785 $c = 0; 786 if (!is_array($table_data)) 786 if (!is_array($table_data)) 787 787 { 788 788 $db = $RCMAIL->get_dbh(); 789 789 while ($table_data && ($sql_arr = $db->fetch_assoc($table_data))) 790 790 { 791 $zebra_class = $c % 2 ? 'even' : 'odd'; 792 $table->add_row(array('id' => 'rcmrow' . html_identifier($sql_arr[$id_col]), 'class' => $zebra_class)); 791 $table->add_row(array('id' => 'rcmrow' . html_identifier($sql_arr[$id_col]))); 793 792 794 793 // format each col 795 794 foreach ($a_show_cols as $col) 796 795 $table->add($col, Q($sql_arr[$col])); 797 796 798 797 $c++; 799 798 } 800 799 } 801 else 802 { 800 else { 803 801 foreach ($table_data as $row_data) 804 802 { 805 $zebra_class = $c % 2 ? 'even' : 'odd'; 806 if (!empty($row_data['class'])) 807 $zebra_class .= ' '.$row_data['class']; 808 809 $table->add_row(array('id' => 'rcmrow' . html_identifier($row_data[$id_col]), 'class' => $zebra_class)); 803 $class = !empty($row_data['class']) ? $row_data['class'] : ''; 804 805 $table->add_row(array('id' => 'rcmrow' . html_identifier($row_data[$id_col]), 'class' => $class)); 810 806 811 807 // format each col 812 808 foreach ($a_show_cols as $col) 813 809 $table->add($col, Q(is_array($row_data[$col]) ? $row_data[$col][0] : $row_data[$col])); 814 810 815 811 $c++; 816 812 } … … 818 814 819 815 return $table->show($attrib); 820 }816 } 821 817 822 818 … … 1315 1311 $out = ''; 1316 1312 foreach ($arrFolders as $key => $folder) { 1317 $zebra_class = (($nestLevel+1)*$idx) % 2 == 0 ? 'even' : 'odd';1318 1313 $title = null; 1319 1314 … … 1350 1345 else 1351 1346 $classes[] = '_'.asciiwords($folder_class ? $folder_class : strtolower($folder['id']), true); 1352 1353 $classes[] = $zebra_class;1354 1347 1355 1348 if ($folder['id'] == $mbox_name) -
trunk/roundcubemail/program/js/app.js
r5328 r5342 1687 1687 message = this.env.messages[uid], 1688 1688 css_class = 'message' 1689 + (even ? ' even' : ' odd')1690 1689 + (!flags.seen ? ' unread' : '') 1691 1690 + (flags.deleted ? ' deleted' : '') … … 4120 4119 return false; 4121 4120 4122 var tbody = this.gui_objects.contactslist.tBodies[0], 4123 rowcount = tbody.rows.length, 4124 even = rowcount%2, 4121 var c, tbody = this.gui_objects.contactslist.tBodies[0], 4125 4122 row = document.createElement('tr'); 4126 4123 4127 4124 row.id = 'rcmrow'+String(cid).replace(this.identifier_expr, '_'); 4128 row.className = 'contact '+(even ? 'even' : 'odd');4125 row.className = 'contact'; 4129 4126 4130 4127 if (this.contact_list.in_selection(cid)) … … 4132 4129 4133 4130 // add each submitted col 4134 for ( varc in cols) {4131 for (c in cols) { 4135 4132 col = document.createElement('td'); 4136 4133 col.className = String(c).toLowerCase(); -
trunk/roundcubemail/skins/default/mail.css
r5209 r5342 911 911 } 912 912 913 /*914 #messagelist tr.odd915 {916 background-color: #F9F9F9;917 }918 */919 920 913 #messagelist tr.unread 921 914 {
Note: See TracChangeset
for help on using the changeset viewer.
