mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Use classes for highlighting to ensure the alternate row colors are not lost when removing a column from the selection.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
/* global moment:false */
|
||||
|
||||
var tableApi;
|
||||
var colHighlightColor = "#ffefad";
|
||||
var tableFilters = [];
|
||||
|
||||
var replyTypes = [
|
||||
@@ -494,13 +493,13 @@ function applyColumnFiltering() {
|
||||
regex = "^" + value + "$";
|
||||
|
||||
// Add background color
|
||||
tableApi.$("td:eq(" + index + ")").css("background-color", colHighlightColor);
|
||||
tableApi.$("td:eq(" + index + ")").addClass("filter-highlight");
|
||||
|
||||
// Remember to show reset button
|
||||
showReset = true;
|
||||
} else {
|
||||
// Clear background color
|
||||
tableApi.$("td:eq(" + index + ")").css("background-color", "#fff");
|
||||
tableApi.$("td:eq(" + index + ")").removeClass("filter-highlight");
|
||||
}
|
||||
|
||||
// Apply filtering on this column (regex may be empty -> no filtering)
|
||||
|
||||
Reference in New Issue
Block a user