summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorBlueRaja <BlueRaja.admin@gmail.com>2012-10-01 01:26:18 -0500
committerBlueRaja <BlueRaja.admin@gmail.com>2012-10-01 01:26:18 -0500
commit692b24631dec76ed6adc784776e6c797208cf184 (patch)
treec6d9472971d0840ba5783e543bdcfd98e56a116a /js
parent9da319e2a2bed9ea3fab92b4e6b799bb9eb16632 (diff)
downloadpathery-692b24631dec76ed6adc784776e6c797208cf184.tar.xz
Challenges now update automatically upon completion (without needing to refresh)
Diffstat (limited to 'js')
-rw-r--r--js/mapspecs.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js
index 30a8ec7..c15e3af 100644
--- a/js/mapspecs.js
+++ b/js/mapspecs.js
@@ -294,6 +294,17 @@ function request_path_done() {
animatePath(JO.path[i].path, mapid, JO.path[i].start, i);
}
mapdata[JO.mapid].pathsPending = i;
+
+ //Mark off challenges
+ if(isChallenge)
+ {
+ for(var i = 0; i < JO.completedChallenges.length; i++)
+ {
+ var challengeId = JO.completedChallenges[i];
+ document.getElementById("challenge_id_" + challengeId).className = "challenge_complete";
+ }
+ }
+
}
function decryptJSON(text) {