From c62d777cd17e72dd7068547d2e8aa47354387f1e Mon Sep 17 00:00:00 2001 From: BlueRaja Date: Thu, 7 Mar 2013 05:05:14 -0600 Subject: Added a border around the currently selected map --- pages/scores.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'pages') diff --git a/pages/scores.php b/pages/scores.php index 9b645c2..90c87bb 100644 --- a/pages/scores.php +++ b/pages/scores.php @@ -90,12 +90,16 @@ function displayMapScores(mapID) { $('#scoreDisplay').empty(); newDiv.prependTo('#scoreDisplay'); } + + //Set the 'selectedMap' class + $('.selectedMap').removeClass('selectedMap'); + var currentMapDiv = $('#thumb_'+mapID).children(); + currentMapDiv.addClass('selectedMap'); //Hack: display the "current map" div for currently running maps //Relies on the fact that the #thumb_ div has a single child with the 'current' class.. - var showCurrentMapMessage = $('#thumb_'+mapID).children().hasClass('current'); - $('#currentMapMessage').toggle(showCurrentMapMessage); - + var showCurrentMapMessage = currentMapDiv.hasClass('currentlyRunning'); + $('#currentlyRunningMessage').toggle(showCurrentMapMessage); $("#mapDisplay").fadeOut('fast'); displayMap(mapID, "mapDisplay", 682); @@ -103,7 +107,6 @@ function displayMapScores(mapID) { //console.log(pointerPage, mapID); } - function updateHash() { var tmp = document.location + ''; tmp = tmp.split("#"); @@ -247,10 +250,10 @@ function formatMapThumbForNav(json) { var mapClass = ''; var toolTip = 'Inactive map'; - var isActive = mapDate.getTime() > serverToday.getTime(); + var isCurrentlyRunning = mapDate.getTime() > serverToday.getTime(); - if (isActive) { - mapClass = ' current'; + if (isCurrentlyRunning) { + mapClass = ' currentlyRunning'; toolTip = 'This map can still be played.'; } @@ -289,7 +292,7 @@ topbar($Links);
-
This map is currently running, so points/solutions are not available
+
This map hasn't completed yet, so points/solutions are not available
-- cgit v1.2.3