diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-02-17 16:43:25 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-02-17 16:43:25 -0800 |
commit | d51b87d9a31f5914fe8509e6ac47eace1872d0ba (patch) | |
tree | 5221e63d08af6e7b6ec3cd278d691ea65cab259c /pages/scores.php | |
parent | e12ea632b28d9a0cba7c002fe37edc42bf291777 (diff) | |
download | pathery-d51b87d9a31f5914fe8509e6ac47eace1872d0ba.tar.xz |
Active maps now have a different color in the scoreboard.
Diffstat (limited to 'pages/scores.php')
-rw-r--r-- | pages/scores.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/pages/scores.php b/pages/scores.php index cf33b49..f995e62 100644 --- a/pages/scores.php +++ b/pages/scores.php @@ -200,10 +200,6 @@ var Tile = {"Wall" : "w", "SinglePath" : "o"};
function mapThumbnailHTML(map, targetWidth) {
- var r = '';
- r += "<div class='mapThumbnail' onclick='displayMapScores("+map.ID+")'>";
- r += map.name;
-
if (!targetWidth) targetWidth = 100;
var scale = map.width / targetWidth;
@@ -215,6 +211,18 @@ function mapThumbnailHTML(map, targetWidth) { var mapgrid = '';
+ var mapClass = '';
+ var toolTip = 'Inactive map';
+ var mapDate = new Date(map.dateExpires + " PST");
+ if (mapDate.getTime() > serverTime.getTime()) {
+ mapClass = ' current';
+ toolTip = 'Active map';
+ }
+
+ var r = '';
+ r += "<div class='mapThumbnail"+mapClass+"' title='"+toolTip+"'; onclick='displayMapScores("+map.ID+")'>";
+ r += map.name;
+
mapgrid += '<div class="map" style="width:'+width+'px; height:'+height+'px">';
for (var y in map.tiles) {
for (var x in map.tiles[y]) {
|