mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
Bugfix tablesorter, if a table is empty jquery not works anymore
This commit is contained in:
@@ -69,12 +69,17 @@ if($jqueryV1 && $jqueryCurrent)
|
||||
<script language="Javascript" type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#<?php echo $tableid; ?>").tablesorter(
|
||||
//
|
||||
if(!$('#<?php echo $tableid; ?>').find('tbody:empty').length
|
||||
&& !$('#<?php echo $tableid; ?>').find('tr:empty').length)
|
||||
{
|
||||
sortList: [[<?php echo $sortList; ?>]],
|
||||
widgets: ["<?php echo $widgets; ?>"],
|
||||
headers: {<?php echo $headers; ?>}
|
||||
});
|
||||
$("#<?php echo $tableid; ?>").tablesorter(
|
||||
{
|
||||
sortList: [[<?php echo $sortList; ?>]],
|
||||
widgets: ["<?php echo $widgets; ?>"],
|
||||
headers: {<?php echo $headers; ?>}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php endif ?>
|
||||
@@ -108,4 +113,5 @@ if($jqueryV1 && $jqueryCurrent)
|
||||
<?php if($widgetsCSS) : ?>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo base_url('skin/widgets.css'); ?>" />
|
||||
<?php endif ?>
|
||||
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user