Datatable Bootstrap Numbers between previous and next not show

Datatable Bootstrap Numbers between previous and next not show

maaarkinmaaarkin Posts: 1Questions: 0Answers: 0
edited June 2013 in General
Hi, i'm using datatable with twitter bootstrap and my datatable works perfectly but only show the buttons previous and next, the numbers dont show, whats i need to do to show?

here is my code
[code]
$.extend( $.fn.dataTable.defaults, {
"sDom": "<'row'<'span6'f><'span6'l>r>t<'row'<'span8'p>>",
"sPaginationType": "bootstrap",
"bInfo": true,
"bLengthChange" : true,
"bProcessing" : true,
"bServerSide" : false,
"bPaginate" : true,
"iDisplayLength": 10,
} );

$.extend($.fn.dataTable.defaults.oLanguage, {

"sProcessing": "Processando...",
"sLengthMenu": "Mostrar _MENU_ registros",
"sZeroRecords": "Não foram encontrados resultados",
"sInfo": "Mostrando de _START_ até _END_ de _TOTAL_ registros",
"sInfoEmpty": "Mostrando de 0 até 0 de 0 registros",
"sInfoFiltered": "(filtrado de _MAX_ registros no total)",
"sInfoPostFix": "",
"sSearch": "Buscar:",
"oPaginate": {
"sFirst": "Primeiro",
"sPrevious": "Anterior",
"sNext": "Seguinte",
"sLast": "Último",
}

});


/* API method to get paging information */
$.fn.dataTableExt.oApi.fnPagingInfo = function ( oSettings )
{

return {
"iStart": oSettings._iDisplayStart,
"iEnd": oSettings.fnDisplayEnd(),
"iLength": oSettings._iDisplayLength,
"iTotal": oSettings.fnRecordsTotal(),
"iFilteredTotal": oSettings.fnRecordsDisplay(),
"iPage": Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ),
"iTotalPages": Math.ceil( oSettings.fnRecordsDisplay() / oSettings._iDisplayLength )
};
};



/* Bootstrap style pagination control */
$.extend( $.fn.dataTableExt.oPagination, {
"bootstrap": {
"fnInit": function( oSettings, nPaging, fnDraw ) {
var oLang = oSettings.oLanguage.oPaginate;
var fnClickHandler = function ( e ) {
e.preventDefault();
if ( oSettings.oApi._fnPageChange(oSettings, e.data.action) ) {
fnDraw( oSettings );
}
};

$(nPaging).addClass('pagination').append(
''+
'← '+oLang.sPrevious+''+
''+oLang.sNext+' → '+
''
);
var els = $('a', nPaging);
$(els[0]).bind( 'click.DT', { action: "previous" }, fnClickHandler );
$(els[1]).bind( 'click.DT', { action: "next" }, fnClickHandler );
},

"fnUpdate": function ( oSettings, fnDraw ) {
var iListLength = 0;
var oPaging = oSettings.oInstance.fnPagingInfo();
var an = oSettings.aanFeatures.p;
var i, j, sClass, iStart, iEnd, iHalf=Math.floor(iListLength/2);

if ( oPaging.iTotalPages < iListLength) {
iStart = 1;
iEnd = oPaging.iTotalPages;
}
else if ( oPaging.iPage <= iHalf ) {
iStart = 1;
iEnd = iListLength;
} else if ( oPaging.iPage >= (oPaging.iTotalPages-iHalf) ) {
iStart = oPaging.iTotalPages - iListLength + 1;
iEnd = oPaging.iTotalPages;
} else {
iStart = oPaging.iPage - iHalf + 1;
iEnd = iStart + iListLength - 1;
}

for ( i=0, iLen=an.length ; i
This discussion has been closed.