From f22e39a5745fcdf745aa2af0917ca62ef7598904 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 7 Jul 2011 02:28:57 +0200 Subject: [PATCH] highlight selected files in the filebrowser --- files/css/files.css | 1 + files/js/files.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/files/css/files.css b/files/css/files.css index 9e0361327db..a3d098b9116 100644 --- a/files/css/files.css +++ b/files/css/files.css @@ -76,6 +76,7 @@ table { } tbody tr:hover, tbody tr:active { background-color:#eee; } +tbody tr.selected { background-color:#ccc; } tbody a { color:#000; } table td.filesize, table td.date diff --git a/files/js/files.js b/files/js/files.js index 2434fceff43..408bd6e48a0 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -31,15 +31,19 @@ $(document).ready(function() { // Sets the select_all checkbox behaviour : $('#select_all').click(function() { - if($(this).attr('checked')) + if($(this).attr('checked')){ // Check all $('td.selection input:checkbox').attr('checked', true); - else + $('td.selection input:checkbox').parent().parent().addClass('selected'); + }else{ // Uncheck all $('td.selection input:checkbox').attr('checked', false); + $('td.selection input:checkbox').parent().parent().removeClass('selected'); + } }); $('td.selection input:checkbox').live('click',function() { + $(this).parent().parent().toggleClass('selected'); if(!$(this).attr('checked')){ $('#select_all').attr('checked',false); }else{ -- 2.39.5