From 2b0a6f259c195c520a3f297dc506ff13d7310fea Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Fri, 15 Jun 2012 14:34:14 +0100 Subject: [PATCH] Update Bootstrap integration for TableTools to be more complete - specifically in this case to take into account row selection --- .../bootstrap/dataTables.bootstrap.css | 30 +++++++++++++++++++ integration/bootstrap/dataTables.bootstrap.js | 5 +++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/integration/bootstrap/dataTables.bootstrap.css b/integration/bootstrap/dataTables.bootstrap.css index 654e7ce..c440ca6 100644 --- a/integration/bootstrap/dataTables.bootstrap.css +++ b/integration/bootstrap/dataTables.bootstrap.css @@ -50,6 +50,36 @@ table.dataTable th:active { /* * TableTools styles */ +.table tbody tr.active td, +.table tbody tr.active th { + background-color: #08C; + color: white; +} + +.table tbody tr.active:hover td, +.table tbody tr.active:hover th { + background-color: #0075b0 !important; +} + +.table-striped tbody tr.active:nth-child(odd) td, +.table-striped tbody tr.active:nth-child(odd) th { + background-color: #017ebc; +} + +table.DTTT_selectable tbody tr { + cursor: pointer; + *cursor: hand; +} + +div.DTTT .btn { + color: #333 !important; +} + +div.DTTT .btn:hover { + text-decoration: none !important; +} + + ul.DTTT_dropdown.dropdown-menu a { color: #333 !important; /* needed only when demo_page.css is included */ } diff --git a/integration/bootstrap/dataTables.bootstrap.js b/integration/bootstrap/dataTables.bootstrap.js index b7f2a88..d9b15be 100644 --- a/integration/bootstrap/dataTables.bootstrap.js +++ b/integration/bootstrap/dataTables.bootstrap.js @@ -114,7 +114,7 @@ $.extend( $.fn.dataTableExt.oPagination, { if ( $.fn.DataTable.TableTools ) { // Set the classes that TableTools uses to something suitable for Bootstrap $.extend( true, $.fn.DataTable.TableTools.classes, { - "container": "btn-group", + "container": "DTTT btn-group", "buttons": { "normal": "btn", "disabled": "disabled" @@ -128,6 +128,9 @@ if ( $.fn.DataTable.TableTools ) { }, "print": { "info": "DTTT_print_info modal" + }, + "select": { + "row": "active" } } );