* support to fixed table header and footer for datatable views.

This commit is contained in:
Catouse
2016-12-21 11:11:19 +08:00
parent e4dcd54151
commit 5c25329222
2 changed files with 12 additions and 5 deletions
+1
View File
@@ -58,6 +58,7 @@ $(document).ready(function()
if(!this.multiKey && !$(e.target).closest('td[data-index="0"]').length) return false;
}
},
fixedHeader: true,
ready: function()
{
if(!this.$table) return;
+11 -5
View File
@@ -1434,12 +1434,18 @@ function checkOnlybodyPage()
*/
function fixedTfootAction(formID)
{
if($(formID).size() == 0) return false;
if($(formID).find('table:last').find('tfoot').size() == 0) return false;
var $form = $(formID);
if(!$form.length) return false;
var $table = $form.find('table:last');
var $tfoot = $table.find('tfoot');
if($table.hasClass('table-datatable'))
{
$table = $form.find('.datatable-rows');
$tfoot = $form.find('.datatable-footer tfoot');
}
if(!$tfoot.length) return false;
var $table = $(formID).find('table:last'),
$tfoot = $table.find('tfoot'),
$tbody = $table.find('tbody'),
var $tbody = $table.find('tbody'),
$inputGroup = $tfoot.find('.table-actions').children('.input-group'),
pageFooterHeight = $('#footer').height(),
tableWidth,