diff --git a/apps/media/js/collection.js b/apps/media/js/collection.js index b55bbe5107ca151761aa4788f121299618fbafd5..6525df55c713cf286701a99658432383b54f1892 100644 --- a/apps/media/js/collection.js +++ b/apps/media/js/collection.js @@ -231,6 +231,13 @@ Collection={ var newRow=tr; } newRow.find('td.title a').text(song.name); + newRow.find('td.title a').click(function(event){ + event.preventDefault(); + PlayList.add(song); + PlayList.play(0); + Collection.parent.find('tr').removeClass('active'); + $('tr[data-title="'+song.name+'"]').addClass('active'); + }); if(i>0){ lastRow.after(newRow); }