From e81c454b52e7aa8731c6ff8d5b9e88b602267b15 Mon Sep 17 00:00:00 2001 From: dtbuild Date: Mon, 5 Feb 2024 14:47:09 +0100 Subject: [PATCH] c4a6d189dc46579ce9e2484a412d2e8020b09506 New: Support for DataTables 2 Moving version of Select on to v2 as well since this have DT2 specific API dependencies now. Rather than trying to have it support both, it is a major version bump. b50d02725574578a11a36281f98eeedf6343f4af New: Real checkboxes for row selection through a new `DataTable.render.select()` renderer New: Row selection via keyboard with checkbox mode The legacy CSS checkboxes remain supported 90235e7db9e565807882aab0d1c58eaab79131f2 Fix: Remove use of `$.inArray` and replace with native function aa71000c5284eeaa6b6adcc82909599a0e02cfbe New: Column ordering is automatically handled by the `select` renderer. A new example demonstrates this. 509ea5ae57177be96a6e3e10e7b229cb6a4ab926 New: A checkbox is added to the header when using the checkbox renderer, to summarise current checked state, and allow a select / deselect all action. New: `-init select.headerCheckbox` option which can be used to disable the new header checkbox. b224afe6953f01590b2313ff1ca7cde383e772ea Dev: Stop propagation of a click on the header checkbox causing a sort b6473736dfee9bde2b0beec6dd650c2a962f0fee Update: Legacy `select-checkbox` class now uses only `:before` pseudo element rather than `:before` and `:after`. The styling is still the same, but it frees up the `:after` for other use (FixedColumns new shading specifically). DD-2739 cbca087247dc2d87eae296b939149c65b6d602aa Dev fixes: Changes for styling integration with new and legacy checkboxes 7f8452eebe94dd96be55f1adb833d1e604e8c36c Dev - fix: Had removed the legacy checkbox ordering. Reinstating. 904ee11d22472e5c0a36c4fc6e4ecedc2154fcb3 Dev fix: Better name for example DD-2732 3352e1bffb7f3b35d5f66ac9a0beff2049659305 New: `aria-label` attribute values can be set for the checkboxes used in table row selection and the select all header checkbox. DD-2734 91752d54d2c67e322e7540a6ceaaa7c54ce12d7e Dev - fix: State saving wasn't working for row selection DD-2733 9f581e95d783aa27933008a53c4ea3b294c11062 Fix: Consistent code formatting for documentation and examples 69ac023ee7c013a12fc4276ab61b3d98c9be732a Dev fix: Missing varible 67d0cdeef1e273e902529ce085c4b4a7d9b7218a Dev: Tweak to example title 930e65eba8021822daabcadc69a7b3209af5bf46 Fix - types: No implicit any would result in errors https://datatables.net/forums/discussion/77873 bd404eb094e3a9dc69e26082716a067541c4884c Fix: Background colour for column and cell selection wasn't matching the row selection. DD-2821 5d64c663dc57bd5027391870f6a3d428a1288594 Dev: Checkbox colour e88bae784819bda9112ec8007bedbab394a2a3bd Dev fix: The checkbox rendered should reflect the checked state at the point of being rendered Noticed when working with Editor and inline editing and checkboxes. Editor would trigger the row to be updated resulting in the checkbox being rerendered and not checked, even although the row was still selected (and had the selected class) dbd5a4babdc2bed601e97487c0225d85c9f9804b Dev fix: Incorrect doc structure for refs 00d938e288a596cd21896cfa8f9101712354bb0e Dev: Provide a way to get and set the last selected cell I'm keeping this undocumented at the moment, but it might go public at some point. It is needed for SearchPanes with DT2 due to the sparse indexes and SP rmoving and then readding rows. Sync to source repo @00d938e288a596cd21896cfa8f9101712354bb0e --- css/select.jqueryui.css | 2 +- css/select.jqueryui.min.css | 2 +- datatables.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/css/select.jqueryui.css b/css/select.jqueryui.css index c73ac04..b0916c1 100644 --- a/css/select.jqueryui.css +++ b/css/select.jqueryui.css @@ -1,6 +1,6 @@ table.dataTable > tbody > tr > .selected { background-color: rgba(13, 110, 253, 0.9); - color: inherit; + color: white; } table.dataTable > tbody > tr > .dt-select { text-align: center; diff --git a/css/select.jqueryui.min.css b/css/select.jqueryui.min.css index a4f5303..93e7588 100644 --- a/css/select.jqueryui.min.css +++ b/css/select.jqueryui.min.css @@ -1 +1 @@ -table.dataTable>tbody>tr>.selected{background-color:rgba(13, 110, 253, 0.9);color:inherit}table.dataTable>tbody>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select{text-align:center}table.dataTable input.dt-select-checkbox{appearance:none;position:relative;display:inline-block;width:12px;height:12px;border:1px solid;border-radius:3px;vertical-align:middle;margin-top:1px;color:inherit;font-size:20px;line-height:1em}table.dataTable input.dt-select-checkbox:checked:after{display:block;content:"✓";margin-top:-8px}table.dataTable input.dt-select-checkbox:indeterminate:after{display:block;position:absolute;content:" ";top:3px;left:3px;height:4px;width:4px;background-color:black;border-radius:2px}table.dataTable>tbody>tr.selected input.dt-select-checkbox:checked{border:1px solid}table.dataTable>tbody>tr>td.select-checkbox,table.dataTable>tbody>tr>th.select-checkbox{position:relative}table.dataTable>tbody>tr>td.select-checkbox:before,table.dataTable>tbody>tr>th.select-checkbox:before{display:block;position:absolute;top:50%;left:50%;width:12px;height:12px;box-sizing:border-box;content:" ";margin-top:-6px;margin-left:-6px;border:1px solid;border-radius:3px}table.dataTable>tbody>tr.selected>td.select-checkbox:before,table.dataTable>tbody>tr.selected>th.select-checkbox:before{border:1px solid;content:"✓";font-size:20px;line-height:6px;text-align:center}table.dataTable.compact>tbody>tr>td.select-checkbox:before,table.dataTable.compact>tbody>tr>th.select-checkbox:before{margin-top:-12px}table.dataTable.compact>tbody>tr.selected>td.select-checkbox:after,table.dataTable.compact>tbody>tr.selected>th.select-checkbox:after{margin-top:-16px}div.dt-container span.select-info,div.dt-container span.select-item{margin-left:.5em}html.dark table.dataTable input.dt-select-checkbox:indeterminate:after,html[data-bs-theme=dark] table.dataTable input.dt-select-checkbox:indeterminate:after{background-color:white}@media screen and (max-width: 640px){div.dt-container span.select-info,div.dt-container span.select-item{margin-left:0;display:block}} +table.dataTable>tbody>tr>.selected{background-color:rgba(13, 110, 253, 0.9);color:white}table.dataTable>tbody>tr>.dt-select{text-align:center;vertical-align:middle}table.dataTable>thead>tr>.dt-select{text-align:center}table.dataTable input.dt-select-checkbox{appearance:none;position:relative;display:inline-block;width:12px;height:12px;border:1px solid;border-radius:3px;vertical-align:middle;margin-top:1px;color:inherit;font-size:20px;line-height:1em}table.dataTable input.dt-select-checkbox:checked:after{display:block;content:"✓";margin-top:-8px}table.dataTable input.dt-select-checkbox:indeterminate:after{display:block;position:absolute;content:" ";top:3px;left:3px;height:4px;width:4px;background-color:black;border-radius:2px}table.dataTable>tbody>tr.selected input.dt-select-checkbox:checked{border:1px solid}table.dataTable>tbody>tr>td.select-checkbox,table.dataTable>tbody>tr>th.select-checkbox{position:relative}table.dataTable>tbody>tr>td.select-checkbox:before,table.dataTable>tbody>tr>th.select-checkbox:before{display:block;position:absolute;top:50%;left:50%;width:12px;height:12px;box-sizing:border-box;content:" ";margin-top:-6px;margin-left:-6px;border:1px solid;border-radius:3px}table.dataTable>tbody>tr.selected>td.select-checkbox:before,table.dataTable>tbody>tr.selected>th.select-checkbox:before{border:1px solid;content:"✓";font-size:20px;line-height:6px;text-align:center}table.dataTable.compact>tbody>tr>td.select-checkbox:before,table.dataTable.compact>tbody>tr>th.select-checkbox:before{margin-top:-12px}table.dataTable.compact>tbody>tr.selected>td.select-checkbox:after,table.dataTable.compact>tbody>tr.selected>th.select-checkbox:after{margin-top:-16px}div.dt-container span.select-info,div.dt-container span.select-item{margin-left:.5em}html.dark table.dataTable input.dt-select-checkbox:indeterminate:after,html[data-bs-theme=dark] table.dataTable input.dt-select-checkbox:indeterminate:after{background-color:white}@media screen and (max-width: 640px){div.dt-container span.select-info,div.dt-container span.select-item{margin-left:0;display:block}} diff --git a/datatables.json b/datatables.json index a8204b5..b12c038 100644 --- a/datatables.json +++ b/datatables.json @@ -14,5 +14,5 @@ ], "src-repo": "http://github.com/DataTables/Select", "last-tag": "1.7.0", - "last-sync": "80dcd370f754f85fe101f35d176736a65466d7e0" + "last-sync": "00d938e288a596cd21896cfa8f9101712354bb0e" } \ No newline at end of file