Show proper layout for owner's loading page
This commit is contained in:
parent
2700bc9557
commit
b9cf051575
5
app/controllers/loading.coffee
Normal file
5
app/controllers/loading.coffee
Normal file
|
@ -0,0 +1,5 @@
|
|||
`import Ember from 'ember'`
|
||||
|
||||
Controller = Ember.Controller.extend()
|
||||
|
||||
`export default Controller`
|
|
@ -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
9
app/views/loading.coffee
Normal 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`
|
Loading…
Reference in New Issue
Block a user