. Bootstrap 1, 2: .
, , , dataTable , ( ):
$(function() {
$('a[href="#tab2"]').live('click', function () {
var oTable = $('#dataTables4').dataTable();
oTable.fnDraw();
});
});
dataTable. , , :
$('#loadingT').show();
$('#dataTables4').dataTable({
"fnDrawCallback":function(){
$('#loadingT').hide();
$(".dataListT").fadeIn(2000);
},
"bPaginate": false,
"bScrollCollapse": true,
"sScrollY": "305px",
"aaSorting": [[ 2, "desc" ],[3, "desc"]],
"sDom": "<'row'<'span16'f>>t<'row'i<'span8'><'span8'>>",
"aoColumns": [
{ "bSortable": false },
null,
null,
null,
null,
{ "iDataSort": 6 },
{"bVisible": false},
{"bVisible": false},
null
],
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
var total = 0;
for ( var i=iStart ; i<iEnd ; i++ )
{
total += aaData[ aiDisplay[i] ][7]* 1;
}
var nCells = nRow.getElementsByTagName('th');
nCells[1].innerHTML = total;
$(nCells[1]).formatCurrency({negativeFormat:'%s-%n'});
}
}).rowGrouping({
iGroupingColumnIndex: 1,
sGroupingColumnSortDirection: "desc",
iGroupingOrderByColumnIndex: 2
});
, .