More ember-cli compat changes

This commit is contained in:
Piotr Sarnacki 2015-01-28 16:07:49 +01:00
parent cb3bb3830c
commit 138d5c2206
13 changed files with 13 additions and 6 deletions

View File

@ -1,4 +1,6 @@
Travis.JobController = Em.Controller.extend
githubCommit = Travis.Urls.githubCommit
Controller = Ember.Controller.extend
needs: ['repo']
repoBinding: 'controllers.repo.repo'
@ -10,5 +12,7 @@ Travis.JobController = Em.Controller.extend
currentItemBinding: 'job'
urlGithubCommit: (->
Travis.Urls.githubCommit(@get('repo.slug'), @get('commit.sha'))
githubCommit(@get('repo.slug'), @get('commit.sha'))
).property('repo.slug', 'commit.sha')
Travis.JobController = Controller

View File

@ -1,8 +1,9 @@
require 'travis/limited_array'
Repo = Travis.Repo
limit = Ember.computed.limit
Travis.ReposController = Ember.ArrayController.extend
Controller = Ember.ArrayController.extend
actions:
activate: (name) ->
@activate(name)
@ -36,7 +37,7 @@ Travis.ReposController = Ember.ArrayController.extend
isLoadedBinding: 'repos.isLoaded'
repos: Repo.withLastBuild(@store)
sorted: Ember.computed.sort('repos', 'sortedReposKeys')
content: Ember.computed.limit('sorted', 'limit')
content: limit('sorted', 'limit')
sortedReposKeys: ['sortOrder:asc']
limit: 30
).create()
@ -90,3 +91,5 @@ Travis.ReposController = Ember.ArrayController.extend
else
'Could not find any repos'
).property('tab')
Travis.ReposController = Controller

View File

@ -1,4 +1,4 @@
Travis.RequestController = Ember.ObjectController.extend
Controller = Ember.ObjectController.extend
requestClass: (->
if @get('content.isAccepted')
'accepted'
@ -28,4 +28,4 @@ Travis.RequestController = Ember.ObjectController.extend
message
).property('model.message')
Travis.RequestController = Controller