diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/statsUi.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/statsUi.js index d5e666b15..b84c7e516 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/statsUi.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/statsUi.js @@ -63,36 +63,36 @@ var StatsUI = Class.extend({ var comps = 0; var total = 0; - json.Stats.sort((a,b) => { return b.count - a.count; }) + json.Stats.sort((a,b) => { return b.Count - a.Count; }) json["Stats"].forEach(item => { - if(item.casual) { - casuals += item.count; + if(item.Casual) { + casuals += item.Count; } else { - comps += item.count; + comps += item.Count; } - total += item.count; + total += item.Count; }); json["Stats"].forEach(item => { - var test = getPercentage(item.count, total); + var test = getPercentage(item.Count, total); - if(item.casual) { + if(item.Casual) { casualStats.append("" - + "" + item.format + "" - + "" + item.count + "" - + "" + getPercentage(item.count, casuals) + "" - + "" + getPercentage(item.count, total) + "" + + "" + item.Format + "" + + "" + item.Count + "" + + "" + getPercentage(item.Count, casuals) + "" + + "" + getPercentage(item.Count, total) + "" + ""); } else { compStats.append("" - + "" + item.format + "" - + "" + item.count + "" - + "" + getPercentage(item.count, comps) + "" - + "" + getPercentage(item.count, total) + "" + + "" + item.Format + "" + + "" + item.Count + "" + + "" + getPercentage(item.Count, comps) + "" + + "" + getPercentage(item.Count, total) + "" + ""); } });