]> source.dussan.org Git - nextcloud-server.git/commitdiff
open the correct subpage when the media player loads
authorRobin Appelman <icewind1991@gmail.com>
Fri, 29 Jul 2011 22:32:09 +0000 (00:32 +0200)
committerRobin Appelman <icewind1991@gmail.com>
Fri, 29 Jul 2011 22:32:09 +0000 (00:32 +0200)
apps/media/js/music.js
apps/media/js/playlist.js

index d43b260d1ebd0259a534262afe2b3bbe5f82ac16..b2464c3842f1caee644b202c27a1194def8e40e6 100644 (file)
@@ -12,6 +12,10 @@ $(document).ready(function(){
                PlayList.render();
                Collection.hide();
        });
+       var tab=window.location.href.slice(window.location.href.indexOf('#') + 1);
+       if(tab=='collection'){
+               $('#plugins a[href="#collection"]').trigger('click');
+       }
 });
 
 
index c278c507fabe4cde55a945787b2eb2d5b75fdee0..54fe5b792e7d8e9c8dff74019ea7eddaa7852db0 100644 (file)
@@ -26,8 +26,7 @@ PlayList.render=function(){
                tr.data('index',i);
                tr.click(function(){
                        PlayList.play($(this).data('index'));
-                       PlayList.parent.children('tr').removeClass('current');
-                       $(this).addClass('current');
+                       PlayList.render();
                });
                tr.hover(function(){
                        var button=$('<img class="remove" title="Remove"/>');