mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-18 01:11:46 -05:00
Merge branch 'master' into production
This commit is contained in:
commit
966307b758
4 changed files with 8 additions and 4 deletions
|
@ -152,7 +152,7 @@ module.exports = class AuthModal extends ModalView
|
|||
@renderGPlusAuthChecklist()
|
||||
|
||||
renderGPlusAuthChecklist: ->
|
||||
template = require 'templates/modal/auth-modal-gplus-checklist'
|
||||
template = require 'templates/core/auth-modal-gplus-checklist'
|
||||
el = $(template({steps: @gplusAuthSteps}))
|
||||
el.i18n()
|
||||
@$el.find('.modal-body:visible').empty().append(el)
|
||||
|
|
|
@ -119,7 +119,8 @@ module.exports = class WorldMapView extends RootView
|
|||
@render()
|
||||
@preloadTopHeroes() unless me.get('heroConfig')?.thangType
|
||||
if @requiresSubscription
|
||||
_.delay (=> @openModalView? new SubscribeModal() unless window.currentModal), 2000
|
||||
modal = if me.get('anonymous') then AuthModal else SubscribeModal
|
||||
_.delay (=> @openModalView? new modal() unless window.currentModal), 2000
|
||||
|
||||
onSubscribed: ->
|
||||
@requiresSubscription = false
|
||||
|
@ -205,7 +206,8 @@ module.exports = class WorldMapView extends RootView
|
|||
@endHighlight()
|
||||
else
|
||||
if @requiresSubscription
|
||||
@openModalView new SubscribeModal()
|
||||
modal = if me.get('anonymous') then AuthModal else SubscribeModal
|
||||
@openModalView new modal()
|
||||
else if $(e.target).attr('disabled')
|
||||
Backbone.Mediator.publish 'router:navigate', route: '/contribute/adventurer'
|
||||
return
|
||||
|
|
|
@ -2,6 +2,7 @@ CocoView = require 'views/core/CocoView'
|
|||
template = require 'templates/play/level/level_loading'
|
||||
utils = require 'core/utils'
|
||||
SubscribeModal = require 'views/play/modal/SubscribeModal'
|
||||
AuthModal = require 'views/core/AuthModal'
|
||||
|
||||
module.exports = class LevelLoadingView extends CocoView
|
||||
id: 'level-loading-view'
|
||||
|
@ -109,7 +110,8 @@ module.exports = class LevelLoadingView extends CocoView
|
|||
@$el.find('.subscription-required').show()
|
||||
|
||||
onClickStartSubscription: (e) ->
|
||||
@openModalView new SubscribeModal()
|
||||
modal = if me.get('anonymous') then AuthModal else SubscribeModal
|
||||
@openModalView new modal()
|
||||
|
||||
onSubscribed: ->
|
||||
document.location.reload()
|
||||
|
|
Loading…
Reference in a new issue