This commit is contained in:
daitingting
2018-04-10 15:15:34 +08:00
parent 97c7d8c3e7
commit c5d7faf8ac
2 changed files with 1 additions and 17 deletions
+1 -1
View File
@@ -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>