summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-10-18 12:53:59 +0000
committeralecpl <alec@alec.pl>2011-10-18 12:53:59 +0000
commit57863c1a4dba6188d8d9db3057df3787aed681f5 (patch)
treeb845da9960e135df11eb782a3774ef430fd6fe2a /program
parentdfc79b341c4ae80fe3bae0c52cadee7c28a108fd (diff)
- Removed zebra-class
Diffstat (limited to 'program')
-rw-r--r--program/include/main.inc31
-rw-r--r--program/js/app.js9
2 files changed, 15 insertions, 25 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index c7a6e7bca..3980794eb 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -772,52 +772,48 @@ function strip_newlines($str)
* @return string HTML table code
*/
function rcube_table_output($attrib, $table_data, $a_show_cols, $id_col)
- {
+{
global $RCMAIL;
-
+
$table = new html_table(/*array('cols' => count($a_show_cols))*/);
-
+
// add table header
if (!$attrib['noheader'])
foreach ($a_show_cols as $col)
$table->add_header($col, Q(rcube_label($col)));
-
+
$c = 0;
- if (!is_array($table_data))
+ if (!is_array($table_data))
{
$db = $RCMAIL->get_dbh();
while ($table_data && ($sql_arr = $db->fetch_assoc($table_data)))
{
- $zebra_class = $c % 2 ? 'even' : 'odd';
- $table->add_row(array('id' => 'rcmrow' . html_identifier($sql_arr[$id_col]), 'class' => $zebra_class));
+ $table->add_row(array('id' => 'rcmrow' . html_identifier($sql_arr[$id_col])));
// format each col
foreach ($a_show_cols as $col)
$table->add($col, Q($sql_arr[$col]));
-
+
$c++;
}
}
- else
- {
+ else {
foreach ($table_data as $row_data)
{
- $zebra_class = $c % 2 ? 'even' : 'odd';
- if (!empty($row_data['class']))
- $zebra_class .= ' '.$row_data['class'];
+ $class = !empty($row_data['class']) ? $row_data['class'] : '';
- $table->add_row(array('id' => 'rcmrow' . html_identifier($row_data[$id_col]), 'class' => $zebra_class));
+ $table->add_row(array('id' => 'rcmrow' . html_identifier($row_data[$id_col]), 'class' => $class));
// format each col
foreach ($a_show_cols as $col)
$table->add($col, Q(is_array($row_data[$col]) ? $row_data[$col][0] : $row_data[$col]));
-
+
$c++;
}
}
return $table->show($attrib);
- }
+}
/**
@@ -1314,7 +1310,6 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $at
$idx = 0;
$out = '';
foreach ($arrFolders as $key => $folder) {
- $zebra_class = (($nestLevel+1)*$idx) % 2 == 0 ? 'even' : 'odd';
$title = null;
if (($folder_class = rcmail_folder_classname($folder['id'])) && !$realnames) {
@@ -1350,8 +1345,6 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $at
else
$classes[] = '_'.asciiwords($folder_class ? $folder_class : strtolower($folder['id']), true);
- $classes[] = $zebra_class;
-
if ($folder['id'] == $mbox_name)
$classes[] = 'selected';
diff --git a/program/js/app.js b/program/js/app.js
index 86575b040..9a1853fdb 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1686,7 +1686,6 @@ function rcube_webmail()
even = rowcount%2,
message = this.env.messages[uid],
css_class = 'message'
- + (even ? ' even' : ' odd')
+ (!flags.seen ? ' unread' : '')
+ (flags.deleted ? ' deleted' : '')
+ (flags.flagged ? ' flagged' : '')
@@ -4119,19 +4118,17 @@ function rcube_webmail()
if (!this.gui_objects.contactslist || !this.gui_objects.contactslist.tBodies[0])
return false;
- var tbody = this.gui_objects.contactslist.tBodies[0],
- rowcount = tbody.rows.length,
- even = rowcount%2,
+ var c, tbody = this.gui_objects.contactslist.tBodies[0],
row = document.createElement('tr');
row.id = 'rcmrow'+String(cid).replace(this.identifier_expr, '_');
- row.className = 'contact '+(even ? 'even' : 'odd');
+ row.className = 'contact';
if (this.contact_list.in_selection(cid))
row.className += ' selected';
// add each submitted col
- for (var c in cols) {
+ for (c in cols) {
col = document.createElement('td');
col.className = String(c).toLowerCase();
col.innerHTML = cols[c];