summaryrefslogtreecommitdiff
path: root/program/steps/mail/func.inc
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-05-03 11:38:52 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-05-03 11:38:52 +0200
commit517dae3e74e39aceabaf2c5da330849a21e82d81 (patch)
tree6fe7a07764fb7523bc0bd01551f59d159e0e5d5d /program/steps/mail/func.inc
parentb92ec5c86d2f85c43705ada6fbcb8912f48907f0 (diff)
Experimental: refactored list.js and html_table class to render lists with different html structures (e.g. table, ul, div). This show provide more flexibility to skin designers and improve mobile device support
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r--program/steps/mail/func.inc16
1 files changed, 7 insertions, 9 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index f00813ea2..37f37d08f 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -236,15 +236,13 @@ function rcmail_message_list($attrib)
$OUTPUT->include_script('list.js');
- $thead = '';
- foreach (rcmail_message_list_head($attrib, $a_show_cols) as $cell)
- $thead .= html::tag('td', array('class' => $cell['className'], 'id' => $cell['id']), $cell['html']);
-
- return html::tag('table',
- $attrib,
- html::tag('thead', null, html::tag('tr', null, $thead)) .
- html::tag('tbody', null, ''),
- array('style', 'class', 'id', 'cellpadding', 'cellspacing', 'border', 'summary'));
+ $table = new html_table($attrib);
+ if (!$attrib['noheader']) {
+ foreach (rcmail_message_list_head($attrib, $a_show_cols) as $cell)
+ $table->add_header(array('class' => $cell['className'], 'id' => $cell['id']), $cell['html']);
+ }
+
+ return $table->show();
}