Bug 12135: Fix suggestions table width

The trick to update the suggestions table width is outdated since jQuery
UI has been updated.

Test plan:
0/ Don't apply this patch
1/ Go on the suggestions page (suggestion/suggestion.pl), change tabs:
the table width is wrong
2/ Apply this patch
4/ Repeat 1 and confirm the width is now updated.

Signed-off-by: Christopher Brannon <cbrannon@cdalibary.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
The table sizes still vary slightly, but this is an improvement.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

(cherry picked from commit 55a9ed6ac3)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This commit is contained in:
Jonathan Druart 2015-04-27 16:55:32 +02:00 committed by Chris Cormack
parent bcf93e6883
commit 5353219f33
1 changed files with 2 additions and 5 deletions

View File

@ -47,11 +47,8 @@ $(document).ready(function() {
$('#suggestiontabs').tabs({
// Correct table sizing for tables hidden in tabs
// http://www.datatables.net/examples/api/tabs_and_scrolling.html
"show": function(event, ui) {
var oTable = $('div.dataTables_wrapper>table', ui.panel).dataTable();
if ( oTable.length > 0 ) {
oTable.fnAdjustColumnSizing();
}
"activate": function(event, ui) {
$( $.fn.dataTable.tables( true ) ).DataTable().columns.adjust();
}
});
$(".sorted").dataTable($.extend(true, {}, dataTablesDefaults, {