Set the active clock in bold.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 23 Nov 2014 00:52:38 +0000 (01:52 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 23 Nov 2014 00:52:38 +0000 (01:52 +0100)
www/css/remoteglot.css
www/js/remoteglot.js

index 8551289..da0a3a6 100644 (file)
@@ -105,6 +105,9 @@ p {
        text-align: right;
        margin-right: 5px;
 }
+.running-clock {
+       font-weight: bold;
+}
 #analysis {
        display: block;
        min-width: 400px;
index 9635c91..5744c63 100644 (file)
@@ -851,16 +851,22 @@ var update_clock = function() {
                if (result === '1-0') {
                        $("#whiteclock").text("1");
                        $("#blackclock").text("0");
+                       $("#whiteclock").removeClass("running-clock");
+                       $("#blackclock").removeClass("running-clock");
                        return;
                }
                if (result === '1/2-1/2') {
                        $("#whiteclock").text("1/2");
                        $("#blackclock").text("1/2");
+                       $("#whiteclock").removeClass("running-clock");
+                       $("#blackclock").removeClass("running-clock");
                        return;
                }       
                if (result === '0-1') {
                        $("#whiteclock").text("0");
                        $("#blackclock").text("1");
+                       $("#whiteclock").removeClass("running-clock");
+                       $("#blackclock").removeClass("running-clock");
                        return;
                }
        }
@@ -899,6 +905,14 @@ var update_clock = function() {
 
        $("#whiteclock").text(white_clock);
        $("#blackclock").text(black_clock);
+
+       if (toplay == 'W') {
+               $("#whiteclock").addClass("running-clock");
+               $("#blackclock").removeClass("running-clock");
+       } else {
+               $("#whiteclock").removeClass("running-clock");
+               $("#blackclock").addClass("running-clock");
+       }
 }
 
 /**