From 77321257e24b7628d58e05697c60d18d6243f8bb Mon Sep 17 00:00:00 2001 From: Andrew Karpow Date: Tue, 3 Dec 2013 12:48:52 +0100 Subject: [PATCH] design fixes --- htdocs/js/mpd.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/htdocs/js/mpd.js b/htdocs/js/mpd.js index 7d945eb..32136c0 100644 --- a/htdocs/js/mpd.js +++ b/htdocs/js/mpd.js @@ -79,9 +79,6 @@ function webSocketConnect() { var obj = JSON.parse(msg.data); switch (obj.type) { case "playlist": - //if(state.data.state !== 'nav_playlist') - // break; - console.log("Got Playlist..."); if(current_app !== 'playlist') break; @@ -107,9 +104,9 @@ function webSocketConnect() { .find('a').fadeTo('fast',1); }, click: function() { - $('#salamisandwich > tbody > tr').removeClass('success'); + $('#salamisandwich > tbody > tr').removeClass('active'); socket.send('MPD_API_PLAY_TRACK,'+$(this).attr('trackid')); - $(this).addClass('success'); + $(this).addClass('active'); }, mouseleave: function(){ $(this).children().last().find("a").stop().remove(); @@ -154,7 +151,7 @@ function webSocketConnect() { if($(this).attr("uri").length > 0) $(this).children().last().append( "" + + "onclick=\"socket.send('MPD_API_ADD_TRACK," + $(this).attr("uri") +"'); $(this).parents('tr').addClass('active');\">" + "") .find('a').fadeTo('fast',1); }, @@ -183,8 +180,8 @@ function webSocketConnect() { (elapsed_seconds < 10 ? '0' : '') + elapsed_seconds + " / " + total_minutes + ":" + (total_seconds < 10 ? '0' : '') + total_seconds); - $('#salamisandwich > tbody > tr').removeClass('success').css("font-weight", ""); - $('#salamisandwich > tbody > tr[trackid='+obj.data.currentsongid+']').addClass('success').css("font-weight", "bold"); + $('#salamisandwich > tbody > tr').removeClass('active').css("font-weight", ""); + $('#salamisandwich > tbody > tr[trackid='+obj.data.currentsongid+']').addClass('active').css("font-weight", "bold"); if(obj.data.random) $('#btnrandom').addClass("active") -- 2.20.1