Show 'Top' button only if log has any content

This commit is contained in:
Piotr Sarnacki 2015-02-20 13:59:45 +01:00
parent 50ad230104
commit 92fbc73760
2 changed files with 5 additions and 1 deletions

View File

@ -41,6 +41,8 @@ Log = Ember.Object.extend
isLoaded: false
length: 0
hasContent: Ember.computed.gt('parts.length', 0)
fetchMissingParts: (partNumbers, after) ->
return if @get('notStarted')

View File

@ -12,7 +12,9 @@
</a>
<pre id="log" class="ansi"></pre>
<a href='#' class="to-top" {{action "toTop" target=view}}>Top</a>
{{#if view.log.hasContent}}
<a href='#' class="to-top" {{action "toTop" target=view}}>Top</a>
{{/if}}
{{#if view.limited}}
<p class="warning">