diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-02-28 14:43:19 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-02-28 14:43:19 -0800 |
commit | 672f658e6995f2b7851377e7c83b3c876c5e1ec2 (patch) | |
tree | afbf27ac6d1303bef47698cf04476c6c519e3725 | |
parent | abf2f39753d91baf132a0d93512803096b1299fa (diff) | |
download | pathery-672f658e6995f2b7851377e7c83b3c876c5e1ec2.tar.xz |
Fixes for Challenges.
-rw-r--r-- | js/mapspecs.js | 6 | ||||
-rw-r--r-- | pages/challenge.php | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js index 283e3a8..3f2d3f6 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -803,11 +803,11 @@ function restoreSolution(mapid) { function displayMap(mapid, divID, goalSize, solution, moves, challengeMap) {
- var stringURL = 'map/'+mapid+".js";
- if (challengeMap == true) stringURL = 'challenge/'+mapid+".js";
+ var stringURL = 'a/map/'+mapid+".js";
+ if (challengeMap == true) stringURL = 'a/challenge/'+mapid+".js";
$.ajax({
type: "GET",
- url: 'map/'+mapid+".js",
+ url: stringURL,
dataType: 'json',
cache: true,
data: '',
diff --git a/pages/challenge.php b/pages/challenge.php index e6dbff2..efc0361 100644 --- a/pages/challenge.php +++ b/pages/challenge.php @@ -97,7 +97,15 @@ $challengeMapID = $_GET["challengeMapID"] + 0; if (!is_int($challengeMapID))
return;
-$mapContent = displayMap(GenerateMapByCode($mapCode), $_GET["challengeMapID"]);
+ $challengeID = $_GET["challengeMapID"];
+
+//$mapContent = displayMap(GenerateMapByCode($mapCode), $_GET["challengeMapID"]);
+
+$mapContent .= "<div id='innerChallengeMapDsp_$challengeID'>\n";
+$mapContent .= "</div>\n";
+$mapContent .= "<script>";
+$mapContent .= " displayMap($challengeID, 'innerChallengeMapDsp_$challengeID', false, '$mysolution', '$mymoves', true);";
+$mapContent .= "</script>";
$challengeResultset = loadChallengesForMap($challengeMapID, $userID);
if($challengeResultset === NULL)
{
|