We don't need to check isComplete now

We load records based on the tries to load attributes that are not
loaded yet, so isComplete is obsolete now.
This commit is contained in:
Piotr Sarnacki 2012-11-06 19:26:42 +01:00
parent b164e5f1a8
commit cc1df67272
3 changed files with 4 additions and 8 deletions

View File

@ -1,5 +1,5 @@
{{#with view}} {{#with view}}
{{#if job.isComplete}} {{#if job.isLoaded}}
<div {{bindAttr class="view.color"}}> <div {{bindAttr class="view.color"}}>
<dl id="summary"> <dl id="summary">
<div class="left"> <div class="left">

View File

@ -2,7 +2,7 @@
{{#if view.isEmpty}} {{#if view.isEmpty}}
{{view Travis.ReposEmptyView}} {{view Travis.ReposEmptyView}}
{{else}} {{else}}
{{#if view.repo.isComplete}} {{#if view.repo.isLoaded}}
{{#with view.repo}} {{#with view.repo}}
<h3> <h3>
<a {{bindAttr href="view.urlGithub"}}>{{slug}}</a> <a {{bindAttr href="view.urlGithub"}}>{{slug}}</a>

View File

@ -6,12 +6,8 @@
repoBinding: 'controller.repo' repoBinding: 'controller.repo'
class: (-> class: (->
'loading' if !@get('repo.isComplete') && !@get('isEmpty') 'loading' unless @get('repo.isLoaded')
).property('repo.isComplete') ).property('repo.isLoaded')
isEmpty: (->
@get('repos.isLoaded') && @get('repos.length') == 0
).property('repos.length')
urlGithub: (-> urlGithub: (->
Travis.Urls.githubRepo(@get('repo.slug')) Travis.Urls.githubRepo(@get('repo.slug'))