Show proper layout for owner's loading page

This commit is contained in:
Piotr Sarnacki 2015-05-12 15:18:30 +02:00
parent 2700bc9557
commit b9cf051575
3 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,5 @@
`import Ember from 'ember'`
Controller = Ember.Controller.extend()
`export default Controller`

View File

@ -6,10 +6,18 @@
Route = TravisRoute.extend
needsAuth: false
deactivate: ->
@controllerFor('loading').set('layoutName', null)
titleToken: (model) ->
"#{model.name}"
model: (params) ->
$.get(config.apiEndpoint + "/v3/owner/#{params.owner}")
beforeModel: ->
@controllerFor('loading').set('layoutName', 'simple')
@_super.apply(this, arguments)
`export default Route`

9
app/views/loading.coffee Normal file
View File

@ -0,0 +1,9 @@
`import Ember from 'ember'`
View = Ember.View.extend
layoutName: (->
if name = @get('controller.layoutName')
'layouts/' + name
).property('controller.layoutName')
`export default View`