i18n
object
- {
- focus : 'Focus',
- display : 'Display',
- displayAll : 'Display all'
- }
+ {
+ focus : 'Focus',
+ display : 'Display',
+ displayAll : 'Display all'
+}
Used to translate the buttons (only works if you initialize via JavaScript).
diff --git a/bower.json b/bower.json
index 3b86a2d..b39181b 100644
--- a/bower.json
+++ b/bower.json
@@ -1,7 +1,7 @@
{
"name": "RWD-Table-Patterns",
"description": "This is an awesome solution for responsive tables with complex data.",
- "version": "6.0.2",
+ "version": "6.1.0",
"keywords": [
"RWD",
"responsive",
diff --git a/dist/css/rwd-table.css b/dist/css/rwd-table.css
index c0da4d4..c64eac4 100644
--- a/dist/css/rwd-table.css
+++ b/dist/css/rwd-table.css
@@ -1,5 +1,5 @@
/*!
- * Responsive Tables v6.0.2 (http://gergeo.se/RWD-Table-Patterns)
+ * Responsive Tables v6.1.0 (http://gergeo.se/RWD-Table-Patterns)
* This is an awesome solution for responsive tables with complex data.
* Authors: Nadan Gergeo (www.blimp.se), Lucas Wiener & "Maggie Wachs (www.filamentgroup.com)"
* Licensed under MIT (https://github.com/nadangergeo/RWD-Table-Patterns/blob/master/LICENSE-MIT)
@@ -109,6 +109,14 @@
.table-responsive[data-pattern="priority-columns"] > .table {
margin-bottom: 0;
}
+.table-responsive[data-pattern="priority-columns"] > .table > thead > tr > th,
+.table-responsive[data-pattern="priority-columns"] > .table > tbody > tr > th,
+.table-responsive[data-pattern="priority-columns"] > .table > tfoot > tr > th,
+.table-responsive[data-pattern="priority-columns"] > .table > thead > tr > td,
+.table-responsive[data-pattern="priority-columns"] > .table > tbody > tr > td,
+.table-responsive[data-pattern="priority-columns"] > .table > tfoot > tr > td {
+ position: relative;
+}
.table-responsive[data-pattern="priority-columns"] > .table-tighten > thead > tr > th,
.table-responsive[data-pattern="priority-columns"] > .table-tighten > tbody > tr > th,
.table-responsive[data-pattern="priority-columns"] > .table-tighten > tfoot > tr > th,
@@ -378,6 +386,7 @@ table.focus-on tfoot tr.focused td {
.sticky-table-header > .table > tbody > tr > td,
.sticky-table-header > .table > tfoot > tr > td {
border-color: var(--bs-border-color);
+ position: relative;
}
.sticky-table-header > .table-tighten > thead > tr > th,
.sticky-table-header > .table-tighten > tbody > tr > th,
@@ -412,3 +421,25 @@ table.focus-on tfoot tr.focused td {
.sticky-table-header > .table-bordered > tfoot > tr:last-child > td {
border-bottom: 0;
}
+.table-responsive[data-sorting-active=true] thead th:not([colSpan]),
+.table-responsive[data-sorting-active=true] thead th[colSpan="1"] {
+ cursor: pointer;
+ padding-right: 1.5rem;
+}
+.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted]:after,
+.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted]:after {
+ display: block;
+ width: auto;
+ height: auto;
+ position: absolute;
+ right: 5px;
+ bottom: 0.5rem;
+}
+.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted="asc"]:after,
+.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted="asc"]:after {
+ content: '↑';
+}
+.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted="desc"]:after,
+.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted="desc"]:after {
+ content: '↓';
+}
diff --git a/dist/css/rwd-table.min.css b/dist/css/rwd-table.min.css
index 79526ae..7089bf1 100644
--- a/dist/css/rwd-table.min.css
+++ b/dist/css/rwd-table.min.css
@@ -1,7 +1,7 @@
/*!
- * Responsive Tables v6.0.2 (http://gergeo.se/RWD-Table-Patterns)
+ * Responsive Tables v6.1.0 (http://gergeo.se/RWD-Table-Patterns)
* This is an awesome solution for responsive tables with complex data.
* Authors: Nadan Gergeo (www.blimp.se), Lucas Wiener & "Maggie Wachs (www.filamentgroup.com)"
* Licensed under MIT (https://github.com/nadangergeo/RWD-Table-Patterns/blob/master/LICENSE-MIT)
*/
-:root{--responsive-table-dropdown-hover-bg:#f2f2f2}.dropdown-menu>li.checkbox-row{padding:8px 16px}.dropdown-menu li.checkbox-row{display:block;display:flex;align-items:center;clear:both;font-weight:normal;line-height:calc(var(--bs-body-line-height) * 1rem);color:var(--bs-link-color);white-space:nowrap}.dropdown-menu li.checkbox-row label{font-size:.75rem;font-weight:600;margin-left:.5em;color:var(--bs-dark);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dropdown-menu li.checkbox-row:hover,.dropdown-menu li.checkbox-row input:hover,.dropdown-menu li.checkbox-row label:hover{cursor:pointer}.no-touch .dropdown-menu>.checkbox-row:hover,.no-touch .dropdown-menu>.checkbox-row:active{text-decoration:none;background-color:var(--responsive-table-dropdown-hover-bg)}.btn-toolbar{margin-bottom:calc(var(--bs-body-line-height) * 1rem)}.btn-toolbar .btn-outline-primary.btn-primary{color:var(--bs-white)}.lt-ie8 .btn-toolbar{display:none}.table-responsive{border-radius:var(--bs-border-radius);border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)}.table-responsive>.table{margin-bottom:0}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered thead tr:last-child{border-bottom-width:2px}.table-responsive>.table-bordered>thead,.table-responsive>.table-bordered>tbody,.table-responsive>.table-bordered>tfoot{border-color:var(--bs-border-color)}.table-responsive>.table-bordered>thead>th,.table-responsive>.table-bordered>tbody>th,.table-responsive>.table-bordered>tfoot>th,.table-responsive>.table-bordered>thead>td,.table-responsive>.table-bordered>tbody>td,.table-responsive>.table-bordered>tfoot>td{border-color:var(--bs-border-color)}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.table-responsive[data-pattern="priority-columns"]{width:100%;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar;border-radius:var(--bs-border-radius);border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);-webkit-overflow-scrolling:touch}.table-responsive[data-pattern="priority-columns"]>.table{margin-bottom:0}.table-responsive[data-pattern="priority-columns"]>.table-tighten>thead>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tbody>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tfoot>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>thead>tr>td,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tbody>tr>td,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tfoot>tr>td{white-space:nowrap}.table-responsive[data-pattern="priority-columns"]>.table-bordered{border:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr{border-color:var(--bs-border-color)}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr td{border-color:var(--bs-border-color)}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>td:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>td:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>td:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>td:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr:last-child>th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr:last-child>th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr:last-child>td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.table-responsive.absolute-solution{position:relative}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="0"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="0"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="0"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="0"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:none}.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="1"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="1"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"]{display:table-cell}@media screen and (min-width:480px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"]{display:table-cell}}@media screen and (min-width:640px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"]{display:table-cell}}@media screen and (min-width:800px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"]{display:table-cell}}@media screen and (min-width:960px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"]{display:table-cell}}@media screen and (min-width:1120px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:table-cell}}.mq.js .table-responsive[data-pattern="priority-columns"] th.cell-hide,.mq.js.lt-ie10 .sticky-table-header th.cell-hide,.mq.js .table-responsive[data-pattern="priority-columns"] td.cell-hide,.mq.js.lt-ie10 .sticky-table-header td.cell-hide{display:none}.mq.js .table-responsive[data-pattern="priority-columns"] th.cell-show,.mq.js.lt-ie10 .sticky-table-header th.cell-show,.mq.js .table-responsive[data-pattern="priority-columns"] td.cell-show,.mq.js.lt-ie10 .sticky-table-header td.cell-show{display:table-cell}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"] th.cell-show,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header th.cell-show,.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"] td.cell-show,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header td.cell-show{display:inline}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all th,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all th,.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all td,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all td{display:inline !important}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all th[data-priority="-1"],.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all th[data-priority="-1"],.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all td[data-priority="-1"],.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all td[data-priority="-1"]{display:none !important}.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all th,.mq.js.lt-ie10 .sticky-table-header table.display-all th,.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all td,.mq.js.lt-ie10 .sticky-table-header table.display-all td{display:table-cell !important}.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all th[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header table.display-all th[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all td[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header table.display-all td[data-priority="-1"]{display:none !important}table.table-small-font{font-size:.85rem;-webkit-text-size-adjust:none;line-height:var(--bs-body-line-height)}table.focus-on tbody tr:hover,table.focus-on tfoot tr:hover{cursor:pointer}table.focus-on tbody tr.unfocused th,table.focus-on tfoot tr.unfocused th,table.focus-on tbody tr.unfocused td,table.focus-on tfoot tr.unfocused td{color:var(--bs-gray);opacity:.75}table.focus-on tbody tr.focused th,table.focus-on tfoot tr.focused th,table.focus-on tbody tr.focused td,table.focus-on tfoot tr.focused td{background-color:var(--bs-primary);color:var(--bs-white);opacity:1 !important}.sticky-table-header{background-color:#fff;border:none;border-radius:0;border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);visibility:hidden;z-index:990;overflow:hidden}.fixed-solution .sticky-table-header{position:fixed;min-width:0}.absolute-solution .sticky-table-header{position:absolute;min-width:100%;top:0}.sticky-table-header.border-radius-fix{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.sticky-table-header>.table{margin-bottom:0}.sticky-table-header>.table>thead>tr,.sticky-table-header>.table>tbody>tr,.sticky-table-header>.table>tfoot>tr{border-color:var(--bs-border-color)}.sticky-table-header>.table>thead>tr>th,.sticky-table-header>.table>tbody>tr>th,.sticky-table-header>.table>tfoot>tr>th,.sticky-table-header>.table>thead>tr>td,.sticky-table-header>.table>tbody>tr>td,.sticky-table-header>.table>tfoot>tr>td{border-color:var(--bs-border-color)}.sticky-table-header>.table-tighten>thead>tr>th,.sticky-table-header>.table-tighten>tbody>tr>th,.sticky-table-header>.table-tighten>tfoot>tr>th,.sticky-table-header>.table-tighten>thead>tr>td,.sticky-table-header>.table-tighten>tbody>tr>td,.sticky-table-header>.table-tighten>tfoot>tr>td{white-space:nowrap}.sticky-table-header>.table-bordered{border:0}.sticky-table-header>.table-bordered>thead>tr>th:first-child,.sticky-table-header>.table-bordered>tbody>tr>th:first-child,.sticky-table-header>.table-bordered>tfoot>tr>th:first-child,.sticky-table-header>.table-bordered>thead>tr>td:first-child,.sticky-table-header>.table-bordered>tbody>tr>td:first-child,.sticky-table-header>.table-bordered>tfoot>tr>td:first-child{border-left:0}.sticky-table-header>.table-bordered>thead>tr>th:last-child,.sticky-table-header>.table-bordered>tbody>tr>th:last-child,.sticky-table-header>.table-bordered>tfoot>tr>th:last-child,.sticky-table-header>.table-bordered>thead>tr>td:last-child,.sticky-table-header>.table-bordered>tbody>tr>td:last-child,.sticky-table-header>.table-bordered>tfoot>tr>td:last-child{border-right:0}.sticky-table-header>.table-bordered>tbody>tr:last-child>th,.sticky-table-header>.table-bordered>tfoot>tr:last-child>th,.sticky-table-header>.table-bordered>tbody>tr:last-child>td,.sticky-table-header>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}
\ No newline at end of file
+:root{--responsive-table-dropdown-hover-bg:#f2f2f2}.dropdown-menu>li.checkbox-row{padding:8px 16px}.dropdown-menu li.checkbox-row{display:block;display:flex;align-items:center;clear:both;font-weight:normal;line-height:calc(var(--bs-body-line-height) * 1rem);color:var(--bs-link-color);white-space:nowrap}.dropdown-menu li.checkbox-row label{font-size:.75rem;font-weight:600;margin-left:.5em;color:var(--bs-dark);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dropdown-menu li.checkbox-row:hover,.dropdown-menu li.checkbox-row input:hover,.dropdown-menu li.checkbox-row label:hover{cursor:pointer}.no-touch .dropdown-menu>.checkbox-row:hover,.no-touch .dropdown-menu>.checkbox-row:active{text-decoration:none;background-color:var(--responsive-table-dropdown-hover-bg)}.btn-toolbar{margin-bottom:calc(var(--bs-body-line-height) * 1rem)}.btn-toolbar .btn-outline-primary.btn-primary{color:var(--bs-white)}.lt-ie8 .btn-toolbar{display:none}.table-responsive{border-radius:var(--bs-border-radius);border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)}.table-responsive>.table{margin-bottom:0}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered thead tr:last-child{border-bottom-width:2px}.table-responsive>.table-bordered>thead,.table-responsive>.table-bordered>tbody,.table-responsive>.table-bordered>tfoot{border-color:var(--bs-border-color)}.table-responsive>.table-bordered>thead>th,.table-responsive>.table-bordered>tbody>th,.table-responsive>.table-bordered>tfoot>th,.table-responsive>.table-bordered>thead>td,.table-responsive>.table-bordered>tbody>td,.table-responsive>.table-bordered>tfoot>td{border-color:var(--bs-border-color)}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.table-responsive[data-pattern="priority-columns"]{width:100%;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar;border-radius:var(--bs-border-radius);border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);-webkit-overflow-scrolling:touch}.table-responsive[data-pattern="priority-columns"]>.table{margin-bottom:0}.table-responsive[data-pattern="priority-columns"]>.table>thead>tr>th,.table-responsive[data-pattern="priority-columns"]>.table>tbody>tr>th,.table-responsive[data-pattern="priority-columns"]>.table>tfoot>tr>th,.table-responsive[data-pattern="priority-columns"]>.table>thead>tr>td,.table-responsive[data-pattern="priority-columns"]>.table>tbody>tr>td,.table-responsive[data-pattern="priority-columns"]>.table>tfoot>tr>td{position:relative}.table-responsive[data-pattern="priority-columns"]>.table-tighten>thead>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tbody>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tfoot>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>thead>tr>td,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tbody>tr>td,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tfoot>tr>td{white-space:nowrap}.table-responsive[data-pattern="priority-columns"]>.table-bordered{border:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr{border-color:var(--bs-border-color)}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr td{border-color:var(--bs-border-color)}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>td:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>td:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>td:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>td:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr:last-child>th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr:last-child>th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr:last-child>td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.table-responsive.absolute-solution{position:relative}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="0"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="0"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="0"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="0"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:none}.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="1"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="1"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"]{display:table-cell}@media screen and (min-width:480px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"]{display:table-cell}}@media screen and (min-width:640px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"]{display:table-cell}}@media screen and (min-width:800px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"]{display:table-cell}}@media screen and (min-width:960px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"]{display:table-cell}}@media screen and (min-width:1120px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:table-cell}}.mq.js .table-responsive[data-pattern="priority-columns"] th.cell-hide,.mq.js.lt-ie10 .sticky-table-header th.cell-hide,.mq.js .table-responsive[data-pattern="priority-columns"] td.cell-hide,.mq.js.lt-ie10 .sticky-table-header td.cell-hide{display:none}.mq.js .table-responsive[data-pattern="priority-columns"] th.cell-show,.mq.js.lt-ie10 .sticky-table-header th.cell-show,.mq.js .table-responsive[data-pattern="priority-columns"] td.cell-show,.mq.js.lt-ie10 .sticky-table-header td.cell-show{display:table-cell}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"] th.cell-show,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header th.cell-show,.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"] td.cell-show,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header td.cell-show{display:inline}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all th,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all th,.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all td,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all td{display:inline !important}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all th[data-priority="-1"],.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all th[data-priority="-1"],.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all td[data-priority="-1"],.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all td[data-priority="-1"]{display:none !important}.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all th,.mq.js.lt-ie10 .sticky-table-header table.display-all th,.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all td,.mq.js.lt-ie10 .sticky-table-header table.display-all td{display:table-cell !important}.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all th[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header table.display-all th[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all td[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header table.display-all td[data-priority="-1"]{display:none !important}table.table-small-font{font-size:.85rem;-webkit-text-size-adjust:none;line-height:var(--bs-body-line-height)}table.focus-on tbody tr:hover,table.focus-on tfoot tr:hover{cursor:pointer}table.focus-on tbody tr.unfocused th,table.focus-on tfoot tr.unfocused th,table.focus-on tbody tr.unfocused td,table.focus-on tfoot tr.unfocused td{color:var(--bs-gray);opacity:.75}table.focus-on tbody tr.focused th,table.focus-on tfoot tr.focused th,table.focus-on tbody tr.focused td,table.focus-on tfoot tr.focused td{background-color:var(--bs-primary);color:var(--bs-white);opacity:1 !important}.sticky-table-header{background-color:#fff;border:none;border-radius:0;border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);visibility:hidden;z-index:990;overflow:hidden}.fixed-solution .sticky-table-header{position:fixed;min-width:0}.absolute-solution .sticky-table-header{position:absolute;min-width:100%;top:0}.sticky-table-header.border-radius-fix{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.sticky-table-header>.table{margin-bottom:0}.sticky-table-header>.table>thead>tr,.sticky-table-header>.table>tbody>tr,.sticky-table-header>.table>tfoot>tr{border-color:var(--bs-border-color)}.sticky-table-header>.table>thead>tr>th,.sticky-table-header>.table>tbody>tr>th,.sticky-table-header>.table>tfoot>tr>th,.sticky-table-header>.table>thead>tr>td,.sticky-table-header>.table>tbody>tr>td,.sticky-table-header>.table>tfoot>tr>td{border-color:var(--bs-border-color);position:relative}.sticky-table-header>.table-tighten>thead>tr>th,.sticky-table-header>.table-tighten>tbody>tr>th,.sticky-table-header>.table-tighten>tfoot>tr>th,.sticky-table-header>.table-tighten>thead>tr>td,.sticky-table-header>.table-tighten>tbody>tr>td,.sticky-table-header>.table-tighten>tfoot>tr>td{white-space:nowrap}.sticky-table-header>.table-bordered{border:0}.sticky-table-header>.table-bordered>thead>tr>th:first-child,.sticky-table-header>.table-bordered>tbody>tr>th:first-child,.sticky-table-header>.table-bordered>tfoot>tr>th:first-child,.sticky-table-header>.table-bordered>thead>tr>td:first-child,.sticky-table-header>.table-bordered>tbody>tr>td:first-child,.sticky-table-header>.table-bordered>tfoot>tr>td:first-child{border-left:0}.sticky-table-header>.table-bordered>thead>tr>th:last-child,.sticky-table-header>.table-bordered>tbody>tr>th:last-child,.sticky-table-header>.table-bordered>tfoot>tr>th:last-child,.sticky-table-header>.table-bordered>thead>tr>td:last-child,.sticky-table-header>.table-bordered>tbody>tr>td:last-child,.sticky-table-header>.table-bordered>tfoot>tr>td:last-child{border-right:0}.sticky-table-header>.table-bordered>tbody>tr:last-child>th,.sticky-table-header>.table-bordered>tfoot>tr:last-child>th,.sticky-table-header>.table-bordered>tbody>tr:last-child>td,.sticky-table-header>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.table-responsive[data-sorting-active=true] thead th:not([colSpan]),.table-responsive[data-sorting-active=true] thead th[colSpan="1"]{cursor:pointer;padding-right:1.5rem}.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted]:after,.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted]:after{display:block;width:auto;height:auto;position:absolute;right:5px;bottom:.5rem}.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted="asc"]:after,.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted="asc"]:after{content:'↑'}.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted="desc"]:after,.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted="desc"]:after{content:'↓'}
\ No newline at end of file
diff --git a/dist/js/rwd-table.js b/dist/js/rwd-table.js
index 7676722..53ddc88 100644
--- a/dist/js/rwd-table.js
+++ b/dist/js/rwd-table.js
@@ -1,5 +1,5 @@
/*!
- * Responsive Tables v6.0.2 (http://gergeo.se/RWD-Table-Patterns)
+ * Responsive Tables v6.1.0 (http://gergeo.se/RWD-Table-Patterns)
* This is an awesome solution for responsive tables with complex data.
* Authors: Nadan Gergeo (www.blimp.se), Lucas Wiener & "Maggie Wachs (www.filamentgroup.com)"
* Licensed under MIT (https://github.com/nadangergeo/RWD-Table-Patterns/blob/master/LICENSE-MIT)
@@ -37,8 +37,12 @@
//good to have - for easy access
this.$thead = this.$table.find('thead');
- this.$hdrCells = this.$thead.find("tr").first().find('th');
- this.$bodyRows = this.$table.find('tbody, tfoot').find('tr');
+ this.$hdrRows = this.$thead.find("tr");
+ this.$hdrCells = this.$hdrRows.first().find('th'); // use first row as basis
+ this.$tbody = this.$table.find('tbody');
+ this.$bodyRows = this.$tbody.find('tr');
+ this.$footRows = this.$table.find('tfoot').find('tr');
+ this.$bodyAndFootRows = $.merge(this.$bodyRows, this.$footRows); // combine tbody and tfoot rows
//toolbar and buttons
this.$btnToolbar = null; //defined farther down
@@ -77,7 +81,7 @@
this.setupTableHeader();
//setup standard cells
- this.setupBodyRows();
+ this.setupBodyAndFootRows();
//create sticky table head
if(this.options.stickyTableHeader){
@@ -92,6 +96,25 @@
// Event binding
// -------------------------
+ // bind click on rows
+ this.bindClickOnRows();
+
+ if(this.options.sortable) {
+ //apply pattern option as data-attribute, in case it was set via js
+ this.$tableScrollWrapper.attr('data-sortable', true);
+ //needed for the css. Makes sure that sorting is actually active before applying styles.
+ this.$tableScrollWrapper.attr('data-sorting-active', true);
+ // bind click on theads with sorting function
+ this.makeSortableByColumns();
+
+ // for alternate toggling of sort direction
+ this.shiftKeyActive = false;
+ // listen on keydown/up and update shiftKeyActive
+ $(document).on('keydown keyup', function(event) {
+ that.shiftKeyActive = event.shiftKey;
+ });
+ }
+
// on orientchange, resize and displayAllBtn-click
$(window).bind('orientationchange resize ' + this.displayAllTrigger, function(){
@@ -114,6 +137,10 @@
addFocusBtn: true, // should it have a focus button?
focusBtnIcon: 'fa fa-crosshairs',
mainContainer: window,
+ sortable: false,
+ compareFunction: function(a, b, dir) {
+ return a[0].localeCompare(b[0], undefined, { numeric: true }) < 0 ? -dir : dir;
+ },
i18n: {
focus : 'Focus',
display : 'Display',
@@ -127,11 +154,23 @@
this.$tableWrapper = this.$tableScrollWrapper.parent();
};
+ ResponsiveTable.prototype.bindClickOnRows = function() {
+ var that = this;
+
+ if(this.options.addFocusBtn) {
+ this.$bodyAndFootRows.unbind('click'); // remove old event listeners
+ this.$bodyAndFootRows.click(function() {
+ that.focusOnRow($(this));
+ });
+ }
+ }
+
// Create toolbar with buttons
ResponsiveTable.prototype.createButtonToolbar = function() {
var that = this;
- this.$btnToolbar = $('[data-responsive-table-toolbar="' + this.id + '"]').addClass('btn-toolbar justify-content-between');
+ this.$btnToolbar = $('[data-responsive-table-toolbar="' + this.id + '"]');
+ this.$btnToolbar.addClass('btn-toolbar justify-content-between');
if(this.$btnToolbar.length === 0) {
this.$btnToolbar = $('
');
}
@@ -159,12 +198,7 @@
// bind click on focus btn
this.$focusBtn.click(function(){
- $.proxy(that.activateFocus(), that);
- });
-
- // bind click on rows
- this.$bodyRows.click(function(){
- $.proxy(that.focusOnRow($(this)), that);
+ that.activateFocus();
});
} else {
this.$btnToolbar.append($('
')); //add empty div instead, keeping same layout
@@ -199,8 +233,8 @@
};
ResponsiveTable.prototype.clearAllFocus = function() {
- this.$bodyRows.removeClass('unfocused');
- this.$bodyRows.removeClass('focused');
+ this.$bodyAndFootRows.removeClass('unfocused');
+ this.$bodyAndFootRows.removeClass('focused');
};
ResponsiveTable.prototype.activateFocus = function() {
@@ -223,7 +257,7 @@
this.clearAllFocus();
if(!alreadyFocused) {
- this.$bodyRows.addClass('unfocused');
+ this.$bodyAndFootRows.addClass('unfocused');
$(row).addClass('focused');
}
}
@@ -285,16 +319,16 @@
// bind scroll on mainContainer with updateStickyTableHeader
$(this.options.mainContainer).on('scroll', function(event){
- $.proxy(that.updateStickyTableHeader(), that);
+ that.updateStickyTableHeader();
});
// bind resize on window with updateStickyTableHeader
- $(window).on('resize', function(e){
- $.proxy(that.updateStickyTableHeader(), that);
+ $(window).on('resize', function(event){
+ that.updateStickyTableHeader();
});
$(that.$tableScrollWrapper).on('scroll', function(event){
- $.proxy(that.updateStickyTableHeader(), that);
+ that.updateStickyTableHeader();
});
// determine what solution to use for rendereing sticky table head (aboslute/fixed).
@@ -422,6 +456,8 @@
ResponsiveTable.prototype.setupTableHeader = function() {
var that = this;
+ var colSpans = 0;
+
// for each header column
that.$hdrCells.each(function(i){
var $th = $(this),
@@ -438,6 +474,15 @@
thText = $th.attr('data-col-name');
}
+ // add x pos (used for sorting)
+ $th.attr('data-pos-x', i + colSpans);
+
+ // take account for colspans
+ var colSpan = parseInt($th.prop('colSpan'));
+ if(colSpan > 1) {
+ colSpans += (colSpan - 1);
+ }
+
// create the hide/show toggle for the current column
if ( $th.is('[data-priority]') && $th.data('priority') !== -1 ) {
var $toggle = $(' '+ thText +' ');
@@ -532,22 +577,30 @@
}); // end hdrCells loop
if(!$.isEmptyObject(this.headerRowIndices)) {
- that.setupRow(this.$thead.find("tr:eq(1)"), this.headerRowIndices);
+ that.setupRow(this.$thead.find("tr:eq(1)"), this.headerRowIndices, 1);
}
+
+ // also give first row in thead an index
+ this.$hdrRows.first().attr('data-pos-y', 0);
};
// Setup body rows
// assign matching "data-columns" attributes to the associated cells "(cells with colspan>1 has multiple columns).
- ResponsiveTable.prototype.setupBodyRows = function() {
+ ResponsiveTable.prototype.setupBodyAndFootRows = function() {
var that = this;
- // for each body rows
- that.$bodyRows.each(function(){
- that.setupRow($(this), that.headerColIndices);
+ // for each body
+ that.$bodyRows.each(function(index){
+ that.setupRow($(this), that.headerColIndices, index);
+ });
+
+ // for each footer row
+ that.$footRows.each(function(index){
+ that.setupRow($(this), that.headerColIndices, index);
});
};
- ResponsiveTable.prototype.setupRow = function($row, indices) {
+ ResponsiveTable.prototype.setupRow = function($row, indices, index) {
var that = this;
//check if it's already set up
@@ -556,12 +609,13 @@
return;
} else {
$row.data('setup', true);
+ $row.attr('data-pos-y', index);
}
var idStart = 0;
// for each cell
- $row.find('th, td').each(function(){
+ $row.find('th, td').each(function(i){
var $cell = $(this);
var columnsAttr = '';
@@ -590,9 +644,19 @@
//remove whitespace in begining of string.
columnsAttr = columnsAttr.substring(1);
- //set attribute to cell
+ //set data-columns attribute to cell
$cell.attr('data-columns', columnsAttr);
+ // x-position (for sorting function)
+ var rowSpansBeforeCell = 0;
+
+ // Take account to rowspans if it is the seconds row in thead
+ if($row.parent().prop('tagName') === 'THEAD' && $row.attr('data-pos-y') === "1" && that.rowspansBeforeIndex) {
+ var rowSpansBeforeCell = that.rowspansBeforeIndex[i] || 0;
+ }
+
+ $cell.attr('data-pos-x', i + rowSpansBeforeCell);
+
//increment idStart with the current cells colSpan.
idStart = idStart + colSpan;
});
@@ -608,7 +672,7 @@
var colPadding = 0;
var rowPadding = 0;
- this.$thead.find("tr").first().find('th').each(function(i){
+ this.$hdrCells.each(function(i){
var $th = $(this);
var colSpan = $th.prop('colSpan');
var rowSpan = $th.prop("rowSpan");
@@ -628,27 +692,27 @@
colPadding += colSpan - 1;
});
- if(this.$thead.find("tr").length > 2) {
- throw new Error("This plugin doesnt support more than two rows in thead.");
- }
-
- if(this.$thead.find("tr").length === 2) {
- var $row = $(this.$thead.find("tr")[1]);
+ if(this.$hdrRows.length === 2) {
+ var $row = $(this.$hdrRows[1]);
$row.find("th").each(function(cellIndex) {
that.headerRowIndices[cellIndex] = that.headerColIndices[rowspansBeforeIndex[cellIndex] + cellIndex];
+ that.rowspansBeforeIndex = rowspansBeforeIndex;
});
+ } else if(this.$hdrRows.length > 2) {
+ throw new Error("This plugin doesnt support more than two rows in thead.");
}
}
// Run this after the content in tbody has changed
ResponsiveTable.prototype.update = function() {
- this.$bodyRows = this.$table.find('tbody, tfoot').find('tr');
- this.setupBodyRows();
+ this.$bodyAndFootRows = this.$table.find('tbody, tfoot').find('tr'); // get fresh list
+ this.setupBodyAndFootRows();
+ this.bindClickOnRows();
// Remove old tbody clone from Tableclone
this.$tableClone.find('tbody, tfoot').remove();
- // Make new clone of tbody
+ // Make new clone of tbody and tfoot
var $tbodyClone = this.$table.find('tbody, tfoot').clone();
//replace ids
@@ -699,12 +763,160 @@
});
};
+ // Utils for sorting
+
+ ResponsiveTable.prototype.getSortedColumn = function(col, dir) {
+ var that = this;
+
+ for (var i = 0; i < col.length; i++) {
+ col[i] = [col[i], i];
+ }
+
+ var compareFunction;
+ if(that.options.compareFunction instanceof Function) {
+ compareFunction = function(a, b) {
+ return that.options.compareFunction(a, b, dir);
+ };
+ }
+
+ col.sort(compareFunction);
+
+ col.indices = [];
+
+ for (var j = 0; j < col.length; j++) {
+ col.indices.push(col[j][1]);
+ col[j] = col[j][0];
+ }
+
+ return col;
+ };
+
+ ResponsiveTable.prototype.getRestoredColumn = function(col) {
+ for (var i = 0; i < col.length; i++) {
+ col[i] = [col[i], i, $(col[i]).attr("data-pos-y")];
+ }
+
+ col.sort(function(a, b) {
+ return a[2].localeCompare(b[2], undefined, { numeric: true }) < 0 ? -1 : 1;
+ });
+
+ col.indices = [];
+
+ for (var j = 0; j < col.length; j++) {
+ col.indices.push(col[j][1]);
+ col[j] = col[j][0];
+ }
+
+ return col;
+ };
+
+ var sortDirMapping = {
+ "asc": 1,
+ "desc": -1,
+ "org": 0
+ };
+
+ ResponsiveTable.prototype.sortColumn = function(hdr, dir) {
+ var that = this;
+ var $tBody = that.$tbody;
+
+ // if hdr is an number (index), treat as pos-x and use it to get hdr. Otherwise expecting hdr element directly (sent via click-event).
+ var $hdr = Number.isInteger(hdr) ? that.$thead.find('th[data-pos-x='+ hdr +']') : $(hdr);
+ var id = $hdr.prop('id');
+ var $clone = id.indexOf('-clone') === (id.length - 6) ? $('#' + id.slice(0, id.length - 6)) : $('#' + $(hdr).prop('id') + '-clone'); // the clone is the original if 'hdr' is the clone, and vice versa.
+
+ // get fresh list of rows in tbody
+ var $tBodyRows = $tBody.find('tr');
+
+ // get all cells under the column
+ var posX = $hdr.data('pos-x');
+ var col = $tBodyRows.find('[data-pos-x='+ posX +']');
+
+ var sorted = $hdr.attr("data-sorted");
+
+ // get all hdr cells if not cached
+ if(!that.$allHdrCells) {
+ that.$hdrCellsClones = that.$tableClone ? that.$tableClone.find('thead > tr > th') : [];
+ that.$allHdrCells = $.merge(this.$hdrRows.find('th'), that.$hdrCellsClones);
+ }
+
+ // remove sorted attr from all cols
+ that.$allHdrCells.filter("[data-sorted]").each(function() {
+ $(this).removeAttr("data-sorted");
+ });
+
+ var sortDir;
+
+ if((that.shiftKeyActive && sorted === "desc") || (!sorted && !that.shiftKeyActive) || dir === 1) {
+ // add attr to clicked col
+ $hdr.attr("data-sorted", "asc");
+ // do same on clone (sticky)
+ $clone.attr("data-sorted", "asc");
+ sortDir = 1;
+ } else if((that.shiftKeyActive && !sorted) || (sorted === "asc" && !that.shiftKeyActive) || dir === -1) {
+ // switch to desc order
+ $hdr.attr("data-sorted", "desc");
+ // do same on clone (sticky)
+ $clone.attr("data-sorted", "desc");
+ sortDir = -1;
+ } else if((that.shiftKeyActive && sorted === "asc") || (sorted === "desc" && !that.shiftKeyActive) || dir === 0) {
+ // remove
+ $hdr.removeAttr("data-sorted");
+ // do same on clone (sticky)
+ $clone.removeAttr("data-sorted");
+ sortDir = 0;
+ }
+
+ if(sortDir !== 0){
+ col = col.map(function(i, e) {
+ // prepare for sorting by just keeping the inner text
+ return $(e).data('value') || e.innerText;
+ }).get();
+
+ // sort
+ col = that.getSortedColumn(col, sortDir);
+ } else {
+ // restore original order
+ col = that.getRestoredColumn($tBodyRows.get())
+ }
+
+ // Now that we have the new order indexes, modify dom into that order.
+ // This is definetely not the fastest method, but it was the easiest to implement for now.
+ // Todo: optimize by detatching and appending (moving) rows, instead of cloning and deleting.
+ for (var i = 0; i < col.length; i++) {
+ $tBodyRows.eq(col.indices[i]).clone().appendTo($tBody); // add copy to end
+ }
+
+ for (var i = 0; i < col.length; i++) {
+ $tBodyRows.eq(i).remove(); // remove old copies at top (unsorted original)
+ }
+
+ that.$bodyAndFootRows = that.$table.find('tbody, tfoot').find('tr'); // get fresh list
+ that.bindClickOnRows(); // add click events (focus)
+ }
+
+ ResponsiveTable.prototype.makeSortableByColumns = function() {
+ var that = this;
+ that.$hdrCellsClones = that.$tableClone ? that.$tableClone.find('thead > tr > th') : [];
+ that.$allHdrCells = $.merge(this.$hdrRows.find('th'), that.$hdrCellsClones);
+
+ that.$allHdrCells.each(function(colIndex){
+ if($(this).prop('colSpan') > 1) {
+ return;
+ }
+
+ $(this).click(function() {
+ that.sortColumn(this);
+ });
+ });
+ };
+
// RESPONSIVE TABLE PLUGIN DEFINITION
// ===========================
var old = $.fn.responsiveTable;
- $.fn.responsiveTable = function (option) {
+ $.fn.responsiveTable = function (option, args) {
return this.each(function () {
var $this = $(this);
var data = $this.data('responsiveTable');
@@ -718,7 +930,7 @@
$this.data('responsiveTable', (data = new ResponsiveTable(this, options)));
}
if (typeof option === 'string') {
- data[option]();
+ data[option].apply(data, args);
}
});
};
diff --git a/dist/js/rwd-table.min.js b/dist/js/rwd-table.min.js
index 833a827..1e4c70d 100644
--- a/dist/js/rwd-table.min.js
+++ b/dist/js/rwd-table.min.js
@@ -1,7 +1,7 @@
/*!
- * Responsive Tables v6.0.2 (http://gergeo.se/RWD-Table-Patterns)
+ * Responsive Tables v6.1.0 (http://gergeo.se/RWD-Table-Patterns)
* This is an awesome solution for responsive tables with complex data.
* Authors: Nadan Gergeo (www.blimp.se), Lucas Wiener & "Maggie Wachs (www.filamentgroup.com)"
* Licensed under MIT (https://github.com/nadangergeo/RWD-Table-Patterns/blob/master/LICENSE-MIT)
*/
-!function(d){"use strict";var a=function(t,i){var e=this;if(this.options=i,this.$tableWrapper=null,this.$tableScrollWrapper=d(t),this.$table=d(t).find("table"),1!==this.$table.length)throw new Error("Exactly one table is expected in a .table-responsive div.");this.$tableScrollWrapper.attr("data-pattern",this.options.pattern),this.id=this.$table.prop("id")||this.$tableScrollWrapper.prop("id")||"id"+Math.random().toString(16).slice(2),this.$tableClone=null,this.$stickyTableHeader=null,this.$thead=this.$table.find("thead"),this.$hdrCells=this.$thead.find("tr").first().find("th"),this.$bodyRows=this.$table.find("tbody, tfoot").find("tr"),this.$btnToolbar=null,this.$dropdownGroup=null,this.$dropdownBtn=null,this.$dropdownContainer=null,this.$displayAllBtn=null,this.$focusGroup=null,this.$focusBtn=null,this.displayAllTrigger="display-all-"+this.id+".responsive-table",this.idPrefix=this.id+"-col-",this.headerColIndices={},this.headerRowIndices={},this.wrapTable(),this.createButtonToolbar(),this.buildHeaderCellIndices(),this.setupTableHeader(),this.setupBodyRows(),this.options.stickyTableHeader&&this.createStickyTableHeader(),this.$dropdownContainer.is(":empty")&&this.$dropdownGroup.hide(),d(window).bind("orientationchange resize "+this.displayAllTrigger,function(){e.$dropdownContainer.find("input").trigger("updateCheck"),d.proxy(e.updateSpanningCells(),e)}).trigger("resize")};a.DEFAULTS={pattern:"priority-columns",stickyTableHeader:!0,fixedNavbar:".navbar.fixed-top",addDisplayAllBtn:!0,addFocusBtn:!0,focusBtnIcon:"fa fa-crosshairs",mainContainer:window,i18n:{focus:"Focus",display:"Display",displayAll:"Display all"}},a.prototype.wrapTable=function(){this.$tableScrollWrapper.wrap('
'),this.$tableWrapper=this.$tableScrollWrapper.parent()},a.prototype.createButtonToolbar=function(){var t=this;this.$btnToolbar=d('[data-responsive-table-toolbar="'+this.id+'"]').addClass("btn-toolbar justify-content-between"),0===this.$btnToolbar.length&&(this.$btnToolbar=d('
')),this.$dropdownGroup=d('
'),this.$dropdownBtn=d(''),this.$dropdownContainer=d(''),this.options.addFocusBtn?(this.$focusGroup=d('
'),this.$focusBtn=d(''+this.options.i18n.focus+" "),this.options.focusBtnIcon&&this.$focusBtn.prepend(' '),this.$focusGroup.append(this.$focusBtn),this.$btnToolbar.append(this.$focusGroup),this.$focusBtn.click(function(){d.proxy(t.activateFocus(),t)}),this.$bodyRows.click(function(){d.proxy(t.focusOnRow(d(this)),t)})):this.$btnToolbar.append(d("
")),this.options.addDisplayAllBtn&&(this.$displayAllBtn=d(''+this.options.i18n.displayAll+" "),this.$dropdownGroup.append(this.$displayAllBtn),this.$table.hasClass("display-all")&&this.$displayAllBtn.addClass("btn-primary"),this.$displayAllBtn.click(function(){d.proxy(t.displayAll(null,!0),t)})),this.$dropdownGroup.append(this.$dropdownBtn).append(this.$dropdownContainer),this.$btnToolbar.append(this.$dropdownGroup),this.$tableScrollWrapper.before(this.$btnToolbar)},a.prototype.clearAllFocus=function(){this.$bodyRows.removeClass("unfocused"),this.$bodyRows.removeClass("focused")},a.prototype.activateFocus=function(){this.clearAllFocus(),this.$focusBtn&&this.$focusBtn.toggleClass("btn-primary"),this.$table.toggleClass("focus-on")},a.prototype.focusOnRow=function(t){if(this.$table.hasClass("focus-on")){var i=d(t).hasClass("focused");this.clearAllFocus(),i||(this.$bodyRows.addClass("unfocused"),d(t).addClass("focused"))}},a.prototype.displayAll=function(t,i){this.$displayAllBtn&&this.$displayAllBtn.toggleClass("btn-primary",t),this.$table.toggleClass("display-all",t),this.$tableClone&&this.$tableClone.toggleClass("display-all",t),i&&d(window).trigger(this.displayAllTrigger)},a.prototype.preserveDisplayAll=function(){var t="table-cell";d("html").hasClass("lt-ie9")&&(t="inline"),d(this.$table).find("th, td").css("display",t),this.$tableClone&&d(this.$tableClone).find("th, td").css("display",t)},a.prototype.createStickyTableHeader=function(){var i=this;i.$tableClone=i.$table.clone(),i.$tableClone.prop("id",this.id+"-clone"),i.$tableClone.find("[id]").each(function(){d(this).prop("id",d(this).prop("id")+"-clone")}),i.$tableClone.wrap(''),i.$stickyTableHeader=i.$tableClone.parent(),i.$stickyTableHeader.css("height",i.$thead.height()+2),i.$table.before(i.$stickyTableHeader),d(this.options.mainContainer).on("scroll",function(t){d.proxy(i.updateStickyTableHeader(),i)}),d(window).on("resize",function(t){d.proxy(i.updateStickyTableHeader(),i)}),d(i.$tableScrollWrapper).on("scroll",function(t){d.proxy(i.updateStickyTableHeader(),i)}),i.useFixedSolution=!e()||8<=function(){{if(e()){var t=parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""));return t}return 0}}(),i.useFixedSolution?i.$tableScrollWrapper.addClass("fixed-solution"):i.$tableScrollWrapper.addClass("absolute-solution")},a.prototype.updateStickyTableHeader=function(){var t,i=this,e=0,o=i.$table.offset().top,a=d(this.options.mainContainer).scrollTop()-1,s=i.$table.height()-i.$stickyTableHeader.height(),n=a+d(this.options.mainContainer).height()-d(document).height(),l=0;d(i.options.fixedNavbar).length&&(a+=l=d(i.options.fixedNavbar).first().outerHeight());if(t=this.options.mainContainer===window?o '+o+" "),s=a.find("input");n.$dropdownContainer.append(a),a.click(function(t){t.stopPropagation(),s.prop("checked",!s.prop("checked")),s.trigger("change")}),d("html").hasClass("lt-ie9")&&s.click(function(){d(this).trigger("change")}),a.find("label").click(function(t){t.stopPropagation()}),a.find("input").click(function(t){t.stopPropagation()}).change(function(){var e=d(this),t=e.val(),i=n.$tableWrapper.find("#"+t+", #"+t+"-clone, [data-columns~="+t+"]");n.$table.hasClass("display-all")&&(d.proxy(n.preserveDisplayAll(),n),n.$table.removeClass("display-all"),n.$tableClone&&n.$tableClone.removeClass("display-all"),n.$displayAllBtn.removeClass("btn-primary")),i.each(function(){var t=d(this);if(e.is(":checked")){if(!t.closest("thead").length&&"none"!==t.css("display")){var i=Math.min(parseInt(t.prop("colSpan"))+1,t.attr("data-org-colspan"));t.prop("colSpan",i)}t.show()}else!t.closest("thead").length&&1 '),this.$tableWrapper=this.$tableScrollWrapper.parent()},a.prototype.bindClickOnRows=function(){var t=this;this.options.addFocusBtn&&(this.$bodyAndFootRows.unbind("click"),this.$bodyAndFootRows.click(function(){t.focusOnRow(u(this))}))},a.prototype.createButtonToolbar=function(){var t=this;this.$btnToolbar=u('[data-responsive-table-toolbar="'+this.id+'"]'),this.$btnToolbar.addClass("btn-toolbar justify-content-between"),0===this.$btnToolbar.length&&(this.$btnToolbar=u('
')),this.$dropdownGroup=u('
'),this.$dropdownBtn=u(''),this.$dropdownContainer=u(''),this.options.addFocusBtn?(this.$focusGroup=u('
'),this.$focusBtn=u(''+this.options.i18n.focus+" "),this.options.focusBtnIcon&&this.$focusBtn.prepend(' '),this.$focusGroup.append(this.$focusBtn),this.$btnToolbar.append(this.$focusGroup),this.$focusBtn.click(function(){t.activateFocus()})):this.$btnToolbar.append(u("
")),this.options.addDisplayAllBtn&&(this.$displayAllBtn=u(''+this.options.i18n.displayAll+" "),this.$dropdownGroup.append(this.$displayAllBtn),this.$table.hasClass("display-all")&&this.$displayAllBtn.addClass("btn-primary"),this.$displayAllBtn.click(function(){u.proxy(t.displayAll(null,!0),t)})),this.$dropdownGroup.append(this.$dropdownBtn).append(this.$dropdownContainer),this.$btnToolbar.append(this.$dropdownGroup),this.$tableScrollWrapper.before(this.$btnToolbar)},a.prototype.clearAllFocus=function(){this.$bodyAndFootRows.removeClass("unfocused"),this.$bodyAndFootRows.removeClass("focused")},a.prototype.activateFocus=function(){this.clearAllFocus(),this.$focusBtn&&this.$focusBtn.toggleClass("btn-primary"),this.$table.toggleClass("focus-on")},a.prototype.focusOnRow=function(t){if(this.$table.hasClass("focus-on")){var e=u(t).hasClass("focused");this.clearAllFocus(),e||(this.$bodyAndFootRows.addClass("unfocused"),u(t).addClass("focused"))}},a.prototype.displayAll=function(t,e){this.$displayAllBtn&&this.$displayAllBtn.toggleClass("btn-primary",t),this.$table.toggleClass("display-all",t),this.$tableClone&&this.$tableClone.toggleClass("display-all",t),e&&u(window).trigger(this.displayAllTrigger)},a.prototype.preserveDisplayAll=function(){var t="table-cell";u("html").hasClass("lt-ie9")&&(t="inline"),u(this.$table).find("th, td").css("display",t),this.$tableClone&&u(this.$tableClone).find("th, td").css("display",t)},a.prototype.createStickyTableHeader=function(){var e=this;e.$tableClone=e.$table.clone(),e.$tableClone.prop("id",this.id+"-clone"),e.$tableClone.find("[id]").each(function(){u(this).prop("id",u(this).prop("id")+"-clone")}),e.$tableClone.wrap(''),e.$stickyTableHeader=e.$tableClone.parent(),e.$stickyTableHeader.css("height",e.$thead.height()+2),e.$table.before(e.$stickyTableHeader),u(this.options.mainContainer).on("scroll",function(t){e.updateStickyTableHeader()}),u(window).on("resize",function(t){e.updateStickyTableHeader()}),u(e.$tableScrollWrapper).on("scroll",function(t){e.updateStickyTableHeader()}),e.useFixedSolution=!o()||8<=function(){{if(o()){var t=parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""));return t}return 0}}(),e.useFixedSolution?e.$tableScrollWrapper.addClass("fixed-solution"):e.$tableScrollWrapper.addClass("absolute-solution")},a.prototype.updateStickyTableHeader=function(){var t,e=this,o=0,i=e.$table.offset().top,s=u(this.options.mainContainer).scrollTop()-1,a=e.$table.height()-e.$stickyTableHeader.height(),n=s+u(this.options.mainContainer).height()-u(document).height(),r=0;u(e.options.fixedNavbar).length&&(s+=r=u(e.options.fixedNavbar).first().outerHeight());if(t=this.options.mainContainer===window?i '+i+" "),n=a.find("input");r.$dropdownContainer.append(a),a.click(function(t){t.stopPropagation(),n.prop("checked",!n.prop("checked")),n.trigger("change")}),u("html").hasClass("lt-ie9")&&n.click(function(){u(this).trigger("change")}),a.find("label").click(function(t){t.stopPropagation()}),a.find("input").click(function(t){t.stopPropagation()}).change(function(){var o=u(this),t=o.val(),e=r.$tableWrapper.find("#"+t+", #"+t+"-clone, [data-columns~="+t+"]");r.$table.hasClass("display-all")&&(u.proxy(r.preserveDisplayAll(),r),r.$table.removeClass("display-all"),r.$tableClone&&r.$tableClone.removeClass("display-all"),r.$displayAllBtn.removeClass("btn-primary")),e.each(function(){var t=u(this);if(o.is(":checked")){if(!t.closest("thead").length&&"none"!==t.css("display")){var e=Math.min(parseInt(t.prop("colSpan"))+1,t.attr("data-org-colspan"));t.prop("colSpan",e)}t.show()}else!t.closest("thead").length&&1 tr > th"):[],i.$allHdrCells=u.merge(this.$hdrRows.find("th"),i.$hdrCellsClones)),i.$allHdrCells.filter("[data-sorted]").each(function(){u(this).removeAttr("data-sorted")}),i.shiftKeyActive&&"desc"===h||!h&&!i.shiftKeyActive||1===e?(a.attr("data-sorted","asc"),r.attr("data-sorted","asc"),o=1):i.shiftKeyActive&&!h||"asc"===h&&!i.shiftKeyActive||-1===e?(a.attr("data-sorted","desc"),r.attr("data-sorted","desc"),o=-1):(i.shiftKeyActive&&"asc"===h||"desc"===h&&!i.shiftKeyActive||0===e)&&(a.removeAttr("data-sorted"),r.removeAttr("data-sorted"),o=0),p=0!==o?(p=p.map(function(t,e){return u(e).data("value")||e.innerText}).get(),i.getSortedColumn(p,o)):i.getRestoredColumn(l.get());for(var c=0;c tr > th"):[],e.$allHdrCells=u.merge(this.$hdrRows.find("th"),e.$hdrCellsClones),e.$allHdrCells.each(function(t){1 (www.blimp.se), Lucas Wiener & "Maggie Wachs (www.filamentgroup.com)"
* Licensed under MIT (https://github.com/nadangergeo/RWD-Table-Patterns/blob/master/LICENSE-MIT)
@@ -109,6 +109,14 @@
.table-responsive[data-pattern="priority-columns"] > .table {
margin-bottom: 0;
}
+.table-responsive[data-pattern="priority-columns"] > .table > thead > tr > th,
+.table-responsive[data-pattern="priority-columns"] > .table > tbody > tr > th,
+.table-responsive[data-pattern="priority-columns"] > .table > tfoot > tr > th,
+.table-responsive[data-pattern="priority-columns"] > .table > thead > tr > td,
+.table-responsive[data-pattern="priority-columns"] > .table > tbody > tr > td,
+.table-responsive[data-pattern="priority-columns"] > .table > tfoot > tr > td {
+ position: relative;
+}
.table-responsive[data-pattern="priority-columns"] > .table-tighten > thead > tr > th,
.table-responsive[data-pattern="priority-columns"] > .table-tighten > tbody > tr > th,
.table-responsive[data-pattern="priority-columns"] > .table-tighten > tfoot > tr > th,
@@ -378,6 +386,7 @@ table.focus-on tfoot tr.focused td {
.sticky-table-header > .table > tbody > tr > td,
.sticky-table-header > .table > tfoot > tr > td {
border-color: var(--bs-border-color);
+ position: relative;
}
.sticky-table-header > .table-tighten > thead > tr > th,
.sticky-table-header > .table-tighten > tbody > tr > th,
@@ -412,3 +421,25 @@ table.focus-on tfoot tr.focused td {
.sticky-table-header > .table-bordered > tfoot > tr:last-child > td {
border-bottom: 0;
}
+.table-responsive[data-sorting-active=true] thead th:not([colSpan]),
+.table-responsive[data-sorting-active=true] thead th[colSpan="1"] {
+ cursor: pointer;
+ padding-right: 1.5rem;
+}
+.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted]:after,
+.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted]:after {
+ display: block;
+ width: auto;
+ height: auto;
+ position: absolute;
+ right: 5px;
+ bottom: 0.5rem;
+}
+.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted="asc"]:after,
+.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted="asc"]:after {
+ content: '↑';
+}
+.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted="desc"]:after,
+.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted="desc"]:after {
+ content: '↓';
+}
diff --git a/docs/css/rwd-table.min.css b/docs/css/rwd-table.min.css
index 79526ae..7089bf1 100644
--- a/docs/css/rwd-table.min.css
+++ b/docs/css/rwd-table.min.css
@@ -1,7 +1,7 @@
/*!
- * Responsive Tables v6.0.2 (http://gergeo.se/RWD-Table-Patterns)
+ * Responsive Tables v6.1.0 (http://gergeo.se/RWD-Table-Patterns)
* This is an awesome solution for responsive tables with complex data.
* Authors: Nadan Gergeo (www.blimp.se), Lucas Wiener & "Maggie Wachs (www.filamentgroup.com)"
* Licensed under MIT (https://github.com/nadangergeo/RWD-Table-Patterns/blob/master/LICENSE-MIT)
*/
-:root{--responsive-table-dropdown-hover-bg:#f2f2f2}.dropdown-menu>li.checkbox-row{padding:8px 16px}.dropdown-menu li.checkbox-row{display:block;display:flex;align-items:center;clear:both;font-weight:normal;line-height:calc(var(--bs-body-line-height) * 1rem);color:var(--bs-link-color);white-space:nowrap}.dropdown-menu li.checkbox-row label{font-size:.75rem;font-weight:600;margin-left:.5em;color:var(--bs-dark);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dropdown-menu li.checkbox-row:hover,.dropdown-menu li.checkbox-row input:hover,.dropdown-menu li.checkbox-row label:hover{cursor:pointer}.no-touch .dropdown-menu>.checkbox-row:hover,.no-touch .dropdown-menu>.checkbox-row:active{text-decoration:none;background-color:var(--responsive-table-dropdown-hover-bg)}.btn-toolbar{margin-bottom:calc(var(--bs-body-line-height) * 1rem)}.btn-toolbar .btn-outline-primary.btn-primary{color:var(--bs-white)}.lt-ie8 .btn-toolbar{display:none}.table-responsive{border-radius:var(--bs-border-radius);border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)}.table-responsive>.table{margin-bottom:0}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered thead tr:last-child{border-bottom-width:2px}.table-responsive>.table-bordered>thead,.table-responsive>.table-bordered>tbody,.table-responsive>.table-bordered>tfoot{border-color:var(--bs-border-color)}.table-responsive>.table-bordered>thead>th,.table-responsive>.table-bordered>tbody>th,.table-responsive>.table-bordered>tfoot>th,.table-responsive>.table-bordered>thead>td,.table-responsive>.table-bordered>tbody>td,.table-responsive>.table-bordered>tfoot>td{border-color:var(--bs-border-color)}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.table-responsive[data-pattern="priority-columns"]{width:100%;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar;border-radius:var(--bs-border-radius);border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);-webkit-overflow-scrolling:touch}.table-responsive[data-pattern="priority-columns"]>.table{margin-bottom:0}.table-responsive[data-pattern="priority-columns"]>.table-tighten>thead>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tbody>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tfoot>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>thead>tr>td,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tbody>tr>td,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tfoot>tr>td{white-space:nowrap}.table-responsive[data-pattern="priority-columns"]>.table-bordered{border:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr{border-color:var(--bs-border-color)}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr td{border-color:var(--bs-border-color)}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>td:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>td:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>td:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>td:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr:last-child>th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr:last-child>th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr:last-child>td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.table-responsive.absolute-solution{position:relative}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="0"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="0"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="0"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="0"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:none}.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="1"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="1"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"]{display:table-cell}@media screen and (min-width:480px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"]{display:table-cell}}@media screen and (min-width:640px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"]{display:table-cell}}@media screen and (min-width:800px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"]{display:table-cell}}@media screen and (min-width:960px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"]{display:table-cell}}@media screen and (min-width:1120px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:table-cell}}.mq.js .table-responsive[data-pattern="priority-columns"] th.cell-hide,.mq.js.lt-ie10 .sticky-table-header th.cell-hide,.mq.js .table-responsive[data-pattern="priority-columns"] td.cell-hide,.mq.js.lt-ie10 .sticky-table-header td.cell-hide{display:none}.mq.js .table-responsive[data-pattern="priority-columns"] th.cell-show,.mq.js.lt-ie10 .sticky-table-header th.cell-show,.mq.js .table-responsive[data-pattern="priority-columns"] td.cell-show,.mq.js.lt-ie10 .sticky-table-header td.cell-show{display:table-cell}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"] th.cell-show,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header th.cell-show,.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"] td.cell-show,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header td.cell-show{display:inline}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all th,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all th,.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all td,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all td{display:inline !important}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all th[data-priority="-1"],.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all th[data-priority="-1"],.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all td[data-priority="-1"],.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all td[data-priority="-1"]{display:none !important}.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all th,.mq.js.lt-ie10 .sticky-table-header table.display-all th,.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all td,.mq.js.lt-ie10 .sticky-table-header table.display-all td{display:table-cell !important}.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all th[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header table.display-all th[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all td[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header table.display-all td[data-priority="-1"]{display:none !important}table.table-small-font{font-size:.85rem;-webkit-text-size-adjust:none;line-height:var(--bs-body-line-height)}table.focus-on tbody tr:hover,table.focus-on tfoot tr:hover{cursor:pointer}table.focus-on tbody tr.unfocused th,table.focus-on tfoot tr.unfocused th,table.focus-on tbody tr.unfocused td,table.focus-on tfoot tr.unfocused td{color:var(--bs-gray);opacity:.75}table.focus-on tbody tr.focused th,table.focus-on tfoot tr.focused th,table.focus-on tbody tr.focused td,table.focus-on tfoot tr.focused td{background-color:var(--bs-primary);color:var(--bs-white);opacity:1 !important}.sticky-table-header{background-color:#fff;border:none;border-radius:0;border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);visibility:hidden;z-index:990;overflow:hidden}.fixed-solution .sticky-table-header{position:fixed;min-width:0}.absolute-solution .sticky-table-header{position:absolute;min-width:100%;top:0}.sticky-table-header.border-radius-fix{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.sticky-table-header>.table{margin-bottom:0}.sticky-table-header>.table>thead>tr,.sticky-table-header>.table>tbody>tr,.sticky-table-header>.table>tfoot>tr{border-color:var(--bs-border-color)}.sticky-table-header>.table>thead>tr>th,.sticky-table-header>.table>tbody>tr>th,.sticky-table-header>.table>tfoot>tr>th,.sticky-table-header>.table>thead>tr>td,.sticky-table-header>.table>tbody>tr>td,.sticky-table-header>.table>tfoot>tr>td{border-color:var(--bs-border-color)}.sticky-table-header>.table-tighten>thead>tr>th,.sticky-table-header>.table-tighten>tbody>tr>th,.sticky-table-header>.table-tighten>tfoot>tr>th,.sticky-table-header>.table-tighten>thead>tr>td,.sticky-table-header>.table-tighten>tbody>tr>td,.sticky-table-header>.table-tighten>tfoot>tr>td{white-space:nowrap}.sticky-table-header>.table-bordered{border:0}.sticky-table-header>.table-bordered>thead>tr>th:first-child,.sticky-table-header>.table-bordered>tbody>tr>th:first-child,.sticky-table-header>.table-bordered>tfoot>tr>th:first-child,.sticky-table-header>.table-bordered>thead>tr>td:first-child,.sticky-table-header>.table-bordered>tbody>tr>td:first-child,.sticky-table-header>.table-bordered>tfoot>tr>td:first-child{border-left:0}.sticky-table-header>.table-bordered>thead>tr>th:last-child,.sticky-table-header>.table-bordered>tbody>tr>th:last-child,.sticky-table-header>.table-bordered>tfoot>tr>th:last-child,.sticky-table-header>.table-bordered>thead>tr>td:last-child,.sticky-table-header>.table-bordered>tbody>tr>td:last-child,.sticky-table-header>.table-bordered>tfoot>tr>td:last-child{border-right:0}.sticky-table-header>.table-bordered>tbody>tr:last-child>th,.sticky-table-header>.table-bordered>tfoot>tr:last-child>th,.sticky-table-header>.table-bordered>tbody>tr:last-child>td,.sticky-table-header>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}
\ No newline at end of file
+:root{--responsive-table-dropdown-hover-bg:#f2f2f2}.dropdown-menu>li.checkbox-row{padding:8px 16px}.dropdown-menu li.checkbox-row{display:block;display:flex;align-items:center;clear:both;font-weight:normal;line-height:calc(var(--bs-body-line-height) * 1rem);color:var(--bs-link-color);white-space:nowrap}.dropdown-menu li.checkbox-row label{font-size:.75rem;font-weight:600;margin-left:.5em;color:var(--bs-dark);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.dropdown-menu li.checkbox-row:hover,.dropdown-menu li.checkbox-row input:hover,.dropdown-menu li.checkbox-row label:hover{cursor:pointer}.no-touch .dropdown-menu>.checkbox-row:hover,.no-touch .dropdown-menu>.checkbox-row:active{text-decoration:none;background-color:var(--responsive-table-dropdown-hover-bg)}.btn-toolbar{margin-bottom:calc(var(--bs-body-line-height) * 1rem)}.btn-toolbar .btn-outline-primary.btn-primary{color:var(--bs-white)}.lt-ie8 .btn-toolbar{display:none}.table-responsive{border-radius:var(--bs-border-radius);border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)}.table-responsive>.table{margin-bottom:0}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered thead tr:last-child{border-bottom-width:2px}.table-responsive>.table-bordered>thead,.table-responsive>.table-bordered>tbody,.table-responsive>.table-bordered>tfoot{border-color:var(--bs-border-color)}.table-responsive>.table-bordered>thead>th,.table-responsive>.table-bordered>tbody>th,.table-responsive>.table-bordered>tfoot>th,.table-responsive>.table-bordered>thead>td,.table-responsive>.table-bordered>tbody>td,.table-responsive>.table-bordered>tfoot>td{border-color:var(--bs-border-color)}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.table-responsive[data-pattern="priority-columns"]{width:100%;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar;border-radius:var(--bs-border-radius);border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);-webkit-overflow-scrolling:touch}.table-responsive[data-pattern="priority-columns"]>.table{margin-bottom:0}.table-responsive[data-pattern="priority-columns"]>.table>thead>tr>th,.table-responsive[data-pattern="priority-columns"]>.table>tbody>tr>th,.table-responsive[data-pattern="priority-columns"]>.table>tfoot>tr>th,.table-responsive[data-pattern="priority-columns"]>.table>thead>tr>td,.table-responsive[data-pattern="priority-columns"]>.table>tbody>tr>td,.table-responsive[data-pattern="priority-columns"]>.table>tfoot>tr>td{position:relative}.table-responsive[data-pattern="priority-columns"]>.table-tighten>thead>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tbody>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tfoot>tr>th,.table-responsive[data-pattern="priority-columns"]>.table-tighten>thead>tr>td,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tbody>tr>td,.table-responsive[data-pattern="priority-columns"]>.table-tighten>tfoot>tr>td{white-space:nowrap}.table-responsive[data-pattern="priority-columns"]>.table-bordered{border:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr{border-color:var(--bs-border-color)}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr td{border-color:var(--bs-border-color)}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>th:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>td:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>td:first-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>th:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>thead>tr>td:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr>td:last-child,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr:last-child>th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr:last-child>th,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tbody>tr:last-child>td,.table-responsive[data-pattern="priority-columns"]>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.table-responsive.absolute-solution{position:relative}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="0"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="0"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="0"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="0"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:none}.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="1"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="1"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="1"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="1"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="1"]{display:table-cell}@media screen and (min-width:480px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="2"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="2"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="2"]{display:table-cell}}@media screen and (min-width:640px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="3"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="3"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="3"]{display:table-cell}}@media screen and (min-width:800px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="4"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="4"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="4"]{display:table-cell}}@media screen and (min-width:960px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="5"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="5"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="5"]{display:table-cell}}@media screen and (min-width:1120px){.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.lt-ie9.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.lt-ie9.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:inline}.mq.js .table-responsive[data-pattern="priority-columns"] th[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header th[data-priority="6"],.mq.js .table-responsive[data-pattern="priority-columns"] td[data-priority="6"],.mq.js.lt-ie10 .sticky-table-header td[data-priority="6"]{display:table-cell}}.mq.js .table-responsive[data-pattern="priority-columns"] th.cell-hide,.mq.js.lt-ie10 .sticky-table-header th.cell-hide,.mq.js .table-responsive[data-pattern="priority-columns"] td.cell-hide,.mq.js.lt-ie10 .sticky-table-header td.cell-hide{display:none}.mq.js .table-responsive[data-pattern="priority-columns"] th.cell-show,.mq.js.lt-ie10 .sticky-table-header th.cell-show,.mq.js .table-responsive[data-pattern="priority-columns"] td.cell-show,.mq.js.lt-ie10 .sticky-table-header td.cell-show{display:table-cell}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"] th.cell-show,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header th.cell-show,.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"] td.cell-show,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header td.cell-show{display:inline}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all th,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all th,.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all td,.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all td{display:inline !important}.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all th[data-priority="-1"],.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all th[data-priority="-1"],.lt-ie9 .mq.js .table-responsive[data-pattern="priority-columns"].display-all td[data-priority="-1"],.lt-ie9 .mq.js.lt-ie10 .sticky-table-header.display-all td[data-priority="-1"]{display:none !important}.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all th,.mq.js.lt-ie10 .sticky-table-header table.display-all th,.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all td,.mq.js.lt-ie10 .sticky-table-header table.display-all td{display:table-cell !important}.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all th[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header table.display-all th[data-priority="-1"],.mq.js .table-responsive[data-pattern="priority-columns"] table.display-all td[data-priority="-1"],.mq.js.lt-ie10 .sticky-table-header table.display-all td[data-priority="-1"]{display:none !important}table.table-small-font{font-size:.85rem;-webkit-text-size-adjust:none;line-height:var(--bs-body-line-height)}table.focus-on tbody tr:hover,table.focus-on tfoot tr:hover{cursor:pointer}table.focus-on tbody tr.unfocused th,table.focus-on tfoot tr.unfocused th,table.focus-on tbody tr.unfocused td,table.focus-on tfoot tr.unfocused td{color:var(--bs-gray);opacity:.75}table.focus-on tbody tr.focused th,table.focus-on tfoot tr.focused th,table.focus-on tbody tr.focused td,table.focus-on tfoot tr.focused td{background-color:var(--bs-primary);color:var(--bs-white);opacity:1 !important}.sticky-table-header{background-color:#fff;border:none;border-radius:0;border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color);visibility:hidden;z-index:990;overflow:hidden}.fixed-solution .sticky-table-header{position:fixed;min-width:0}.absolute-solution .sticky-table-header{position:absolute;min-width:100%;top:0}.sticky-table-header.border-radius-fix{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.sticky-table-header>.table{margin-bottom:0}.sticky-table-header>.table>thead>tr,.sticky-table-header>.table>tbody>tr,.sticky-table-header>.table>tfoot>tr{border-color:var(--bs-border-color)}.sticky-table-header>.table>thead>tr>th,.sticky-table-header>.table>tbody>tr>th,.sticky-table-header>.table>tfoot>tr>th,.sticky-table-header>.table>thead>tr>td,.sticky-table-header>.table>tbody>tr>td,.sticky-table-header>.table>tfoot>tr>td{border-color:var(--bs-border-color);position:relative}.sticky-table-header>.table-tighten>thead>tr>th,.sticky-table-header>.table-tighten>tbody>tr>th,.sticky-table-header>.table-tighten>tfoot>tr>th,.sticky-table-header>.table-tighten>thead>tr>td,.sticky-table-header>.table-tighten>tbody>tr>td,.sticky-table-header>.table-tighten>tfoot>tr>td{white-space:nowrap}.sticky-table-header>.table-bordered{border:0}.sticky-table-header>.table-bordered>thead>tr>th:first-child,.sticky-table-header>.table-bordered>tbody>tr>th:first-child,.sticky-table-header>.table-bordered>tfoot>tr>th:first-child,.sticky-table-header>.table-bordered>thead>tr>td:first-child,.sticky-table-header>.table-bordered>tbody>tr>td:first-child,.sticky-table-header>.table-bordered>tfoot>tr>td:first-child{border-left:0}.sticky-table-header>.table-bordered>thead>tr>th:last-child,.sticky-table-header>.table-bordered>tbody>tr>th:last-child,.sticky-table-header>.table-bordered>tfoot>tr>th:last-child,.sticky-table-header>.table-bordered>thead>tr>td:last-child,.sticky-table-header>.table-bordered>tbody>tr>td:last-child,.sticky-table-header>.table-bordered>tfoot>tr>td:last-child{border-right:0}.sticky-table-header>.table-bordered>tbody>tr:last-child>th,.sticky-table-header>.table-bordered>tfoot>tr:last-child>th,.sticky-table-header>.table-bordered>tbody>tr:last-child>td,.sticky-table-header>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}.table-responsive[data-sorting-active=true] thead th:not([colSpan]),.table-responsive[data-sorting-active=true] thead th[colSpan="1"]{cursor:pointer;padding-right:1.5rem}.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted]:after,.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted]:after{display:block;width:auto;height:auto;position:absolute;right:5px;bottom:.5rem}.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted="asc"]:after,.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted="asc"]:after{content:'↑'}.table-responsive[data-sorting-active=true] thead th:not([colSpan])[data-sorted="desc"]:after,.table-responsive[data-sorting-active=true] thead th[colSpan="1"][data-sorted="desc"]:after{content:'↓'}
\ No newline at end of file
diff --git a/docs/index.html b/docs/index.html
index 955e849..d753ee6 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -41,8 +41,8 @@
-
-
+
+
-
+