Merge branch 'feature/loading-views' of https://github.com/codecombat/codecombat into feature/loading-views
Conflicts: server/commons/Handler.coffee
This commit is contained in:
commit
360e594f3d
3 changed files with 7 additions and 7 deletions
app
|
@ -7,10 +7,10 @@ class NameLoader extends CocoClass
|
||||||
toLoad = (id for id in ids when not namesCache[id])
|
toLoad = (id for id in ids when not namesCache[id])
|
||||||
return false unless toLoad.length
|
return false unless toLoad.length
|
||||||
jqxhrOptions = {
|
jqxhrOptions = {
|
||||||
url: '/db/user/x/names',
|
url: '/db/user/x/names',
|
||||||
type:'POST',
|
type:'POST',
|
||||||
data:{ids:toLoad},
|
data:{ids:toLoad},
|
||||||
success: @loadedNames
|
success: @loadedNames
|
||||||
}
|
}
|
||||||
|
|
||||||
return jqxhrOptions
|
return jqxhrOptions
|
||||||
|
|
|
@ -50,8 +50,8 @@ module.exports = class EditorLevelView extends View
|
||||||
@level = new Level _id: @levelID
|
@level = new Level _id: @levelID
|
||||||
#@listenToOnce(@level, 'sync', @onLevelLoaded)
|
#@listenToOnce(@level, 'sync', @onLevelLoaded)
|
||||||
@listenToOnce(@supermodel, 'error', =>
|
@listenToOnce(@supermodel, 'error', =>
|
||||||
@hideLoading()
|
@hideLoading()
|
||||||
@insertSubView(new ErrorView())
|
@insertSubView(new ErrorView())
|
||||||
)
|
)
|
||||||
|
|
||||||
@levelRes = @supermodel.addModelResource(@level, 'level')
|
@levelRes = @supermodel.addModelResource(@level, 'level')
|
||||||
|
|
|
@ -31,7 +31,7 @@ module.exports = class SystemsTabView extends View
|
||||||
url = "/db/level.system/#{system.original}/version/#{system.majorVersion}"
|
url = "/db/level.system/#{system.original}/version/#{system.majorVersion}"
|
||||||
ls = new LevelSystem()
|
ls = new LevelSystem()
|
||||||
ls.saveBackups = true
|
ls.saveBackups = true
|
||||||
lsRes = @supermodel.addModelResource(ls, 'level_system_' + system.original);
|
lsRes = @supermodel.addModelResource(ls, 'level_system_' + system.original)
|
||||||
do (url) -> ls.url = -> url
|
do (url) -> ls.url = -> url
|
||||||
continue if @supermodel.getModelByURL ls.url
|
continue if @supermodel.getModelByURL ls.url
|
||||||
lsRes.load()
|
lsRes.load()
|
||||||
|
|
Reference in a new issue