1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-10 04:24:45 +02:00

Table-row highlighting working again.

This commit is contained in:
Cameron
2013-04-29 22:19:38 -07:00
parent a5a13409d1
commit 7c7c417f7f
4 changed files with 30 additions and 8 deletions

View File

@@ -439,17 +439,34 @@ $(document).ready(function()
});
// highlight checked row
$(".adminlist input[type=\"checkbox\"].checkbox").click(function(evt){
$(".adminlist input[type='checkbox']").click(function(evt){
var cls = $(this).closest("tr").attr('class');
// alert(cls);
if(this.checked)
{
$(this).closest("tr").switchClass( "odd", "highlight-odd", 0 );
$(this).closest("tr").switchClass( "even", "highlight-even", 0 );
if(cls == 'odd' || cls == 'highlight-odd')
{
$(this).closest("tr").switchClass( "odd", "highlight-odd", 0 );
}
else
{
$(this).closest("tr").switchClass( "even", "highlight-even", 0 );
}
}
else
{
$(this).closest("tr").switchClass( "highlight-even", "even", 300 );
$(this).closest("tr").switchClass( "highlight-odd", "odd", 300 );
if(cls == 'highlight-odd' || cls =='odd')
{
$(this).closest("tr").switchClass( "highlight-odd", "odd", 300 );
}
else
{
$(this).closest("tr").switchClass( "highlight-even", "even", 300 );
}
}
});