diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-11-19 02:58:15 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-11-19 02:58:15 +0000 |
commit | 1919376ad4ee2a01c8262da9ff318f7adb96d744 (patch) | |
tree | 67aa44392c9db00a2a7ee8314ac898ea7e34dd2e | |
parent | 4e5a7d846a4fec01e649f6d5b99d9c6a7effd3ce (diff) | |
download | acf-weblog-1919376ad4ee2a01c8262da9ff318f7adb96d744.tar.bz2 acf-weblog-1919376ad4ee2a01c8262da9ff318f7adb96d744.tar.xz |
Fix background color of selected rows using css and classes to work with tablesorter
-rw-r--r-- | weblog-viewweblog-html.lsp | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/weblog-viewweblog-html.lsp b/weblog-viewweblog-html.lsp index 4d7a81d..b9bd092 100644 --- a/weblog-viewweblog-html.lsp +++ b/weblog-viewweblog-html.lsp @@ -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 = |