Skip to content

Commit

Permalink
More tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Darby committed Feb 2, 2012
1 parent c999a03 commit 7364651
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions coffee/client.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ $ ->

presenter.cssClass.push "winner" if entry.winner is true
presenter.cssClass = presenter.cssClass.join(' ')
row = target.prepend(template(presenter))
row.find('.gravatar img').mouseenter() if entry.winner
row = target.prepend(template(presenter)).find(':first')
row.find('.gravatar img').mouseenter() if entry.winner is true

clearWinner = ->
$('.winner').removeClass("winner")
Expand All @@ -45,8 +45,8 @@ $ ->

socket.on "showWinner", (data) ->
clearWinner()
rows = $('tbody tr.eligible')
winner = rows.eq(data.index - 1)
rows = $('tbody tr')
winner = rows.eq(data.index)
middle = winner.offset().top - ($(window).height() / 2)
$("html, body").animate {scrollTop: middle}, 500, ->
winner.effect("pulsate", {times: 1}).addClass("winner").find(".gravatar img").mouseenter()
Expand Down
2 changes: 1 addition & 1 deletion public/crb.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#rules-area{margin-bottom:2em}
table#contest th{border-bottom:1px solid #ddd !important}
table#contest td{line-height:26px;vertical-align:middle;}
table#contest td.gravatar img{width:24px;height:24px}
table#contest td.gravatar img{width:24px;height:24px;border-radius:4em;-moz-border-radius:4em;-webkit-border-radius:4em}
table#contest td.twitter{text-transform:lowercase}
#count{text-align:right;font-weight:bold}
input.error,select.error{border-color:#dc143c;color:#dc143c}
Expand Down
3 changes: 3 additions & 0 deletions public/crb.styl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ table#contest
&.gravatar img
width: 24px
height: 24px
border-radius: 4em
-moz-border-radius: 4em
-webkit-border-radius: 4em

&.twitter
text-transform: lowercase
Expand Down

0 comments on commit 7364651

Please sign in to comment.