travis-web/assets/scripts/app/views/job.coffee
Piotr Sarnacki 840ce5a47d Revert "Merge pull request #308 from rwjblue/update-ember"
After upgrading ember to 1.8.1 tests pass, but I found a few cases where
things break (for example when navigating between certain routes). I'm
reverting for now.

This reverts commit fa5e9179af, reversing
changes made to 978c887123.
2014-11-12 12:11:53 +01:00

41 lines
1.1 KiB
CoffeeScript

Travis.reopen
JobsView: Travis.View.extend
templateName: 'jobs/list'
buildBinding: 'controller.build'
JobsItemView: Travis.View.extend
tagName: 'tr'
classNameBindings: ['color']
repoBinding: 'context.repo'
jobBinding: 'context'
color: (->
Travis.Helpers.colorForState(@get('job.state'))
).property('job.state')
JobView: Travis.View.extend
templateName: 'jobs/show'
repoBinding: 'controller.repo'
jobBinding: 'controller.job'
commitBinding: 'job.commit'
annotationsBinding: 'job.annotations'
currentItemBinding: 'job'
color: (->
Travis.Helpers.colorForState(@get('job.state'))
).property('job.state')
urlGithubCommit: (->
Travis.Urls.githubCommit(@get('repo.slug'), @get('commit.sha'))
).property('repo.slug', 'commit.sha')
urlCommitterGravatarImage: (->
Travis.Urls.gravatarImage(@get('commit.committerEmail'), 40)
).property('commit.committerEmail')
urlAuthorGravatarImage: (->
Travis.Urls.gravatarImage(@get('commit.authorEmail'), 40)
).property('commit.authorEmail')