Sha256: 8ede85ee0f9a7690faae1e66824caafc96d9197171835d9df6ad1b1c40015048

Contents?: true

Size: 904 Bytes

Versions: 1

Compression:

Stored size: 904 Bytes

Contents

class window.TestingReportView extends Backbone.View
  
  initialize: ->
    @tickets = @options.tickets
    @projectsCanCloseTicketsFor = @options.projectsCanCloseTicketsFor
    @tickets.bind 'reset', _.bind(@render, @)
    @expander = new TableRowExpander()
    
    # Prevent tablesorter from exhuming buried rows
    @tickets.bind 'destroy', (ticket)=>
      $('table.testing-report-table').trigger('update')
      
    @render()
  
  render: ->
    @$el.empty()
    views = @tickets.map (ticket)=>
      view = new TestingTicketView
        ticket: ticket
        canClose: _.include(@projectsCanCloseTicketsFor, ticket.get('projectId'))
      @$el.appendView view
      view
    
    @expander.setupForViews views
    
    $("[data-tester-id=#{window.userId}]").addClass('current-tester') if window.userId
    
    $('table.testing-report-table').tablesorter
      headers: {'4': {sorter: 'text'}}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
houston-core-0.5.0.beta1 app/assets/javascripts/app/views/testing_report_view.coffee