From: Christophe Mutricy Date: Thu, 16 Mar 2006 20:19:54 +0000 (+0000) Subject: Reimplement [14768] with a CSS. Patch by Laurent Mutricy. X-Git-Tag: 0.9.0-test0~11893 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=792638ddfdf47e0e79b2608da5ed10ae41dd2690;p=vlc Reimplement [14768] with a CSS. Patch by Laurent Mutricy. --- diff --git a/share/http/js/functions.js b/share/http/js/functions.js index 78d6b1bd05..cc99f016b4 100644 --- a/share/http/js/functions.js +++ b/share/http/js/functions.js @@ -433,20 +433,18 @@ 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 = ''; + if( status.getElementsByTagName( 'random' )[0].firstChild.data == "1" ) + document.getElementById( 'btn_shuffle').setAttribute( 'class', 'on' ); + else + document.getElementById( 'btn_shuffle').setAttribute( 'class', 'off' ); + if( status.getElementsByTagName( 'loop' )[0].firstChild.data == "1" ) + document.getElementById( 'btn_loop').setAttribute( 'class', 'on' ); + else + document.getElementById( 'btn_loop').setAttribute( 'class', 'off' ); + if( status.getElementsByTagName( 'repeat' )[0].firstChild.data == "1" ) + document.getElementById( 'btn_repeat').setAttribute( 'class', 'on' ); + else + document.getElementById( 'btn_repeat').setAttribute( 'class', 'off' ); var tree = document.createElement( "ul" ); var categories = status.getElementsByTagName( 'category' ); diff --git a/share/http/style.css b/share/http/style.css index 780528a074..6699191b63 100644 --- a/share/http/style.css +++ b/share/http/style.css @@ -179,3 +179,11 @@ div.mosaic_row { padding: 0.3em 0.3em; background-color: #dfd; } +div.controls button.on { + background-color: #aaa; +} + +div.controls button.off { + background-color: #fff; +} +