librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1243] Highlight the current song in the playlist


From: Michael Sheldon
Subject: [Librefm-commits] [1243] Highlight the current song in the playlist
Date: Wed, 06 May 2009 21:17:31 +0000

Revision: 1243
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1243
Author:   elleo
Date:     2009-05-06 21:17:29 +0000 (Wed, 06 May 2009)
Log Message:
-----------
Highlight the current song in the playlist

Modified Paths:
--------------
    trunk/nixtape/js/player.js

Modified: trunk/nixtape/js/player.js
===================================================================
--- trunk/nixtape/js/player.js  2009-05-06 20:53:47 UTC (rev 1242)
+++ trunk/nixtape/js/player.js  2009-05-06 21:17:29 UTC (rev 1243)
@@ -142,8 +142,9 @@
                } else {
                        playable_songs = true;
                }
-               $("#playlist > #songs").append("<li><a href='#' 
onclick='playSong(" + i + ")'>" + playlist[i]["artist"] + " - " + 
playlist[i]["track"] + "</li>");
+               $("#playlist > #songs").append("<li id='song-" + i + "'><a 
href='#' onclick='playSong(" + i + ")'>" + playlist[i]["artist"] + " - " + 
playlist[i]["track"] + "</li>");
        }
+       $("#song-" + current_song).css({fontWeight : "bold"});
 }
 
 function togglePlaylist() {
@@ -195,6 +196,11 @@
        artist = playlist[song]["artist"];
        album = playlist[song]["album"];
        track = playlist[song]["track"];
+
+       // Highlight current song in the playlist
+       $("#song-" + current_song).css({fontWeight : "normal"});
+       $("#song-" + song).css({fontWeight : "bold"});
+
        current_song = song;
        scrobbled = false;
        now_playing = false;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]