mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:38:53 +00:00
[ticket/11957] Do not add empty headers to responsive tables
PHPBB3-11957
This commit is contained in:
parent
e9c0c9d5d2
commit
00734741af
1 changed files with 5 additions and 2 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Reference in a new issue