Merge pull request from trotod/fix-interface-audio

Fix some campaign interface audio
This commit is contained in:
Nick Winter 2015-08-18 16:19:38 -07:00
commit 36494acc5a
3 changed files with 11 additions and 0 deletions

View file

@ -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

View file

@ -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')

View file

@ -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 = {}