Sha256: 1c65bb38cb22f0859bd22363a1c6ceb1677078ea7805f98292aa6b96b3d905dd

Contents?: true

Size: 634 Bytes

Versions: 6

Compression:

Stored size: 634 Bytes

Contents

namespace "SensuDashboard.Views.Events", (exports) ->

  class exports.ListItem extends SensuDashboard.Views.ListItem

    name: "events/list_item"

    className: ->
      @model.get("status_name")

    events:
      "click td:not(.select)": "showDetails"
      "click input[type=checkbox]": "toggleSelect"

    initialize: ->
      @client = SensuDashboard.Clients.get(@model.get("client"))
      @listenTo(@client, "remove", @remove)
      super

    toggleSelect: ->
      @model.set(selected: !@model.get("selected"))

    showDetails: ->
      new SensuDashboard.Views.Events.Modal
        event: @model
        client: @client

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sensu-dashboard-0.10.4 lib/sensu-dashboard/assets/javascripts/views/events/list_item.coffee
sensu-dashboard-0.10.3 lib/sensu-dashboard/assets/javascripts/views/events/list_item.coffee
sensu-dashboard-0.10.2 lib/sensu-dashboard/assets/javascripts/views/events/list_item.coffee
sensu-dashboard-0.10.1 lib/sensu-dashboard/assets/javascripts/views/events/list_item.coffee
sensu-dashboard-0.10.0 lib/sensu-dashboard/assets/javascripts/views/events/list_item.coffee
sensu-dashboard-0.9.9 lib/sensu-dashboard/assets/javascripts/views/events/list_item.coffee