1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-31 03:29:23 +02:00

[ticket/11957] Do not add empty headers to responsive tables

PHPBB3-11957
This commit is contained in:
Vjacheslav Trushkin 2013-10-26 21:08:24 +03:00
parent e9c0c9d5d2
commit 00734741af

View File

@ -71,8 +71,9 @@ function parse_document(container)
var cell = $(this),
colspan = parseInt(cell.attr('colspan')),
dfn = cell.attr('data-dfn'),
text = dfn ? dfn : cell.text();
text = dfn ? dfn : cell.text().trim();
if (text == ' ') text = '';
colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
for (i=0; i<colspan; i++) {
@ -116,7 +117,9 @@ function parse_document(container)
}
if ((text.length && text !== '-') || cell.children().length) {
cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
if (headers[column] != '') {
cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
}
}
else {
cell.addClass('empty');