diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-03-07 21:42:14 -0800 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-03-07 21:42:14 -0800 |
commit | af0ee456d75304494e3eecfb8a9bd2b232e44fe6 (patch) | |
tree | b11254a8f2c5bdd90806b7547c5bf0ed334790dc /js/scores.js | |
parent | c230abd1f7ecc1139f9bef92208eced6849b2c78 (diff) | |
download | pathery-af0ee456d75304494e3eecfb8a9bd2b232e44fe6.tar.xz |
Scoreboard bugfixes and improvments, partial implementation of onhashchange.
Diffstat (limited to 'js/scores.js')
-rw-r--r-- | js/scores.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/js/scores.js b/js/scores.js index dc164f2..1e324a4 100644 --- a/js/scores.js +++ b/js/scores.js @@ -152,16 +152,17 @@ function scoresFormatPage(JO) { if (u.ID == userObj.ID) {
rowclass = 'scoreRowSelf';
}
- if (typeof(pointerUserID) != 'undefined' && u.ID == pointerUserID) {
- setTimeout("useSolution(\""+JO.mapid+"\", \""+u.solution+"\", \""+u.moves+"\", \""+u.wallColor+"\", \""+u.wallEmblem+"\");", 400);
- pointerUserID = '';
+ if (typeof pointerSolutionID != 'undefined' && u.solutionID == pointerSolutionID && goToScorePointer) {
+ goToScorePointer = false;
+ setTimeout("useSolution(\""+JO.mapid+"\", \""+u.solution+"\", \""+u.moves+"\", \""+u.wallColor+"\", \""+u.wallEmblem+"\", \""+u.solutionID+"\");", 400);
+ rowclass += ' solutionSelected';
}
if (u.solution) {
rowclass += ' scoreRowSolutionAvailable';
- p += "<tr class='"+rowclass+"' ";
+ p += "<tr class='"+rowclass+"' id='solution_"+u.solutionID+"'";
p += "onmouseover='showTempSolution(\""+JO.mapid+"\", \""+u.solution+"\", \""+u.moves+"\", \""+u.wallColor+"\", \""+u.wallEmblem+"\")'";
- p += "onclick='useSolution(\""+JO.mapid+"\", \""+u.solution+"\", \""+u.moves+"\", \""+u.wallColor+"\", \""+u.wallEmblem+"\");saveScoreLocation("+JO.page+", "+u.ID+");'";
+ p += "onclick='useSolution(\""+JO.mapid+"\", \""+u.solution+"\", \""+u.moves+"\", \""+u.wallColor+"\", \""+u.wallEmblem+"\", \""+u.solutionID+"\");saveScoreLocation("+JO.page+", "+u.solutionID+");'";
p += "onmouseout='restoreSolution(\""+JO.mapid+"\")' ";
p += " style='"+styleClass+" color:"+u.displayColor+";' title='Last improved "+scoredTimeStr+"'>";
} else {
|