Sha256: 12eeb7d3ce03b7d6b633a74de6b1044615db09be83dae38fb92ce9e0eabe626d
Contents?: true
Size: 499 Bytes
Versions: 35
Compression:
Stored size: 499 Bytes
Contents
SensorInfoListView = Backbone.View.extend { tagName: 'div' template: -> _.template($("#sensor-list").html()) initialize: (sensorInfo) -> @sensorInfo = sensorInfo @sensorInfo.bind 'reset', @render, this render: -> @$el.html @template()({sensors: @sensorInfo.toJSON()}) selectedSensors: -> checked = _.filter @$el.find('.sensor-box'), (el) -> $(el).is(':checked') ids = {} _.each checked, (box) -> ids[box.id] = true selected = @sensorInfo.filter (sensor) -> ids[sensor.id] }
Version data entries
35 entries across 35 versions & 3 rubygems