]> source.dussan.org Git - nextcloud-server.git/commitdiff
lots of music improvements, might break some things though
authorJan-Christoph Borchardt <JanCBorchardt@fsfe.org>
Sat, 24 Sep 2011 22:02:50 +0000 (00:02 +0200)
committerJan-Christoph Borchardt <JanCBorchardt@fsfe.org>
Sat, 24 Sep 2011 22:02:50 +0000 (00:02 +0200)
apps/media/css/music.css
apps/media/js/collection.js

index 59d10f74db52894bb296b2da44dab0713a103724..54b4bd624c09b77835de75ffd3f092411440a2b0 100644 (file)
@@ -9,7 +9,8 @@ div.jp-progress { position:absolute; overflow:hidden; top:.5em; left:8em; width:
 div.jp-seek-bar { background:#eee; width:0; height:100%; cursor:pointer; }
 div.jp-play-bar { background:#ccc; width:0; height:100%; }
 div.jp-seeking-bg { background:url("../img/pbar-ani.gif"); }
-div.jp-current-time,div.jp-duration { position:absolute; font-size:.64em; font-style:oblique; top:1em; left:13.5em; width:22em; }
+div.jp-current-time,div.jp-duration { position:absolute; font-size:.64em; font-style:oblique; top:1em; left:13.5em; }
+div.jp-duration { left:33em; }
 div.jp-duration { text-align:right; }
 
 a.jp-mute,a.jp-unmute { left:24em; }
@@ -27,14 +28,9 @@ div.jp-volume-bar-value { background:#ccc; width:0; height:0.4em; }
 #collection li { padding-right:10px; }
 #searchresults input.play, #searchresults input.add { float:left; height:1em; width:1em; }
 #collection tr.collapsed td.album, #collection tr.collapsed td.title { color:#ddd; }
-a.expander {  }
-tr.active { background-color:#eee; }
-tr.artist, tr.artist td {
-    border-top: 1px solid lightgrey;
-}
-tr.album td.artist {
-    padding-left: 20px;
-}
-tr.song td.artist {
-    padding-left: 40px;
-}
+a.expander { float:right; padding:0 1em; }
+tr.active td { background-color:#eee; font-weight:bold; }
+tr td { border-top:1px solid #eee; height:2.2em; }
+tr .artist img { vertical-align:middle; }
+tr.album td.artist { padding-left:1em; }
+tr.song td.artist { padding-left:2em; }
index 13eb0aff7d98a2901c8944e5900bea93384ef240..7eb027348cee59d536fb7403df4c13e534845d19 100644 (file)
@@ -217,25 +217,15 @@ Collection={
                }
        },
        addButtons:function(parent,data){
-        buttons = parent.find('.buttons');
-        if(buttons.find('.add').length<=0) {
-            buttons.append('<img class="add" src="'+OC.imagePath('core','actions/play-add')+'"/>');
-        }
-        if(buttons.find('.play').length<=0) {
-            buttons.append('<img class="play" src="'+OC.imagePath('core','actions/play')+'"/>');
-        }
+               buttons = parent.find('.buttons');
+               if(buttons.find('.add').length<=0) {
+                       buttons.prepend('<img class="add action" src="'+OC.imagePath('core','actions/play-add')+'" title="Add to playlist" />');
+               }
                buttons.find('.add').unbind('click');
                buttons.find('.add').click(function(event){
-            event.preventDefault();
+                       event.preventDefault();
                        PlayList.add(data,true);
-            PlayList.render();
-               });
-               buttons.find('.play').unbind('click');
-               buttons.find('.play').click(function(event){
-            event.preventDefault();
-                       PlayList.add(data);
-                       PlayList.play(0,0);
-            PlayList.render();
+                       PlayList.render();
                });
        },
        find:function(artistName,albumName,songName){