summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-07-30 00:32:09 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-07-30 00:32:09 +0200
commit773d23bbd57833aa8216c3bc3be4f6f2b025aeb9 (patch)
treea313b253d8bc2633daa1658c97f5e9e23400e3f5
parent93dd1c57ccc68ec36b6a1deba5af2026990b2e4c (diff)
downloadnextcloud-server-773d23bbd57833aa8216c3bc3be4f6f2b025aeb9.tar.gz
nextcloud-server-773d23bbd57833aa8216c3bc3be4f6f2b025aeb9.zip
open the correct subpage when the media player loads
-rw-r--r--apps/media/js/music.js4
-rw-r--r--apps/media/js/playlist.js3
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/media/js/music.js b/apps/media/js/music.js
index d43b260d1eb..b2464c3842f 100644
--- a/apps/media/js/music.js
+++ b/apps/media/js/music.js
@@ -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');
+ }
});
diff --git a/apps/media/js/playlist.js b/apps/media/js/playlist.js
index c278c507fab..54fe5b792e7 100644
--- a/apps/media/js/playlist.js
+++ b/apps/media/js/playlist.js
@@ -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"/>');