Skip to content
Snippets Groups Projects
Commit aa7c6f05 authored by Robin Appelman's avatar Robin Appelman
Browse files

fix issue with selecting songs in playlist

parent 94e25ecb
Branches
No related tags found
No related merge requests found
...@@ -46,7 +46,7 @@ PlayList.render=function(){ ...@@ -46,7 +46,7 @@ PlayList.render=function(){
event.stopPropagation(); event.stopPropagation();
if($(this).attr('checked')){ if($(this).attr('checked')){
$(this).parent().parent().addClass('selected'); $(this).parent().parent().addClass('selected');
if($('td.name input:checkbox').length==$('td.name input:checkbox:checked').length){ if($('tbody td.name input:checkbox').length==$('tbody td.name input:checkbox:checked').length){
$('#selectAll').attr('checked',true); $('#selectAll').attr('checked',true);
} }
}else{ }else{
...@@ -59,7 +59,7 @@ PlayList.render=function(){ ...@@ -59,7 +59,7 @@ PlayList.render=function(){
} }
} }
PlayList.getSelected=function(){ PlayList.getSelected=function(){
return $('td.name input:checkbox:checked').parent().parent(); return $('tbody td.name input:checkbox:checked').parent().parent();
} }
PlayList.hide=function(){ PlayList.hide=function(){
$('#playlist').hide(); $('#playlist').hide();
...@@ -71,12 +71,12 @@ $(document).ready(function(){ ...@@ -71,12 +71,12 @@ $(document).ready(function(){
$('#selectAll').click(function(){ $('#selectAll').click(function(){
if($(this).attr('checked')){ if($(this).attr('checked')){
// Check all // Check all
$('td.name input:checkbox').attr('checked', true); $('tbody td.name input:checkbox').attr('checked', true);
$('td.name input:checkbox').parent().parent().addClass('selected'); $('tbody td.name input:checkbox').parent().parent().addClass('selected');
}else{ }else{
// Uncheck all // Uncheck all
$('td.name input:checkbox').attr('checked', false); $('tbody td.name input:checkbox').attr('checked', false);
$('td.name input:checkbox').parent().parent().removeClass('selected'); $('tbody td.name input:checkbox').parent().parent().removeClass('selected');
} }
procesSelection(); procesSelection();
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment