From e2f15e8407ba1a91f43cf9ab9933d9f31ed02bcc Mon Sep 17 00:00:00 2001 From: st3phhays Date: Wed, 13 Nov 2024 21:36:28 -0600 Subject: [PATCH] (#430) datatables.js Select > jQuery Duallistbox This removes the jQuery Duallistbox library in favor of the Select extension from datatables.js. --- package.json | 1 + scss/libraries/_datatables.scss | 20 +++++++++++++++++--- yarn.lock | 13 ++++++++++++- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index db5d1c51..fa6da739 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,7 @@ "cssnano": "^6.1.0", "datatables.net-bs5": "^2.0.8", "datatables.net-dt": "^2.0.8", + "datatables.net-select": "^2.1.0", "esbuild": "^0.20.1", "eslint": "^9.11.1", "eslint-config-standard": "^17.0.0", diff --git a/scss/libraries/_datatables.scss b/scss/libraries/_datatables.scss index 8ab60c73..31254498 100644 --- a/scss/libraries/_datatables.scss +++ b/scss/libraries/_datatables.scss @@ -30,9 +30,23 @@ div.dt-container div { } table.table.dataTable { - &.table-striped>tbody>tr:nth-of-type(odd)>* { - box-shadow: unset; - background: var(--bs-secondary-bg); + &.table-striped>tbody>tr { + &.selected>* { + box-shadow: unset !important; + } + + &.selected .bg-selected { + background-color: var(--bs-primary) !important; + color: var(--bs-primary-contrast) !important; + font-weight: bold !important; + } + } + + &.table-striped>tbody>tr:nth-of-type(odd) { + >* { + box-shadow: unset; + background: var(--bs-secondary-bg); + } } td.dt-type-date, diff --git a/yarn.lock b/yarn.lock index 0b1a3117..1e5ca941 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2506,6 +2506,7 @@ __metadata: cssnano: "npm:^6.1.0" datatables.net-bs5: "npm:^2.0.8" datatables.net-dt: "npm:^2.0.8" + datatables.net-select: "npm:^2.1.0" easymde: "npm:^2.16.1" esbuild: "npm:^0.20.1" eslint: "npm:^9.11.1" @@ -2960,7 +2961,17 @@ __metadata: languageName: node linkType: hard -"datatables.net@npm:2.1.8": +"datatables.net-select@npm:^2.1.0": + version: 2.1.0 + resolution: "datatables.net-select@npm:2.1.0" + dependencies: + datatables.net: "npm:^2" + jquery: "npm:>=1.7" + checksum: 10c0/a6e379c49e6d14e563c91b66a67337d9ea8bcdc8c00febc9f048b7083236961dc7219c354e662954e60783a5034aaa66f85a02fb0751317f132ce15202f2378c + languageName: node + linkType: hard + +"datatables.net@npm:2.1.8, datatables.net@npm:^2": version: 2.1.8 resolution: "datatables.net@npm:2.1.8" dependencies: