Minor - Changing row class when selecting a row with jquery

skala
Julio Montoya 13 years ago
parent 69c8fa8da2
commit 50939f3ed2
  1. 8
      main/inc/footer.inc.php
  2. 19
      main/template/default/layout/footer.tpl

@ -177,17 +177,17 @@ if (api_is_platform_admin()) {
?>
<script>
$(document).ready( function() {
$(".chzn-select").chosen();
$(".chzn-select").chosen();
//highlighting rows
$("form .data_table input:checkbox").click(function() {
if ($(this).is(":checked")) {
$(this).parentsUntil("tr").parent().addClass("row_selected");
} else {
$(this).parentsUntil("tr").parent().removeClass("row_selected");
$(this).parentsUntil("tr").parent().removeClass("row_selected");
}
});
});
</script>
</body>
</html>
</html>

@ -25,17 +25,30 @@
$(document).ready( function() {
$(".chzn-select").chosen();
//highlighting rows
/*$("form .data_table .row_even, form .data_table .row_odd").click(function(e) {
var $check = $(this).find("input:checkbox");
if ($check.is(":checked")) {
$(this).removeClass("row_selected");
$check.removeAttr('checked', 'checked');
} else {
$(this).addClass("row_selected");
$check.attr('checked', 'checked');
}
});*/
$("form .data_table input:checkbox").click(function() {
if ($(this).is(":checked")) {
$(this).parentsUntil("tr").parent().addClass("row_selected");
} else {
$(this).parentsUntil("tr").parent().removeClass("row_selected");
}
});
});
</script>
{/literal}
{$execution_stats}

Loading…
Cancel
Save