* Fix bug #1510.
This commit is contained in:
@@ -82,7 +82,7 @@ function initTableHeader()
|
||||
var $panel = $(this);
|
||||
var $table = $panel.find('.table:first');
|
||||
|
||||
if(!$table.length || !$table.children('thead').length) return;
|
||||
if(!$table.length || !$table.children('thead').length || ($panel.find('#assigntomeBlock').length && $panel.find('#assigntomeBlock > div').length > 1)) return;
|
||||
var isFixed = $panel.find('.panel-body').height() < $table.outerHeight();
|
||||
|
||||
$panel.toggleClass('with-fixed-header', isFixed);
|
||||
|
||||
@@ -17,19 +17,3 @@
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
adjustTable();
|
||||
$('#assigntomeBlock').resize(function(){adjustTable();});
|
||||
})
|
||||
|
||||
function adjustTable()
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#assigntomeBlock').closest('[id^="block"]').find('.table-header-fixed').remove();
|
||||
$('#assigntomeBlock').closest('[id^="block"]').find('#todo table thead').removeAttr('style');
|
||||
}, 400);
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user