Sha256: 33d9160b51f4e855ee182b45aefac6eaac52e3f23e22558eb088fdd649792b7d

Contents?: true

Size: 733 Bytes

Versions: 6

Compression:

Stored size: 733 Bytes

Contents

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

  class exports.ListItem extends SensuDashboard.Views.ListItem

    name: "stashes/list_item"

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

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

    render: ->
      template_data =
        selected: @model.get("selected"),
        path: @model.get("path"),
        key_list: Object.keys(@model.get("content")).join(", ")
      @$el.html(@template(template_data))
      this

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

    showDetails: ->
      new SensuDashboard.Views.Stashes.Modal
        name: "stashes/modal"
        model: @model

Version data entries

6 entries across 6 versions & 1 rubygems

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