]> git.sesse.net Git - vlc/commitdiff
Reimplement [14768] with a CSS. Patch by Laurent Mutricy.
authorChristophe Mutricy <xtophe@videolan.org>
Thu, 16 Mar 2006 20:19:54 +0000 (20:19 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Thu, 16 Mar 2006 20:19:54 +0000 (20:19 +0000)
share/http/js/functions.js
share/http/style.css

index 78d6b1bd0571be46179b188be5117642b23ae78b..cc99f016b49c37284c808c3bf4129d9b704aa1cb 100644 (file)
@@ -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' );
index 780528a0748655fd070e21ac5de9e2e8e1a17293..6699191b63fec5f50841fabffce7ba765b39d618 100644 (file)
@@ -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;
+}
+