diff options
author | Daniel Beauchamp <daniel.beauchamp@shopify.com> | 2012-08-08 18:02:56 -0400 |
---|---|---|
committer | Daniel Beauchamp <daniel.beauchamp@shopify.com> | 2012-08-08 18:06:58 -0400 |
commit | 780fe49f715c2fced88e958b02541bf8e7dca934 (patch) | |
tree | 7cd147e96913c9f95cda54f4bd341d0630e34c66 /vendor/javascripts | |
parent | cdd8ff258582f5eba7e3941a5a18007e7aabbbfa (diff) |
Rename project to 'Dashing', and do some other cleanups
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}") |