]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix event handler after re-expanding an artist in collection view
authorRobin Appelman <icewind1991@gmail.com>
Thu, 12 Jan 2012 00:18:27 +0000 (01:18 +0100)
committerRobin Appelman <icewind1991@gmail.com>
Thu, 12 Jan 2012 00:18:27 +0000 (01:18 +0100)
apps/media/js/collection.js

index b55bbe5107ca151761aa4788f121299618fbafd5..6525df55c713cf286701a99658432383b54f1892 100644 (file)
@@ -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);
                        }