Fix repo search
This commit is contained in:
parent
ada9e9ba02
commit
00653e9420
|
@ -148,7 +148,9 @@ Repo.reopenClass
|
|||
result.pushObjects(promise.get('content').toArray())
|
||||
result.set('isLoaded', true)
|
||||
|
||||
result
|
||||
result
|
||||
|
||||
promise
|
||||
|
||||
withLastBuild: (store) ->
|
||||
repos = store.filter('repo', {}, (build) ->
|
||||
|
|
|
@ -11,9 +11,7 @@ Route = TravisRoute.extend
|
|||
@controllerFor('repo').activate('index')
|
||||
@controllerFor('repos').activate(@get('reposTabName'))
|
||||
|
||||
@currentRepoDidChange()
|
||||
if repos = @controllerFor('repos')
|
||||
repos.addObserver('repos.firstObject', this, 'currentRepoDidChange')
|
||||
@setCurrentRepoObservers()
|
||||
|
||||
deactivate: ->
|
||||
if repos = @controllerFor('repos')
|
||||
|
@ -25,6 +23,11 @@ Route = TravisRoute.extend
|
|||
if repo = @controllerFor('repos').get('repos.firstObject')
|
||||
@controllerFor('repo').set('repo', repo)
|
||||
|
||||
setCurrentRepoObservers: ->
|
||||
@currentRepoDidChange()
|
||||
if repos = @controllerFor('repos')
|
||||
repos.addObserver('repos.firstObject', this, 'currentRepoDidChange')
|
||||
|
||||
actions:
|
||||
redirectToGettingStarted: ->
|
||||
@transitionTo('getting_started')
|
||||
|
|
|
@ -10,8 +10,7 @@ Route = MainTabRoute.extend
|
|||
@controllerFor('repo').activate('index')
|
||||
@controllerFor('repos').activate('search', searchPhrase)
|
||||
|
||||
@currentRepoDidChange()
|
||||
@controllerFor('repos').addObserver('firstObject', this, 'currentRepoDidChange')
|
||||
@setCurrentRepoObservers()
|
||||
|
||||
model: (params) ->
|
||||
params.phrase.replace(/%2F/g, '/')
|
||||
|
|
Loading…
Reference in New Issue
Block a user