blob: f87b9fbd9dc16f3b638252d83f08cc486f1ab92a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class AllTheThings.Widget extends Batman.View
constructor: ->
super
@mixin($(@node).data())
AllTheThings.widgets[@id] ||= []
AllTheThings.widgets[@id].push(@)
@mixin(AllTheThings.lastEvents[@id]) # in case the events from the server came before the widget was rendered
type = Batman.Filters.dashize(@view)
$(@node).addClass("widget #{type} #{@id}")
onData: (data) =>
@mixin(data)
|