1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-07 23:26:41 +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

@@ -29,6 +29,9 @@ min-height:50px;
background-color: rgb(54, 54, 54); background-color: rgb(54, 54, 54);
} }
tr.highlight-odd { background-color: #212121; }
tr.highlight-even { background-color: #212121; }
.table-striped tbody > tr.highlight-odd td { background-color: transparent }
/* /*

View File

@@ -46,4 +46,7 @@ body { background-color: #EEEEEE; }
.tab-pane table.adminform td { border-top:0px} .tab-pane table.adminform td { border-top:0px}
tr.highlight-even { background-color: silver; }
tr.highlight-odd { background-color: silver; }
th, .fcaption { color: rgb(102, 102, 102); background-image: -moz-linear-gradient(center top , rgb(253, 253, 253) 0%, rgb(234, 234, 234) 100%); } th, .fcaption { color: rgb(102, 102, 102); background-image: -moz-linear-gradient(center top , rgb(253, 253, 253) 0%, rgb(234, 234, 234) 100%); }

View File

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

View File

@@ -439,17 +439,34 @@ $(document).ready(function()
}); });
// highlight checked row // 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) if(this.checked)
{ {
$(this).closest("tr").switchClass( "odd", "highlight-odd", 0 ); if(cls == 'odd' || cls == 'highlight-odd')
$(this).closest("tr").switchClass( "even", "highlight-even", 0 ); {
$(this).closest("tr").switchClass( "odd", "highlight-odd", 0 );
}
else
{
$(this).closest("tr").switchClass( "even", "highlight-even", 0 );
}
} }
else else
{ {
$(this).closest("tr").switchClass( "highlight-even", "even", 300 ); if(cls == 'highlight-odd' || cls =='odd')
$(this).closest("tr").switchClass( "highlight-odd", "odd", 300 ); {
$(this).closest("tr").switchClass( "highlight-odd", "odd", 300 );
}
else
{
$(this).closest("tr").switchClass( "highlight-even", "even", 300 );
}
} }
}); });