From 76b20a6067ba09de6d689ee3e44d6e9f8bb0134a Mon Sep 17 00:00:00 2001 From: Antoine Cellerier Date: Wed, 15 Mar 2006 19:33:10 +0000 Subject: [PATCH] "[PATCH] http interface : fix the shuffle/loop/repeat buttons" by Laurent Mutricy --- share/http/js/functions.js | 15 +++++++++++++++ share/http/requests/status.xml | 7 ++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/share/http/js/functions.js b/share/http/js/functions.js index f0b2bd1b2e..78d6b1bd05 100644 --- a/share/http/js/functions.js +++ b/share/http/js/functions.js @@ -433,6 +433,21 @@ function parse_status() document.getElementById( 'btn_pause' ).setAttribute( 'title', 'Play' ); } + if( status.getElementsByTagName( 'random' )[0].firstChild.data == "1" ) + document.getElementById( 'btn_shuffle').style.background = 'rgb( 170, 170, 170 )'; + else + document.getElementById( 'btn_shuffle').style.background = ''; + + if( status.getElementsByTagName( 'loop' )[0].firstChild.data == "1" ) + document.getElementById( 'btn_loop').style.background = 'rgb( 170, 170, 170 )'; + else + document.getElementById( 'btn_loop').style.background = ''; + + if( status.getElementsByTagName( 'repeat' )[0].firstChild.data == "1" ) + document.getElementById( 'btn_repeat').style.background = 'rgb( 170, 170, 170 )'; + else + document.getElementById( 'btn_repeat').style.background = ''; + var tree = document.createElement( "ul" ); var categories = status.getElementsByTagName( 'category' ); var i; diff --git a/share/http/requests/status.xml b/share/http/requests/status.xml index 334b6d14dc..a0f70e5c0b 100644 --- a/share/http/requests/status.xml +++ b/share/http/requests/status.xml @@ -69,10 +69,10 @@ - + - + @@ -99,7 +99,8 @@ - + + -- 2.39.2