         return data
     )
     @buildChildren(children)
-    #console.log @itemList
-    #console.log children
 
     _.compact(@itemList)
 

  className: ()->
    $('.order').data('class')

  list: (listClass=nil)->
    listClass ||= '.index-item, .sortable-item'
    children = new Array()
    @itemList = _.map($(listClass), (item, index)->
      data =
        id: $(item).data('id')
        position: index

    $("ul#tree").nestedSortable @options

    $('.order').bind 'click', ()->
      if $(@).data("list-class")
        Dust.sortables.listClass = "." + $(@).data("list-class") + " .index-item"
      else
        Dust.sortables.listClass = null
      Dust.sortables.saveItems()
      false

  saveItems : ()->
