mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-19 17:39:56 -04:00
Merge branch 'master' of https://github.com/swapkh91/codecombat into swapkh91-master
Conflicts: app/models/SuperModel.coffee
This commit is contained in:
commit
fae9034dfc
5 changed files with 8 additions and 8 deletions
app
lib
models
views
account
editor/thang
play/level/modal
|
@ -232,4 +232,4 @@ module.exports = class LevelLoader extends CocoClass
|
|||
Backbone.Mediator.publish 'level-loader:progress-changed', progress: @progress()
|
||||
@initWorld() if @allDone()
|
||||
@trigger 'progress'
|
||||
@trigger 'loaded-all' if @progress() is 1
|
||||
@trigger 'loaded-all' if @progress() is 1
|
||||
|
|
|
@ -9,7 +9,7 @@ class SuperModel
|
|||
@mustPopulate = model
|
||||
model.saveBackups = @shouldSaveBackups(model)
|
||||
model.fetch() unless model.loaded or model.loading
|
||||
@listenToOnce(model, 'sync', @modelLoaded) unless model.loaded
|
||||
@listenTo(model, 'sync', @modelLoaded) unless model.loaded
|
||||
@listenToOnce(model, 'error', @modelErrored) unless model.loaded
|
||||
url = model.url()
|
||||
@models[url] = model unless @models[url]?
|
||||
|
@ -40,7 +40,7 @@ class SuperModel
|
|||
continue if @models[refURL]
|
||||
@models[refURL] = ref
|
||||
ref.fetch()
|
||||
@listenToOnce(ref, 'sync', @modelLoaded)
|
||||
ref.once 'sync', @modelLoaded, @
|
||||
|
||||
@trigger 'loaded-one', model: model
|
||||
@trigger 'loaded-all' if @finished()
|
||||
|
|
|
@ -24,7 +24,7 @@ module.exports = class WizardSettingsView extends CocoView
|
|||
@wizardThangType = new ThangType()
|
||||
@wizardThangType.url = -> '/db/thang.type/wizard'
|
||||
@wizardThangType.fetch()
|
||||
@wizardThangType.once 'sync', @initCanvas, @
|
||||
@listenToOnce(@wizardThangType, 'sync', @initCanvas)
|
||||
|
||||
initCanvas: ->
|
||||
@startsLoading = false
|
||||
|
|
|
@ -11,8 +11,8 @@ module.exports = class ColorsTabView extends CocoView
|
|||
offset: 0
|
||||
|
||||
constructor: (@thangType, options) ->
|
||||
@thangType.once 'sync', @tryToBuild, @
|
||||
@thangType.schema().once 'sync', @tryToBuild, @
|
||||
@listenToOnce(@thangType, 'sync', @tryToBuild)
|
||||
@listenToOnce(@thangType.schema(), 'sync', @tryToBuild)
|
||||
@colorConfig = { hue: 0, saturation: 0.5, lightness: 0.5 }
|
||||
@spriteBuilder = new SpriteBuilder(@thangType)
|
||||
f = =>
|
||||
|
|
|
@ -38,8 +38,8 @@ module.exports = class VictoryModal extends View
|
|||
@feedback = new LevelFeedback()
|
||||
@feedback.url = -> url
|
||||
@feedback.fetch()
|
||||
@feedback.once 'sync', => @onFeedbackLoaded()
|
||||
@feedback.once 'error', => @onFeedbackNotFound()
|
||||
@listenToOnce(@feedback, 'sync', -> @onFeedbackLoaded())
|
||||
@listenToOnce(@feedback, 'error', -> @onFeedbackNotFound())
|
||||
|
||||
onFeedbackLoaded: ->
|
||||
@feedback.url = -> '/db/level.feedback/' + @id
|
||||
|
|
Loading…
Reference in a new issue