highlight selected files in the filebrowser

This commit is contained in:
Robin Appelman 2011-07-07 02:28:57 +02:00
parent 45bda0997f
commit f22e39a574
2 changed files with 7 additions and 2 deletions

View File

@ -76,6 +76,7 @@ table {
} }
tbody tr:hover, tbody tr:active { background-color:#eee; } tbody tr:hover, tbody tr:active { background-color:#eee; }
tbody tr.selected { background-color:#ccc; }
tbody a { color:#000; } tbody a { color:#000; }
table td.filesize, table td.date table td.filesize, table td.date

View File

@ -31,15 +31,19 @@ $(document).ready(function() {
// Sets the select_all checkbox behaviour : // Sets the select_all checkbox behaviour :
$('#select_all').click(function() { $('#select_all').click(function() {
if($(this).attr('checked')) if($(this).attr('checked')){
// Check all // Check all
$('td.selection input:checkbox').attr('checked', true); $('td.selection input:checkbox').attr('checked', true);
else $('td.selection input:checkbox').parent().parent().addClass('selected');
}else{
// Uncheck all // Uncheck all
$('td.selection input:checkbox').attr('checked', false); $('td.selection input:checkbox').attr('checked', false);
$('td.selection input:checkbox').parent().parent().removeClass('selected');
}
}); });
$('td.selection input:checkbox').live('click',function() { $('td.selection input:checkbox').live('click',function() {
$(this).parent().parent().toggleClass('selected');
if(!$(this).attr('checked')){ if(!$(this).attr('checked')){
$('#select_all').attr('checked',false); $('#select_all').attr('checked',false);
}else{ }else{