summaryrefslogtreecommitdiff
path: root/templates/project/widgets/list/list.coffee
blob: 3ca892b00356d1be312da9ca357b88f3b24a3768 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class Dashing.List extends Dashing.Widget
  @accessor 'current', Dashing.AnimatedValue

  @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()