diff --git a/pagination/bootstrap.js b/pagination/bootstrap.js deleted file mode 100644 index a9da4f8..0000000 --- a/pagination/bootstrap.js +++ /dev/null @@ -1,109 +0,0 @@ -/** - * This plug-in provides the mark-up needed for using Twitter Bootstrap's - * pagination styling with DataTables. Note that this plug-in uses the - * fnPagingInfo API plug-in method to obtain paging information. - * @name Twitter Bootstrap - * @anchor bootstrap - * @author Allan Jardine - * - * @example - * $(document).ready(function() { - * $('#example').dataTable( { - * "sPaginationType": "bootstrap" - * } ); - * } ); - */ - - -/* 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": oSettings._iDisplayLength === -1 ? - 0 : Math.ceil( oSettings._iDisplayStart / oSettings._iDisplayLength ), - "iTotalPages": oSettings._iDisplayLength === -1 ? - 0 : 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( - '