Use regular params instead of event in My Repositories list (closes #157)
This commit is contained in:
parent
febf40fd76
commit
1b01581fb4
|
@ -4,7 +4,7 @@ Travis.ReposController = Ember.ArrayController.extend
|
|||
defaultTab: 'recent'
|
||||
isLoadedBinding: 'content.isLoaded'
|
||||
needs: ['currentUser', 'repo']
|
||||
currentUserBinding: 'controllers.currentUser'
|
||||
currentUserBinding: 'controllers.currentUser.user'
|
||||
selectedRepo: (->
|
||||
# we need to observe also repo.content here, because we use
|
||||
# ObjectProxy in repo controller
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<ul class="tabs">
|
||||
<li id="tab_recent" {{bindAttr class="view.classRecent"}}>
|
||||
<h5><a name="recent" {{action activate target="view"}}>{{t layouts.application.recent}}</a></h5>
|
||||
<h5><a {{action activate "recent" target="view"}}>{{t layouts.application.recent}}</a></h5>
|
||||
</li>
|
||||
<li id="tab_owned" {{bindAttr class="view.classOwned"}}>
|
||||
<h5><a name="owned" {{action activate target="view"}}>{{t layouts.application.my_repositories}}</a></h5>
|
||||
<h5><a {{action activate "owned" target="view"}}>{{t layouts.application.my_repositories}}</a></h5>
|
||||
</li>
|
||||
<li id="tab_search" {{bindAttr class="view.classSearch"}}>
|
||||
<h5><a name="search" {{action activate target="view"}}>{{t layouts.application.search}}</a></h5>
|
||||
<h5><a {{action activate "search" target="view"}}>{{t layouts.application.search}}</a></h5>
|
||||
</li>
|
||||
|
||||
<a {{action toggleInfo target="view"}} class="toggle-info"></a>
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
tabBinding: 'controller.tab'
|
||||
currentUserBinding: 'controller.currentUser'
|
||||
|
||||
activate: ->
|
||||
@get('controller').activate(event.target.name)
|
||||
activate: (name) ->
|
||||
@get('controller').activate(name)
|
||||
|
||||
classRecent: (->
|
||||
'active' if @get('tab') == 'recent'
|
||||
|
|
Loading…
Reference in New Issue
Block a user