Merge branch 'feature/loading-views' into feature/revise-supermodel-based-on-#815

Conflicts:
	app/models/SuperModel.coffee
	app/views/editor/thang/edit.coffee
This commit is contained in:
Ting-Kuan 2014-04-13 10:37:35 -04:00
commit 573a4ae847
3 changed files with 10 additions and 2 deletions

View file

@ -21,10 +21,13 @@ module.exports = class SuperModel extends Backbone.Model
resName = url unless resName
modelRes = @addModelResource(model, url)
<<<<<<< HEAD
schema = model.schema()
schemaRes = @addModelResource(schema, schema.urlRoot)
@schemas[schema.urlRoot] = schema
modelRes.addDependency(schemaRes)
=======
>>>>>>> feature/loading-views
modelRes.load()
@ -300,4 +303,4 @@ class SomethingResource extends Resource
markFailed: (error) ->
@loadDeferred.reject()
super(error)
super(error)

View file

@ -61,10 +61,15 @@ module.exports = class ThangTypeEditView extends View
)
thangRes = @supermodel.addModelResource(@thangType, 'thang_type')
<<<<<<< HEAD
thangSchemaRes = @supermodel.addModelResource(@thangType.schema(), 'thang_type_schema')
thangRes.addDependency(thangSchemaRes)
thangRes.load()
=======
thangRes.load()
>>>>>>> feature/loading-views
@listenToOnce(@thangType.schema(), 'sync', @onThangTypeSync)
@listenToOnce(@thangType, 'sync', @onThangTypeSync)

View file

@ -116,7 +116,7 @@ module.exports = class CocoView extends Backbone.View
updateProgressBar: (progress) =>
prog = "#{parseInt(progress*100)}%"
@$el.find('.loading-screen .progress-bar').css('width', prog)
@$el?.find('.loading-screen .progress-bar').css('width', prog)
onLoaded: ->
console.debug 'gintau', 'CocoView-onLoaded()'