Skip to content

Commit

Permalink
More diff bugfixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
emackey committed Mar 5, 2012
1 parent 13f3baa commit ff2da0e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions server/assets/diff.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@
color: #009DE9;
border-bottom: 1px solid #009DE9;
}
label {
cursor: pointer;
font-size: 16px;
}
label:hover {
color: #009DE9;
text-decoration: underline;
cursor: pointer;
}
#subtitle {
text-align: center;
Expand Down Expand Up @@ -131,15 +134,15 @@
function computeNames() {
if (!leftSide.loaded) {
leftSide.name = 'Not loaded';
} else if (rightSide.parent.substring(3) === leftSide.id) {
} else if (rightSide.parent === leftSide.id) {
leftSide.name = 'parent effect ' + leftSide.id;
} else {
leftSide.name = 'effect ' + leftSide.id;
}

if (!rightSide.loaded) {
rightSide.name = 'Not loaded';
} else if (leftSide.parent.substring(3) === rightSide.id) {
} else if (leftSide.parent === rightSide.id) {
rightSide.name = 'parent effect ' + rightSide.id;
} else {
rightSide.name = 'effect ' + rightSide.id;
Expand All @@ -153,7 +156,11 @@
function load_code(side) {
$.getJSON('item/'+side.id, function(result) {
side.code = result.code;
side.parent = result.parent;
if (result.parent) {
side.parent = result.parent.substring(3);
} else {
side.parent = null;
}
side.loaded = true;
if (leftSide.loaded && rightSide.loaded) {
computeNames();
Expand Down

0 comments on commit ff2da0e

Please sign in to comment.