Fixed list.coffee so repo cell to be entirely clickable, all the credit goes to @bastilian
This commit is contained in:
parent
0d4babb07e
commit
b0415a7148
|
@ -1,14 +1,14 @@
|
||||||
@Travis.reopen
|
@Travis.reopen
|
||||||
ReposView: Travis.View.extend
|
ReposView: Travis.View.extend
|
||||||
templateName: 'repos/list'
|
templateName: 'repos/list'
|
||||||
|
|
||||||
ReposListView: Em.CollectionView.extend
|
ReposListView: Em.CollectionView.extend
|
||||||
elementId: 'repos'
|
elementId: 'repos'
|
||||||
tagName: 'ul'
|
tagName: 'ul'
|
||||||
|
|
||||||
emptyView: Ember.View.extend
|
emptyView: Ember.View.extend
|
||||||
template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>')
|
template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>')
|
||||||
|
|
||||||
itemViewClass: Travis.View.extend
|
itemViewClass: Travis.View.extend
|
||||||
repoBinding: 'content'
|
repoBinding: 'content'
|
||||||
classNames: ['repo']
|
classNames: ['repo']
|
||||||
|
@ -16,31 +16,34 @@
|
||||||
selected: (->
|
selected: (->
|
||||||
@get('content') == @get('controller.selectedRepo')
|
@get('content') == @get('controller.selectedRepo')
|
||||||
).property('controller.selectedRepo')
|
).property('controller.selectedRepo')
|
||||||
|
|
||||||
color: (->
|
color: (->
|
||||||
Travis.Helpers.colorForState(@get('repo.lastBuildState'))
|
Travis.Helpers.colorForState(@get('repo.lastBuildState'))
|
||||||
).property('repo.lastBuildState')
|
).property('repo.lastBuildState')
|
||||||
|
|
||||||
|
click: ->
|
||||||
|
@get('controller').transitionToRoute('/' + @get('repo.slug'))
|
||||||
|
|
||||||
ReposListTabsView: Travis.View.extend
|
ReposListTabsView: Travis.View.extend
|
||||||
templateName: 'repos/list/tabs'
|
templateName: 'repos/list/tabs'
|
||||||
tabBinding: 'controller.tab'
|
tabBinding: 'controller.tab'
|
||||||
currentUserBinding: 'controller.currentUser.id'
|
currentUserBinding: 'controller.currentUser.id'
|
||||||
|
|
||||||
activate: (name) ->
|
activate: (name) ->
|
||||||
@get('controller').transitionToRoot()
|
@get('controller').transitionToRoot()
|
||||||
@get('controller').activate(name)
|
@get('controller').activate(name)
|
||||||
|
|
||||||
classRecent: (->
|
classRecent: (->
|
||||||
'active' if @get('tab') == 'recent'
|
'active' if @get('tab') == 'recent'
|
||||||
).property('tab')
|
).property('tab')
|
||||||
|
|
||||||
classOwned: (->
|
classOwned: (->
|
||||||
classes = []
|
classes = []
|
||||||
classes.push('active') if @get('tab') == 'owned'
|
classes.push('active') if @get('tab') == 'owned'
|
||||||
classes.push('display-inline') if @get('currentUser')
|
classes.push('display-inline') if @get('currentUser')
|
||||||
classes.join(' ')
|
classes.join(' ')
|
||||||
).property('tab', 'currentUser')
|
).property('tab', 'currentUser')
|
||||||
|
|
||||||
classSearch: (->
|
classSearch: (->
|
||||||
'active' if @get('tab') == 'search'
|
'active' if @get('tab') == 'search'
|
||||||
).property('tab')
|
).property('tab')
|
Loading…
Reference in New Issue
Block a user