diff options
Diffstat (limited to 'vendor/javascripts')
-rw-r--r-- | vendor/javascripts/application.coffee | 10 | ||||
-rw-r--r-- | vendor/javascripts/widget.coffee | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/vendor/javascripts/application.coffee b/vendor/javascripts/application.coffee index 6704ee5..4302611 100644 --- a/vendor/javascripts/application.coffee +++ b/vendor/javascripts/application.coffee @@ -18,10 +18,10 @@ Batman.Filters.shortenedNumber = (num) -> else num -class window.AllTheThings extends Batman.App +class window.Dashing extends Batman.App @root -> -Batman.Property.EasingSetter = +Dashing.AnimatedValue = get: Batman.Property.defaultAccessor.get set: (k, to) -> if isNaN(to) @@ -44,8 +44,8 @@ Batman.Property.EasingSetter = @set k, to @[k] = num -AllTheThings.widgets = widgets = {} -AllTheThings.lastEvents = lastEvents = {} +Dashing.widgets = widgets = {} +Dashing.lastEvents = lastEvents = {} source = new EventSource('/events') source.addEventListener 'open', (e) -> @@ -65,4 +65,4 @@ source.addEventListener 'message', (e) => $(document).ready -> - AllTheThings.run()
\ No newline at end of file + Dashing.run()
\ No newline at end of file diff --git a/vendor/javascripts/widget.coffee b/vendor/javascripts/widget.coffee index 5c5c1a3..980cae3 100644 --- a/vendor/javascripts/widget.coffee +++ b/vendor/javascripts/widget.coffee @@ -1,11 +1,13 @@ -class AllTheThings.Widget extends Batman.View +class Dashing.Widget extends Batman.View constructor: -> + # Set the view path + @constructor::source = Batman.Filters.underscore(@constructor.name) 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 + Dashing.widgets[@id] ||= [] + Dashing.widgets[@id].push(@) + @mixin(Dashing.lastEvents[@id]) # in case the events from the server came before the widget was rendered type = Batman.Filters.dashize(@view) $(@node).addClass("widget widget-#{type} #{@id}") |