Merge branch 'master' into production

This commit is contained in:
Matt Lott 2015-11-19 15:23:55 -08:00
commit 2efc93a93f
5 changed files with 8 additions and 3 deletions
app
schemas/models
styles/play/ladder
templates/play/ladder
views/ladder
server/trial_requests

View file

@ -7,6 +7,7 @@ TrialRequestSchema = c.object {
_.extend TrialRequestSchema.properties,
applicant: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])
created: c.date({readOnly: true})
prepaidCode: c.objectId()
reviewDate: c.date({readOnly: true})
reviewer: c.objectId(links: [{rel: 'extra', href: '/db/user/{($)}'}])

View file

@ -3,6 +3,9 @@
.name-col-cell
max-width: 170px
&.ai
color: #3f44bf
.histogram-display
height: 130px

View file

@ -31,7 +31,7 @@
td.hero-portrait-cell(style="background-image: url(/file/db/thang.type/#{(session.get('heroConfig') || {}).thangType || '529ffbf1cf1818f2be000001'}/portrait.png)")
td.rank-cell= rank + 1
td.score-cell= Math.round(sessionStats.totalScore * 100)
td.name-col-cell= session.get('creatorName') || "Anonymous"
td(class='name-col-cell' + ((new RegExp('(Simple|Shaman|Brawler|Chieftain|Thoktar) AI')).test(session.get('creatorName')) ? ' ai' : ''))= session.get('creatorName') || "Anonymous"
td.age-cell= moment(session.get('submitDate')).fromNow().replace('a few ', '')
td.fight-cell
a(href="/play/level/#{level.get('slug') || level.id}?team=#{team.otherTeam}&opponent=#{session.id}" + (league ? "&league=" + league.id : ""))
@ -51,7 +51,7 @@
td.hero-portrait-cell(style="background-image: url(/file/db/thang.type/#{(session.get('heroConfig') || {}).thangType || '529ffbf1cf1818f2be000001'}/portrait.png)")
td.rank-cell= session.rank
td.score-cell= Math.round(sessionStats.totalScore * 100)
td.name-col-cell= session.get('creatorName') || "Anonymous"
td(class='name-col-cell' + ((new RegExp('(Simple|Shaman|Brawler|Chieftain|Thoktar) AI')).test(session.get('creatorName')) ? ' ai' : ''))= session.get('creatorName') || "Anonymous"
td.age-cell= moment(session.get('submitDate')).fromNow().replace('a few ', '')
td.fight-cell
a(href="/play/level/#{level.get('slug') || level.id}?team=#{team.otherTeam}&opponent=#{session.id}" + (league ? "&league=" + league.id : ""))

View file

@ -150,7 +150,7 @@ module.exports = class LadderTabView extends CocoView
refreshLadder: ->
@supermodel.resetProgress()
@ladderLimit ?= parseInt @getQueryVariable('top_players', 20)
@ladderLimit ?= parseInt @getQueryVariable('top_players', if @options.league then 100 else 20)
for team in @teams
if oldLeaderboard = @leaderboards[team.id]
@supermodel.removeModelResource oldLeaderboard

View file

@ -19,6 +19,7 @@ TrialRequestHandler = class TrialRequestHandler extends Handler
makeNewInstance: (req) ->
instance = super(req)
instance.set 'applicant', req.user._id
instance.set 'created', new Date()
instance.set 'status', 'submitted'
instance