提交 8d3ad862 编写于 作者: C Catouse

* fixed error: datatable footer empty sometimes.

上级 937062b8
......@@ -264,7 +264,7 @@
dataRowSpan = '<div class="datatable-rows-span datatable-span"><div class="datatable-wrapper"><table class="table"></table></div></div>',
dataHeadSpan = '<div class="datatable-head-span datatable-span"><div class="datatable-wrapper"><table class="table"><thead></thead></table></div></div>';
$datatable.empty();
$datatable.children('.datatable-head, .datatable-rows').remove();
// Set css class to datatable by options
$datatable.toggleClass('sortable', options.sortable);
......@@ -466,10 +466,15 @@
$datatable.append('<div class="scroll-wrapper"><div class="scroll-slide scroll-pos-' + options.scrollPos + '"><div class="bar"></div></div></div>');
}
var $oldFooter = $datatable.children('.datatable-footer');
if (data.footer)
{
$datatable.append($('<div class="datatable-footer"/>').append(data.footer));
}
else if($oldFooter.length)
{
$datatable.append($oldFooter);
}
that.$datatable = $datatable.data(name, that);
if (that.isTable && that.firstShow)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册