Use regular params instead of event in My Repositories list (closes #157)

This commit is contained in:
Piotr Sarnacki 2013-03-15 10:22:58 +01:00
parent febf40fd76
commit 1b01581fb4
3 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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>

View File

@ -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'