Commit 792638dd authored by Christophe Mutricy's avatar Christophe Mutricy

Reimplement [14768] with a CSS. Patch by Laurent Mutricy.

parent 6829def4
...@@ -434,19 +434,17 @@ function parse_status() ...@@ -434,19 +434,17 @@ function parse_status()
} }
if( status.getElementsByTagName( 'random' )[0].firstChild.data == "1" ) if( status.getElementsByTagName( 'random' )[0].firstChild.data == "1" )
document.getElementById( 'btn_shuffle').style.background = 'rgb( 170, 170, 170 )'; document.getElementById( 'btn_shuffle').setAttribute( 'class', 'on' );
else else
document.getElementById( 'btn_shuffle').style.background = ''; document.getElementById( 'btn_shuffle').setAttribute( 'class', 'off' );
if( status.getElementsByTagName( 'loop' )[0].firstChild.data == "1" ) if( status.getElementsByTagName( 'loop' )[0].firstChild.data == "1" )
document.getElementById( 'btn_loop').style.background = 'rgb( 170, 170, 170 )'; document.getElementById( 'btn_loop').setAttribute( 'class', 'on' );
else else
document.getElementById( 'btn_loop').style.background = ''; document.getElementById( 'btn_loop').setAttribute( 'class', 'off' );
if( status.getElementsByTagName( 'repeat' )[0].firstChild.data == "1" ) if( status.getElementsByTagName( 'repeat' )[0].firstChild.data == "1" )
document.getElementById( 'btn_repeat').style.background = 'rgb( 170, 170, 170 )'; document.getElementById( 'btn_repeat').setAttribute( 'class', 'on' );
else else
document.getElementById( 'btn_repeat').style.background = ''; document.getElementById( 'btn_repeat').setAttribute( 'class', 'off' );
var tree = document.createElement( "ul" ); var tree = document.createElement( "ul" );
var categories = status.getElementsByTagName( 'category' ); var categories = status.getElementsByTagName( 'category' );
......
...@@ -179,3 +179,11 @@ div.mosaic_row { ...@@ -179,3 +179,11 @@ div.mosaic_row {
padding: 0.3em 0.3em; padding: 0.3em 0.3em;
background-color: #dfd; background-color: #dfd;
} }
div.controls button.on {
background-color: #aaa;
}
div.controls button.off {
background-color: #fff;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment