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

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

parent 6829def4
......@@ -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' );
......
......@@ -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;
}
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