Commit 1919376a authored by Ted Trask's avatar Ted Trask

Fix background color of selected rows using css and classes to work with tablesorter

parent 4e5a7d84
......@@ -49,12 +49,10 @@ end
array.push(this.id);
});
if (this.checked == false) {
$('.chktbl:checked').prop('checked', false);
$("#loglist").find('tr:not(#chktbl)').css("background-color","#FFF");
$('.chktbl:checked').prop('checked', false).closest('tr').removeClass("selected");
deselectdata = array.join("%0D%0A");
} else {
$('.chktbl:not(:checked)').prop('checked', true);
$("#loglist").find('tr:not(#chktbl)').css("background-color","#FC9A01");
$('.chktbl:not(:checked)').prop('checked', true).closest('tr').addClass("selected");
selectdata = array.join("%0D%0A");
}
$.getJSON(
......@@ -67,12 +65,12 @@ end
var selectdata = "";
var deselectdata = "";
if (this.checked == true) {
$(this).closest('tr').css("background-color","#FC9A01");
$(this).closest('tr').addClass("selected");
selectdata = this.id;
} else {
// If clearing, clear the Head too
$("#chkHead").prop("checked", false);
$(this).closest('tr').css("background-color","#ffffff");
$(this).closest('tr').removeClass("selected");
deselectdata = this.id;
}
$.getJSON(
......@@ -100,8 +98,26 @@ end
#content table { border-collapse: collapse; width: 100%; }
#content table td { border-bottom: none; white-space: normal; padding-right:20px; }
#content table th { border-bottom: none; white-space: normal; vertical-align: middle; padding-right:15px }
#content table tr.mark { background: #E9E9E9; }
#content table tr.selected { background: #FC9A01; }
.tablesorter-blue tbody > tr.even.selected > td,
.tablesorter-blue tbody > tr.even.selected + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even.selected + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #FDAD31;
}
.tablesorter-blue tbody > tr.odd.selected > td,
.tablesorter-blue tbody > tr.odd.selected + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd.selected + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #FC9A01;
}
.tablesorter-blue tbody > tr.even.selected:hover > td,
.tablesorter-blue tbody > tr.even.selected:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.even.selected:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #D48101;
}
.tablesorter-blue tbody > tr.odd.selected:hover > td,
.tablesorter-blue tbody > tr.odd.selected:hover + tr.tablesorter-childRow > td,
.tablesorter-blue tbody > tr.odd.selected:hover + tr.tablesorter-childRow + tr.tablesorter-childRow > td {
background: #CA7B01;
}
</style>
<H1>Search Parameters</H1>
......@@ -162,7 +178,6 @@ end %>
<% for i,watch in ipairs(subdata) do
local a,b = math.modf((i/2))
local mark = ''
if (b == 0) and watch.selected ~= "t" then mark=' class="mark"' end
if watch.selected == "t" then mark=' class="selected"' end
local time = {}
time.year, time.month, time.day, time.hour, time.min, time.sec =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment