mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-25 21:43:47 -04:00
Merge pull request #2949 from trotod/fix-interface-audio
Fix some campaign interface audio
This commit is contained in:
commit
36494acc5a
3 changed files with 11 additions and 0 deletions
app/views/play/modal
|
@ -46,6 +46,15 @@ module.exports = class BuyGemsModal extends ModalView
|
|||
c.stateMessage = @stateMessage
|
||||
return c
|
||||
|
||||
afterRender: ->
|
||||
super()
|
||||
return unless @supermodel.finished()
|
||||
@playSound 'game-menu-open'
|
||||
|
||||
onHidden: ->
|
||||
super()
|
||||
@playSound 'game-menu-close'
|
||||
|
||||
onIPadProducts: (e) ->
|
||||
newProducts = []
|
||||
for iapProduct in e.products
|
||||
|
|
|
@ -43,6 +43,7 @@ module.exports = class PlayAchievementsModal extends ModalView
|
|||
|
||||
@listenTo achievementsFetcher, 'sync', @onAchievementsLoaded
|
||||
@listenTo earnedAchievementsFetcher, 'sync', @onEarnedAchievementsLoaded
|
||||
@stopListening @supermodel, 'loaded-all'
|
||||
|
||||
@supermodel.loadCollection(achievementsFetcher, 'achievement')
|
||||
@supermodel.loadCollection(earnedAchievementsFetcher, 'achievement')
|
||||
|
|
|
@ -80,6 +80,7 @@ module.exports = class PlayItemsModal extends ModalView
|
|||
itemFetcher.skip = 0
|
||||
itemFetcher.fetch({data: {skip: 0, limit: PAGE_SIZE}})
|
||||
@listenTo itemFetcher, 'sync', @onItemsFetched
|
||||
@stopListening @supermodel, 'loaded-all'
|
||||
@supermodel.loadCollection(itemFetcher, 'items')
|
||||
@idToItem = {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue