From 7261f9960ca64ece68a54e3c5887e1ee821ab049 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Thu, 20 Feb 2014 16:52:46 -0800 Subject: [PATCH 1/2] Tweaked the name column size in the ladder view. --- app/styles/play/ladder.sass | 7 +++++++ app/templates/play/ladder.jade | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/styles/play/ladder.sass b/app/styles/play/ladder.sass index c8561dcc3..8608768f8 100644 --- a/app/styles/play/ladder.sass +++ b/app/styles/play/ladder.sass @@ -13,3 +13,10 @@ #simulation-status-text display: inline margin-left: 10px + + .name-col-cell + max-width: 300px + text-overflow: ellipsis + white-space: nowrap + overflow: hidden + \ No newline at end of file diff --git a/app/templates/play/ladder.jade b/app/templates/play/ladder.jade index cacd0062d..1ca502949 100644 --- a/app/templates/play/ladder.jade +++ b/app/templates/play/ladder.jade @@ -26,13 +26,14 @@ block content span Leaderboard tr th Score - th Name + th.name-col-cell Name + th for session in team.leaderboard.topPlayers.models - var myRow = session.get('creator') == me.id tr(class=myRow ? "success" : "") td.score-cell= session.get('totalScore').toFixed(2) - td= session.get('creatorName') || "Anonymous" + td.name-col-cell= session.get('creatorName') || "Anonymous" td if(!myRow) a(href="/play/level/#{level.get('slug') || level.id}/?team=#{team.otherTeam}&opponent=#{session.id}") Battle as #{team.otherTeam}! From da0238cebaa05a0d9700a994732b15294e7046c4 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Thu, 20 Feb 2014 16:53:08 -0800 Subject: [PATCH 2/2] Switched the level view to grab opponent code from submittedCode instead of code. --- app/views/play/level_view.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/play/level_view.coffee b/app/views/play/level_view.coffee index 2b74e854f..73639f598 100644 --- a/app/views/play/level_view.coffee +++ b/app/views/play/level_view.coffee @@ -134,7 +134,7 @@ module.exports = class PlayLevelView extends View opponentSpells = opponentSpells.concat spells otherSession = @levelLoader.opponentSession - opponentCode = otherSession?.get('code') or {} + opponentCode = otherSession?.get('submittedCode') or {} myCode = @session.get('code') or {} for spell in opponentSpells c = opponentCode[spell]