diff options
-rw-r--r-- | ajax/maps.ajax.php | 2 | ||||
-rw-r--r-- | css/stats.css | 22 | ||||
-rw-r--r-- | pages/scores.php | 17 |
3 files changed, 23 insertions, 18 deletions
diff --git a/ajax/maps.ajax.php b/ajax/maps.ajax.php index bd060fe..611080d 100644 --- a/ajax/maps.ajax.php +++ b/ajax/maps.ajax.php @@ -32,7 +32,7 @@ function getMapObjectByID($mapID) { list($code, $name, $mapExpireTime) = mysql_fetch_row($result);
$map = new map($code, $mapID);
$map->name = $name;
- $map->dateExpires = $mapExpireTime;
+ $map->dateExpires = strtotime($mapExpireTime);
return $map;
}
}
diff --git a/css/stats.css b/css/stats.css index 18f3708..f2d5d8e 100644 --- a/css/stats.css +++ b/css/stats.css @@ -34,37 +34,37 @@ background-color:#57a; } .mapNavCon { - height:150px; + height:135px; width:900px; margin-bottom:10px; } .mapNavLeft { float:left; width:40px; - height:150px; + height:135px; background-color:#358; border-radius:5px; } .mapNavRight { float:right; width:40px; - height:150px; + height:135px; background-color:#358; border-radius:5px; } .mapNavCenter { float:left; - height:150px; + height:135px; width:820px; background-color:#888; + white-space: nowrap; + overflow-x:hidden; + overflow-y:hidden; } #mapNavigation { - padding:15px; + padding:1px; background-color:#888; border-radius:10px; - height:120px; - width:790px; - text-align:left; white-space: nowrap; overflow-x:hidden; overflow-y:hidden; @@ -73,12 +73,12 @@ .mapThumbnail { display:inline-block; - padding: 10px; + padding: 8px; background-color:#334; - margin: 7px; + margin: 3px; border-radius:10px; cursor:pointer; - padding-top: 4px; + padding-top: 0px; } .mapThumbnail:hover { background-color:#445; diff --git a/pages/scores.php b/pages/scores.php index f995e62..933873c 100644 --- a/pages/scores.php +++ b/pages/scores.php @@ -99,7 +99,7 @@ var pointerDate; function getMapIDs(request) {
switch (request) {
case "next":
- if (pointerTime.getTime() + (24*60*60*1000) > serverTime.getTime()) {
+ if (pointerTime.getTime() > serverTime.getTime()) {
alert("Tomorrow hasn't happened yet. Alerts are bad. - TMP!");
return;
}
@@ -170,14 +170,17 @@ function addMapToNav(mapID) { $("#mapNavigation").append($newdiv1);
+ //var URLString = 'map/'+mapID+'.js';
+ var URLString = 'map/'+mapID;
+
$.ajax({
type: "GET",
- url: 'map/'+mapID,
+ url: URLString,
cache: true,
data: '',
fail: function() { alert("error"); },
complete: function(data) {
- $("#thumb_"+mapID).html(mapThumbnailHTML(decryptJSON(data.responseText), 100)).show('slow');
+ $("#thumb_"+mapID).html(mapThumbnailHTML(decryptJSON(data.responseText), 120)).show();
}
});
mapsInNav.push(mapID);
@@ -200,7 +203,7 @@ var Tile = {"Wall" : "w", "SinglePath" : "o"};
function mapThumbnailHTML(map, targetWidth) {
- if (!targetWidth) targetWidth = 100;
+ if (!targetWidth) targetWidth = 120;
var scale = map.width / targetWidth;
var width = parseInt(map.width / scale);
@@ -208,15 +211,17 @@ function mapThumbnailHTML(map, targetWidth) { var tileWidth = parseInt(width / map.width);
width = tileWidth * map.width;
+ height = tileWidth * map.height;
var mapgrid = '';
var mapClass = '';
var toolTip = 'Inactive map';
- var mapDate = new Date(map.dateExpires + " PST");
+ var mapDate = new Date(map.dateExpires*1000);
+ console.log("Dates: ", map.ID, mapDate, serverTime);
if (mapDate.getTime() > serverTime.getTime()) {
mapClass = ' current';
- toolTip = 'Active map';
+ toolTip = 'This map can still be played.';
}
var r = '';
|