From 0b7883cefbf99d4463feb56312b8a3f4b39e07ac Mon Sep 17 00:00:00 2001 From: Horilla Date: Fri, 17 Nov 2023 12:19:33 +0530 Subject: [PATCH] [ADD] GENERAL: Method to toggle the highlight for the check box --- templates/sidebar.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/sidebar.html b/templates/sidebar.html index f2951df99..2e4b7fba1 100755 --- a/templates/sidebar.html +++ b/templates/sidebar.html @@ -803,4 +803,12 @@ function highlightRow(checkbox) { checkbox.closest(".oh-sticky-table__tr").addClass("highlight-selected") } } +function toggleHighlight(ids){ + $.each(ids, function (indexInArray, id) { + $(`#${id}`).closest(".oh-sticky-table__tr").removeClass("highlight-selected") + if ($(`#${id}`).is(":checked")) { + $(`#${id}`).closest(".oh-sticky-table__tr").addClass("highlight-selected") + } + }); +}