From b6956046249bf685786c89d529b66493385504a7 Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 17 Mar 2010 11:18:11 +0000 Subject: - allow setting row css class in rcube_table_output() --- program/include/main.inc | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3