From 517dae3e74e39aceabaf2c5da330849a21e82d81 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Fri, 3 May 2013 11:38:52 +0200 Subject: 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 --- program/steps/mail/func.inc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'program/steps/mail/func.inc') 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(); } -- cgit v1.2.3