|
|
@ -73,12 +73,7 @@ $.extend( $.fn.dataTableExt.oPagination, {
|
|
|
|
iEnd = iStart + iListLength - 1;
|
|
|
|
iEnd = iStart + iListLength - 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for ( i=0, ien=an.length ; i<ien ; i++ ) {
|
|
|
|
var append_page = function(oPaging, an, j) {
|
|
|
|
// Remove the middle elements
|
|
|
|
|
|
|
|
$('li:gt(0)', an[i]).filter(':not(:last)').remove();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Add the new list items and their event handlers
|
|
|
|
|
|
|
|
for ( j=iStart ; j<=iEnd ; j++ ) {
|
|
|
|
|
|
|
|
sClass = (j==oPaging.iPage+1) ? 'class="active"' : '';
|
|
|
|
sClass = (j==oPaging.iPage+1) ? 'class="active"' : '';
|
|
|
|
$('<li '+sClass+'><a href="#">'+j+'</a></li>')
|
|
|
|
$('<li '+sClass+'><a href="#">'+j+'</a></li>')
|
|
|
|
.insertBefore( $('li:last', an[i])[0] )
|
|
|
|
.insertBefore( $('li:last', an[i])[0] )
|
|
|
@ -87,6 +82,24 @@ $.extend( $.fn.dataTableExt.oPagination, {
|
|
|
|
oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
|
|
|
|
oSettings._iDisplayStart = (parseInt($('a', this).text(),10)-1) * oPaging.iLength;
|
|
|
|
fnDraw( oSettings );
|
|
|
|
fnDraw( oSettings );
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for ( i=0, ien=an.length ; i<ien ; i++ ) {
|
|
|
|
|
|
|
|
// Remove the middle elements
|
|
|
|
|
|
|
|
$('li:gt(0)', an[i]).filter(':not(:last)').remove();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Append first page
|
|
|
|
|
|
|
|
if ( iStart > 1 ) {
|
|
|
|
|
|
|
|
append_page(oPaging, an, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Add the new list items and their event handlers
|
|
|
|
|
|
|
|
for ( j=iStart ; j<=iEnd ; j++ ) {
|
|
|
|
|
|
|
|
append_page(oPaging, an, j);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// Append last page
|
|
|
|
|
|
|
|
if ( oPaging.iTotalPages > iEnd ) {
|
|
|
|
|
|
|
|
append_page(oPaging, an, oPaging.iTotalPages);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Add / remove disabled classes from the static elements
|
|
|
|
// Add / remove disabled classes from the static elements
|
|
|
|