Improved next game routing and speed. Hid that catastrophically dangerous reset all games button.

This commit is contained in:
Nick Winter 2014-03-16 21:33:46 -07:00
parent e88c79681d
commit f02f4e77d0
3 changed files with 13 additions and 7 deletions
app
templates/play
views/play

View file

@ -44,6 +44,6 @@ block content
span(data-i18n="ladder.simulation_explanation") By simulating games you can get your game ranked faster!
p
button(data-i18n="ladder.simulate_games").btn.btn-warning.btn-lg.highlight#simulate-button Simulate Games!
if me.isAdmin()
if false && me.isAdmin()
p
button(data-i18n="ladder.simulate_all").btn.btn-danger.btn-lg.highlight#simulate-all-button RESET AND SIMULATE GAMES

View file

@ -66,7 +66,6 @@ module.exports = class SpectateLevelView extends View
'ctrl+s': 'onCtrlS'
constructor: (options, @levelID) ->
@originalOptions = _.cloneDeep(options)
console.profile?() if PROFILE_ME
super options
$(window).on('resize', @onWindowResize)
@ -446,7 +445,14 @@ module.exports = class SpectateLevelView extends View
Backbone.Mediator.publish 'router:navigate', {
route: url,
viewClass: SpectateLevelView,
viewArgs: [{spectateSessions:{sessionOne: @sessionOne, sessionTwo: @sessionTwo}}, @levelID ]}
viewArgs: [
{
spectateSessions: {sessionOne: @sessionOne, sessionTwo: @sessionTwo}
supermodel: @supermodel
}
@levelID ]
}
history?.pushState? {}, "", url # Backbone won't update the URL if just query parameters change
fetchRandomSessionPair: (cb) ->
console.log "Fetching random session pair!"