Fix showAll button

This commit is contained in:
Piotr Sarnacki 2013-02-26 11:21:34 +01:00
parent a47147ed82
commit 12da46a623
3 changed files with 4 additions and 5 deletions

View File

@ -18,6 +18,9 @@ Travis.reopen
name: queue.display name: queue.display
@set 'content', queues @set 'content', queues
showAll: (queue) ->
queue.showAll()
WorkersController: Em.ArrayController.extend WorkersController: Em.ArrayController.extend
init: -> init: ->
@_super.apply this, arguments @_super.apply this, arguments

View File

@ -20,7 +20,7 @@
</ul> </ul>
{{#if queue.isMore}} {{#if queue.isMore}}
<a {{action showAll this.queue target="view"}} class="show-more-jobs"> <a {{action showAll queue}} class="show-more-jobs">
{{queue.leftLength}} more jobs - show all {{queue.leftLength}} more jobs - show all
</a> </a>
{{/if}} {{/if}}

View File

@ -26,10 +26,6 @@
@_super.apply this, arguments @_super.apply this, arguments
@set 'controller', @get('controller').container.lookup('controller:queues') @set 'controller', @get('controller').container.lookup('controller:queues')
showAll: ->
queue = event.context
queue.showAll()
RunningJobsView: Em.View.extend RunningJobsView: Em.View.extend
templateName: 'jobs/running' templateName: 'jobs/running'
elementId: 'running-jobs' elementId: 'running-jobs'