diff --git a/integration/bootstrap/dataTables.bootstrap.css b/integration/bootstrap/dataTables.bootstrap.css index d9993d4..7dfb4a6 100644 --- a/integration/bootstrap/dataTables.bootstrap.css +++ b/integration/bootstrap/dataTables.bootstrap.css @@ -46,3 +46,15 @@ table.dataTable th:active { outline: none; } + +/* + * TableTools styles + */ +ul.DTTT_dropdown.dropdown-menu a { + color: #333 !important; /* needed only when demo_page.css is included */ +} + +ul.DTTT_dropdown.dropdown-menu li:hover a { + background-color: #0088cc; + color: white !important; +} diff --git a/integration/bootstrap/dataTables.bootstrap.js b/integration/bootstrap/dataTables.bootstrap.js index b15b5bc..dbc17bf 100644 --- a/integration/bootstrap/dataTables.bootstrap.js +++ b/integration/bootstrap/dataTables.bootstrap.js @@ -105,3 +105,36 @@ $.extend( $.fn.dataTableExt.oPagination, { } } } ); + + +/* + * TableTools Bootstrap compatibility + * Required TableTools 2.1+ + */ +if ( $.fn.DataTable.TableTools ) { + // Set the classes that TableTools uses to something suitable for Bootstrap + $.extend( true, $.fn.DataTable.TableTools.classes, { + "container": "btn-group", + "buttons": { + "normal": "btn", + "disabled": "btn disabled" + }, + "collection": { + "container": "DTTT_dropdown dropdown-menu", + "buttons": { + "normal": "", + "disabled": "disabled" + } + } + } ); + + // Have the collection use a bootstrap compatible dropdown + $.extend( true, $.fn.DataTable.TableTools.DEFAULTS.oTags, { + "collection": { + "container": "ul", + "button": "li", + "liner": "a" + } + } ); +} +