Actions
Bug #7504
closedInfo blocks do not work inside a table
Start date:
05/02/2017
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4
Affected Architecture:
All
Description
While attempting to make some collapsible info blocks in the certificates list, I found that the click event to show/hide info blocks doesn't work in that context.
Steve B is investigating, so far it looks like it isn't working inside a table.
Updated by Jim Pingle over 7 years ago
- Status changed from Assigned to Feedback
- % Done changed from 0 to 100
Applied in changeset 666be0be1b9d7caa92571c8ef781b73c095101a8.
Updated by James Snell over 7 years ago
Tested 2.4.0.b.20170502.2240 from:
- Microsoft Edge 38.14393.1066.0
- Internet Explorer 11.1066.14393.0
Info block in the certificates list is expanding and collapsing as expected.
Test passed, thanks!
Updated by NOYB NOYB about 7 years ago
Fix with conditional instead of removing. - /usr/local/www/js/pfSenseHelpers.js
-// Put a dummy row into any empty table to keep IE happy -// Commented out due to https://redmine.pfsense.org/issues/7504 -//$('tbody').each(function(){ -// $(this).html($.trim($(this).html())) -//}); +// IE overflows table when tbody is empty/whitespace. +// Put a dummy row into any empty/whitespace tbody to prevent empty table scroll bars. +$('tbody').each(function(){ + if ($(this).html().trim().length == 0) { + var colCount = 0; + + // Get the number of table columns. + $(this).parent().find('tr:first').children().each(function() { + if ($(this).attr('colspan')) { + colCount += +$(this).attr('colspan'); + } else { + colCount++; + } + }); -$('tbody:empty').html("<tr><td></td></tr>"); + // Insert the dummy row, spanning all the table columns. + $(this).html('<tr><td colspan='+colCount+'></td></tr>'); + } +});
Actions