mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Table headers are now unhoverable
This commit is contained in:
parent
0549273d14
commit
e082d363be
2 changed files with 62 additions and 58 deletions
|
@ -3,47 +3,49 @@ div#columns.row
|
|||
div.column.col-md-4
|
||||
div(id="histogram-display-#{team.name}", class="histogram-display",data-team-name=team.name)
|
||||
table.table.table-bordered.table-condensed.table-hover
|
||||
tr
|
||||
th(colspan=2)
|
||||
th(colspan=3, style="color: #{team.primaryColor}")
|
||||
span= team.name
|
||||
span
|
||||
span(data-i18n="ladder.leaderboard") Leaderboard
|
||||
tr
|
||||
th(colspan=2)
|
||||
th(data-i18n="general.score") Score
|
||||
th(data-i18n="general.name").name-col-cell Name
|
||||
th
|
||||
thead
|
||||
tr
|
||||
th(colspan=2)
|
||||
th(colspan=3, style="color: #{team.primaryColor}")
|
||||
span= team.name
|
||||
span
|
||||
span(data-i18n="ladder.leaderboard") Leaderboard
|
||||
tr
|
||||
th(colspan=2)
|
||||
th(data-i18n="general.score") Score
|
||||
th(data-i18n="general.name").name-col-cell Name
|
||||
th
|
||||
|
||||
- var topSessions = team.leaderboard.topPlayers.models;
|
||||
- var showJustTop = team.leaderboard.inTopSessions() || me.get('anonymous');
|
||||
- if(!showJustTop && topSessions.length == 20) topSessions = topSessions.slice(0, 10);
|
||||
for session, rank in topSessions
|
||||
- var myRow = session.get('creator') == me.id
|
||||
tr(class=myRow ? "success" : "", data-player-id=session.get('creator'), data-session-id=session.id)
|
||||
td.code-language-cell(style="background-image: url(/images/common/code_languages/" + session.get('submittedCodeLanguage') + "_icon.png)" title=capitalize(session.get('submittedCodeLanguage')))
|
||||
td.rank-cell= rank + 1
|
||||
td.score-cell= Math.round(session.get('totalScore') * 100)
|
||||
td.name-col-cell= session.get('creatorName') || "Anonymous"
|
||||
td.fight-cell
|
||||
a(href="/play/level/#{level.get('slug') || level.id}?team=#{team.otherTeam}&opponent=#{session.id}")
|
||||
span(data-i18n="ladder.fight") Fight!
|
||||
|
||||
if !showJustTop && team.leaderboard.nearbySessions().length
|
||||
tr(class="active")
|
||||
td(colspan=4).ellipsis-row ...
|
||||
for session in team.leaderboard.nearbySessions()
|
||||
tbody
|
||||
- var topSessions = team.leaderboard.topPlayers.models;
|
||||
- var showJustTop = team.leaderboard.inTopSessions() || me.get('anonymous');
|
||||
- if(!showJustTop && topSessions.length == 20) topSessions = topSessions.slice(0, 10);
|
||||
for session, rank in topSessions
|
||||
- var myRow = session.get('creator') == me.id
|
||||
tr(class=myRow ? "success" : "", data-player-id=session.get('creator'), data-session-id=session.id)
|
||||
td.code-language-cell(style="background-image: url(/images/common/code_languages/" + session.get('submittedCodeLanguage') + "_icon.png)")
|
||||
td.rank-cell= session.rank
|
||||
td.code-language-cell(style="background-image: url(/images/common/code_languages/" + session.get('submittedCodeLanguage') + "_icon.png)" title=capitalize(session.get('submittedCodeLanguage')))
|
||||
td.rank-cell= rank + 1
|
||||
td.score-cell= Math.round(session.get('totalScore') * 100)
|
||||
td.name-col-cell= session.get('creatorName') || "Anonymous"
|
||||
td.fight-cell
|
||||
a(href="/play/level/#{level.get('slug') || level.id}?team=#{team.otherTeam}&opponent=#{session.id}")
|
||||
span(data-i18n="ladder.fight") Fight!
|
||||
if teamIndex == 1
|
||||
.btn.btn-sm.load-more-ladder-entries More
|
||||
|
||||
if !showJustTop && team.leaderboard.nearbySessions().length
|
||||
tr(class="active")
|
||||
td(colspan=4).ellipsis-row ...
|
||||
for session in team.leaderboard.nearbySessions()
|
||||
- var myRow = session.get('creator') == me.id
|
||||
tr(class=myRow ? "success" : "", data-player-id=session.get('creator'), data-session-id=session.id)
|
||||
td.code-language-cell(style="background-image: url(/images/common/code_languages/" + session.get('submittedCodeLanguage') + "_icon.png)")
|
||||
td.rank-cell= session.rank
|
||||
td.score-cell= Math.round(session.get('totalScore') * 100)
|
||||
td.name-col-cell= session.get('creatorName') || "Anonymous"
|
||||
td.fight-cell
|
||||
a(href="/play/level/#{level.get('slug') || level.id}?team=#{team.otherTeam}&opponent=#{session.id}")
|
||||
span(data-i18n="ladder.fight") Fight!
|
||||
if teamIndex == 1
|
||||
.btn.btn-sm.load-more-ladder-entries More
|
||||
|
||||
div.column.col-md-4
|
||||
h4.friends-header(data-i18n="ladder.friends_playing") Friends Playing
|
||||
|
|
|
@ -20,33 +20,35 @@ p.simulation-count
|
|||
|
|
||||
span#games-in-queue= numberOfGamesInQueue || 0
|
||||
table.table.table-bordered.table-condensed.table-hover
|
||||
tr
|
||||
th
|
||||
th(data-i18n="general.player").name-col-cell Player
|
||||
th(data-i18n="ladder.games_simulated") Games simulated
|
||||
th(data-i18n="ladder.games_played") Games played
|
||||
th(data-i18n="ladder.ratio") Ratio
|
||||
- var topSimulators = simulatorsLeaderboardData.topSimulators.models;
|
||||
- var showJustTop = simulatorsLeaderboardData.inTopSimulators() || me.get('anonymous');
|
||||
- if(!showJustTop) topSimulators = topSimulators.slice(0, 10);
|
||||
for user, rank in topSimulators
|
||||
- var myRow = user.id == me.id
|
||||
tr(class=myRow ? "success" : "")
|
||||
td.simulator-leaderboard-cell= rank + 1
|
||||
td.name-col-cell= user.get('name') || "Anonymous"
|
||||
td.simulator-leaderboard-cell= user.get('simulatedBy')
|
||||
td.simulator-leaderboard-cell= user.get('simulatedFor')
|
||||
td.simulator-leaderboard-cell= Math.round((user.get('simulatedBy') / user.get('simulatedFor')) * 10) / 10
|
||||
|
||||
if !showJustTop && simulatorsLeaderboardData.nearbySimulators().length
|
||||
tr(class="active")
|
||||
td(colspan=5).ellipsis-row ...
|
||||
for user in simulatorsLeaderboardData.nearbySimulators()
|
||||
thead
|
||||
tr
|
||||
th
|
||||
th(data-i18n="general.player").name-col-cell Player
|
||||
th(data-i18n="ladder.games_simulated") Games simulated
|
||||
th(data-i18n="ladder.games_played") Games played
|
||||
th(data-i18n="ladder.ratio") Ratio
|
||||
tbody
|
||||
- var topSimulators = simulatorsLeaderboardData.topSimulators.models;
|
||||
- var showJustTop = simulatorsLeaderboardData.inTopSimulators() || me.get('anonymous');
|
||||
- if(!showJustTop) topSimulators = topSimulators.slice(0, 10);
|
||||
for user, rank in topSimulators
|
||||
- var myRow = user.id == me.id
|
||||
- var ratio = user.get('simulatedBy') / user.get('simulatedFor');
|
||||
tr(class=myRow ? "success" : "")
|
||||
td.simulator-leaderboard-cell= user.rank
|
||||
td.simulator-leaderboard-cell= rank + 1
|
||||
td.name-col-cell= user.get('name') || "Anonymous"
|
||||
td.simulator-leaderboard-cell= user.get('simulatedBy')
|
||||
td.simulator-leaderboard-cell= user.get('simulatedFor')
|
||||
td.simulator-leaderboard-cell= _.isNaN(ratio) || ratio == Infinity ? '' : ratio.toFixed(1)
|
||||
td.simulator-leaderboard-cell= Math.round((user.get('simulatedBy') / user.get('simulatedFor')) * 10) / 10
|
||||
|
||||
if !showJustTop && simulatorsLeaderboardData.nearbySimulators().length
|
||||
tr(class="active")
|
||||
td(colspan=5).ellipsis-row ...
|
||||
for user in simulatorsLeaderboardData.nearbySimulators()
|
||||
- var myRow = user.id == me.id
|
||||
- var ratio = user.get('simulatedBy') / user.get('simulatedFor');
|
||||
tr(class=myRow ? "success" : "")
|
||||
td.simulator-leaderboard-cell= user.rank
|
||||
td.name-col-cell= user.get('name') || "Anonymous"
|
||||
td.simulator-leaderboard-cell= user.get('simulatedBy')
|
||||
td.simulator-leaderboard-cell= user.get('simulatedFor')
|
||||
td.simulator-leaderboard-cell= _.isNaN(ratio) || ratio == Infinity ? '' : ratio.toFixed(1)
|
||||
|
|
Loading…
Reference in a new issue