summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-03-17 11:18:11 +0000
committeralecpl <alec@alec.pl>2010-03-17 11:18:11 +0000
commitb6956046249bf685786c89d529b66493385504a7 (patch)
tree35616a233d4e8107cf8e15b1974ab12236a67315 /program
parentf209717e418cdf54511fab1a6d3a19b528d0c416 (diff)
- allow setting row css class in rcube_table_output()
Diffstat (limited to 'program')
-rw-r--r--program/include/main.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 94597d354..46f5a7072 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -216,6 +216,7 @@ function rcube_charset_convert($str, $from, $to=NULL)
$iconv_options = '';
}
}
+
// throw an exception if iconv reports an illegal character in input
// it means that input string has been truncated
set_error_handler('rcube_error_handler', E_NOTICE);
@@ -734,6 +735,9 @@ function rcube_table_output($attrib, $table_data, $a_show_cols, $id_col)
while ($table_data && ($sql_arr = $db->fetch_assoc($table_data)))
{
$zebra_class = $c % 2 ? 'even' : 'odd';
+ if (!empty($row_data['class']))
+ $zebra_class .= ' '.$row_data['class'];
+
$table->add_row(array('id' => 'rcmrow' . $sql_arr[$id_col], 'class' => $zebra_class));
// format each col
@@ -748,6 +752,9 @@ function rcube_table_output($attrib, $table_data, $a_show_cols, $id_col)
foreach ($table_data as $row_data)
{
$zebra_class = $c % 2 ? 'even' : 'odd';
+ if (!empty($row_data['class']))
+ $zebra_class .= ' '.$row_data['class'];
+
$table->add_row(array('id' => 'rcmrow' . $row_data[$id_col], 'class' => $zebra_class));
// format each col