mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 20:08:55 +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),
|
var cell = $(this),
|
||||||
colspan = parseInt(cell.attr('colspan')),
|
colspan = parseInt(cell.attr('colspan')),
|
||||||
dfn = cell.attr('data-dfn'),
|
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;
|
colspan = isNaN(colspan) || colspan < 1 ? 1 : colspan;
|
||||||
|
|
||||||
for (i=0; i<colspan; i++) {
|
for (i=0; i<colspan; i++) {
|
||||||
|
@ -116,8 +117,10 @@ function parse_document(container)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((text.length && text !== '-') || cell.children().length) {
|
if ((text.length && text !== '-') || cell.children().length) {
|
||||||
|
if (headers[column] != '') {
|
||||||
cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
|
cell.prepend('<dfn style="display: none;">' + headers[column] + '</dfn>');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
cell.addClass('empty');
|
cell.addClass('empty');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue