summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/js/app.js2
-rw-r--r--program/js/list.js6
-rw-r--r--program/lib/Roundcube/html.php15
-rw-r--r--program/steps/mail/func.inc4
4 files changed, 18 insertions, 9 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 1f6582bf6..9d08a3f75 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -6712,7 +6712,7 @@ function rcube_webmail()
tr = document.createElement('tr');
for (c=0, len=repl.length; c < len; c++) {
- cell = document.createElement('td');
+ cell = document.createElement('th');
cell.innerHTML = repl[c].html || '';
if (repl[c].id) cell.id = repl[c].id;
if (repl[c].className) cell.className = repl[c].className;
diff --git a/program/js/list.js b/program/js/list.js
index 837a8459d..cf6c3f011 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -199,7 +199,7 @@ init_header: function()
if (this.fixed_header) { // copy (modified) fixed header back to the actual table
$(this.list.tHead).replaceWith($(this.fixed_header).find('thead').clone());
- $(this.list.tHead).find('tr td').attr('style', '').find('a').attr('tabindex', '-1'); // remove fixed widths
+ $(this.list.tHead).find('th,td').attr('style', '').find('a').attr('tabindex', '-1'); // remove fixed widths
}
else if (!bw.touch && this.list.className.indexOf('fixedheader') >= 0) {
this.init_fixed_header();
@@ -855,9 +855,9 @@ get_prev_row: function()
get_first_row: function()
{
if (this.rowcount) {
- var i, len, uid, rows = this.tbody.childNodes;
+ var i, uid, rows = this.tbody.childNodes;
- for (i=0, len=rows.length-1; i<len; i++)
+ for (i=0; i<rows.length; i++)
if (rows[i].id && (uid = this.get_row_uid(rows[i])))
return uid;
}
diff --git a/program/lib/Roundcube/html.php b/program/lib/Roundcube/html.php
index 5e07a7806..de03265c1 100644
--- a/program/lib/Roundcube/html.php
+++ b/program/lib/Roundcube/html.php
@@ -837,7 +837,7 @@ class html_table extends html
if (!empty($this->header)) {
$rowcontent = '';
foreach ($this->header as $c => $col) {
- $rowcontent .= self::tag($this->_col_tagname(), $col->attrib, $col->content);
+ $rowcontent .= self::tag($this->_head_tagname(), $col->attrib, $col->content);
}
$thead = $this->tagname == 'table' ? self::tag('thead', null, self::tag('tr', null, $rowcontent, parent::$common_attrib)) :
self::tag($this->_row_tagname(), array('class' => 'thead'), $rowcontent, parent::$common_attrib);
@@ -890,7 +890,16 @@ class html_table extends html
private function _row_tagname()
{
static $row_tagnames = array('table' => 'tr', 'ul' => 'li', '*' => 'div');
- return $row_tagnames[$this->tagname] ? $row_tagnames[$this->tagname] : $row_tagnames['*'];
+ return $row_tagnames[$this->tagname] ?: $row_tagnames['*'];
+ }
+
+ /**
+ * Getter for the corresponding tag name for table row elements
+ */
+ private function _head_tagname()
+ {
+ static $head_tagnames = array('table' => 'th', '*' => 'span');
+ return $head_tagnames[$this->tagname] ?: $head_tagnames['*'];
}
/**
@@ -899,7 +908,7 @@ class html_table extends html
private function _col_tagname()
{
static $col_tagnames = array('table' => 'td', '*' => 'span');
- return $col_tagnames[$this->tagname] ? $col_tagnames[$this->tagname] : $col_tagnames['*'];
+ return $col_tagnames[$this->tagname] ?: $col_tagnames['*'];
}
}
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index cbfb1200b..436475f64 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -509,8 +509,8 @@ function rcmail_message_list_head($attrib, $a_show_cols)
$a_sort_cols = array('subject', 'date', 'from', 'to', 'fromto', 'size', 'cc');
if (!empty($attrib['optionsmenuicon'])) {
- $onclick = 'return ' . rcmail_output::JS_OBJECT_NAME . ".command('menu-open', 'messagelistmenu', null, event)";
- $inner = 'v';
+ $onclick = 'return ' . rcmail_output::JS_OBJECT_NAME . ".command('menu-open', 'messagelistmenu', this, event)";
+ $inner = $RCMAIL->gettext('listoptions');
if (is_string($attrib['optionsmenuicon']) && $attrib['optionsmenuicon'] != 'true') {
$inner = html::img(array('src' => $skin_path . $attrib['optionsmenuicon'], 'alt' => $RCMAIL->gettext('listoptions')));
}