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:
Ting-Kuan 2014-04-17 12:58:29 -04:00
commit 360e594f3d
3 changed files with 7 additions and 7 deletions

View file

@ -7,10 +7,10 @@ class NameLoader extends CocoClass
toLoad = (id for id in ids when not namesCache[id])
return false unless toLoad.length
jqxhrOptions = {
url: '/db/user/x/names',
type:'POST',
data:{ids:toLoad},
success: @loadedNames
url: '/db/user/x/names',
type:'POST',
data:{ids:toLoad},
success: @loadedNames
}
return jqxhrOptions

View file

@ -50,8 +50,8 @@ module.exports = class EditorLevelView extends View
@level = new Level _id: @levelID
#@listenToOnce(@level, 'sync', @onLevelLoaded)
@listenToOnce(@supermodel, 'error', =>
@hideLoading()
@insertSubView(new ErrorView())
@hideLoading()
@insertSubView(new ErrorView())
)
@levelRes = @supermodel.addModelResource(@level, 'level')

View file

@ -31,7 +31,7 @@ module.exports = class SystemsTabView extends View
url = "/db/level.system/#{system.original}/version/#{system.majorVersion}"
ls = new LevelSystem()
ls.saveBackups = true
lsRes = @supermodel.addModelResource(ls, 'level_system_' + system.original);
lsRes = @supermodel.addModelResource(ls, 'level_system_' + system.original)
do (url) -> ls.url = -> url
continue if @supermodel.getModelByURL ls.url
lsRes.load()