diff options
author | Daniel Beauchamp <daniel.beauchamp@shopify.com> | 2012-08-02 13:38:19 -0400 |
---|---|---|
committer | Daniel Beauchamp <daniel.beauchamp@shopify.com> | 2012-08-02 13:38:19 -0400 |
commit | cdd8ff258582f5eba7e3941a5a18007e7aabbbfa (patch) | |
tree | 259644bbbda24070efc5685445e6b26187a70b20 /templates/project/widgets/list/list.coffee | |
parent | 1dcf732b801f9fa513901fda27388a36eddb44ab (diff) |
Better generators, sample widgets, and more!
Diffstat (limited to 'templates/project/widgets/list/list.coffee')
-rw-r--r-- | templates/project/widgets/list/list.coffee | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/templates/project/widgets/list/list.coffee b/templates/project/widgets/list/list.coffee new file mode 100644 index 0000000..6b1cc50 --- /dev/null +++ b/templates/project/widgets/list/list.coffee @@ -0,0 +1,15 @@ +class AllTheThings.List extends AllTheThings.Widget + source: 'list' + + @accessor 'current', Batman.Property.EasingSetter + + @accessor 'arrow', -> + if @get('last') + if parseInt(@get('current')) > parseInt(@get('last')) then 'arrow-up' else 'arrow-down' + + ready: -> + Batman.setImmediate => + if @get('unordered') + $(@node).find('ol').remove() + else + $(@node).find('ul').remove()
\ No newline at end of file |