mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-13 22:49:51 -04:00
Merge branch 'master' into production
This commit is contained in:
commit
9dc1a8c4a9
4 changed files with 11 additions and 4 deletions
|
@ -14,7 +14,7 @@ div#columns.row
|
|||
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.score-cell= Math.round(session.get('totalScore') * 100)
|
||||
td.name-col-cell= session.get('creatorName') || "Anonymous"
|
||||
td
|
||||
a(href="/play/level/#{level.get('slug') || level.id}/?team=#{team.otherTeam}&opponent=#{session.id}")
|
||||
|
|
|
@ -43,7 +43,7 @@ div#columns.row
|
|||
td.time-cell= match.when
|
||||
td.battle-cell
|
||||
- var text = match.state === 'win' ? 'Watch your victory' : 'Defeat the ' + team.otherTeam
|
||||
a(href="/play/level/#{levelID}?team=#{teamID}&opponent=#{match.sessionID}")= text
|
||||
a(href="/play/level/#{levelID}?team=#{team.id}&opponent=#{match.sessionID}")= text
|
||||
|
||||
if !team.matches.length
|
||||
tr
|
||||
|
|
|
@ -38,8 +38,15 @@ module.exports = class RootView extends CocoView
|
|||
location.hash = ''
|
||||
location.hash = hash
|
||||
@buildLanguages()
|
||||
|
||||
afterRender: ->
|
||||
super(arguments...)
|
||||
@chooseTab(location.hash.replace('#','')) if location.hash
|
||||
|
||||
# TODO: automate tabs to put in hashes and navigate to them here
|
||||
chooseTab: (category) ->
|
||||
$("a[href='##{category}']", @$el).tab('show')
|
||||
|
||||
# TODO: automate tabs to put in hashes when they are clicked
|
||||
|
||||
buildLanguages: ->
|
||||
$select = @$el.find(".language-dropdown").empty()
|
||||
|
|
|
@ -15,7 +15,7 @@ class LevelSessionsCollection extends CocoCollection
|
|||
super()
|
||||
@url = "/db/level/#{levelID}/all_sessions"
|
||||
|
||||
module.exports = class LadderView extends CocoView
|
||||
module.exports = class LadderTabView extends CocoView
|
||||
id: 'ladder-tab-view'
|
||||
template: require 'templates/play/ladder/ladder_tab'
|
||||
startsLoading: true
|
||||
|
|
Loading…
Reference in a new issue