Fixed HUD showing actions backwardly. Added rank numbering to leaderboard.

This commit is contained in:
Nick Winter 2014-03-08 15:43:56 -08:00
parent b3964571e1
commit 39c4657204
2 changed files with 5 additions and 3 deletions

View file

@ -3,17 +3,19 @@ div#columns.row
div.column.col-md-6
table.table.table-bordered.table-condensed.table-hover
tr
th(colspan=3, style="color: #{team.primaryColor}")
th(colspan=4, style="color: #{team.primaryColor}")
span= team.name
span Leaderboard
tr
th Rank
th Score
th.name-col-cell Name
th
for session in team.leaderboard.topPlayers.models
for session, rank in team.leaderboard.topPlayers.models
- var myRow = session.get('creator') == me.id
tr(class=myRow ? "success" : "")
td.rank-cell= rank + 1
td.score-cell= Math.round(session.get('totalScore') * 100)
td.name-col-cell= session.get('creatorName') || "Anonymous"
td

View file

@ -151,7 +151,7 @@ module.exports = class HUDView extends View
createActions: ->
actions = @$el.find('.thang-actions tbody').empty()
showActions = @thang.world and not _.isEmpty(@thang.actions) and 'action' in @thang.hudProperties ? []
@$el.find('.thang-actions').toggleClass 'secret', showActions
@$el.find('.thang-actions').toggleClass 'secret', not showActions
return unless showActions
@buildActionTimespans()
for actionName, action of @thang.actions