summaryrefslogtreecommitdiffstats
path: root/pages
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-02-28 14:42:25 -0800
committerPatrick Davison <snapwilliam@gmail.com>2013-02-28 14:42:25 -0800
commitabf2f39753d91baf132a0d93512803096b1299fa (patch)
tree4ca1e86eb1f5c3d45393d76dff9cb4b42f3cb913 /pages
parent97b6742ddfcef31ded607e4334475052ba46795b (diff)
downloadpathery-abf2f39753d91baf132a0d93512803096b1299fa.tar.xz
Link to a specific solution in scores, and other tweaks.
Diffstat (limited to 'pages')
-rw-r--r--pages/scores.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/pages/scores.php b/pages/scores.php
index 9443673..70acbaa 100644
--- a/pages/scores.php
+++ b/pages/scores.php
@@ -49,6 +49,12 @@ function start() {
if (typeof(hashParts[1]) !== 'undefined') {
pointerMapID = hashParts[1];
}
+ if (typeof(hashParts[2]) !== 'undefined' && hashParts[2]-0 > 0) {
+ pointerPage = hashParts[2];
+ } else pointerPage = 1;
+ if (typeof(hashParts[3]) !== 'undefined') {
+ pointerUserID = hashParts[3];
+ }
//+1 because i'm gonna use prev.
pointerTime = new Date(dateSplit[0],dateSplit[1]-1,dateSplit[2]-0+1);
}
@@ -84,9 +90,10 @@ function displayMapScores(mapID) {
$('#scoreDisplay').empty();
newDiv.prependTo('#scoreDisplay');
}
- scoresShowPage(1, mapID);
$("#mapDisplay").fadeOut('fast');
displayMap(mapID, "mapDisplay", 682);
+ scoresShowPage(pointerPage, mapID);
+ //console.log(pointerPage, mapID);
}
@@ -95,9 +102,21 @@ function updateHash() {
tmp = tmp.split("#");
var anchorTag = tmp[0]+'#'+pointerDate;
anchorTag += "_"+pointerMapID;
+ if (pointerPage) anchorTag += "_"+pointerPage;
+ else anchorTag += "_";
+ if (pointerUserID) anchorTag += "_"+pointerUserID;
+ else anchorTag += "_";
document.location=anchorTag;
}
+var pointerPage = 1, pointerUserID
+function saveScoreLocation(page, userID) {
+ pointerPage = page;
+ pointerUserID = userID;
+ updateHash();
+ console.log("SaveScoreLoc");
+}
+
var pointerDate;
function getMapIDs(request) {
switch (request) {