1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-03 03:13:34 +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

@@ -22,8 +22,7 @@ a.media-select-icon:hover { border:1px solid red; }
.media-select-active { border: 1px solid silver; }
.e-moving { background-color: silver; }
tr.highlight-even { background-color: silver; }
tr.highlight-odd { background-color: silver; }
legend { display: none; }
.chzn-choices { width: 350px; }
.e-autocomplete { display: none }

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 );
}
}
});