 
   initialize: ->
     _.bindAll @, "selectPrevious", "selectNext", "switchItem", "toggleStatus", "moveSelectionUp", "moveSelectionDown", "indentItem", "outdentItem", "newItem", "deleteItem"
-  
+
   firstChild: ->
     @el.firstChild.view
 


  newItem: (placement) ->
    selection = App.selection()
    if selection
      parent = selection.parent
    else
      parent = App.root
    itemView = new App.backbone.ItemView(item)
    itemView.render()
    if selection
      if placement == "previous"
        item.insertBefore selection
        $(item.view.el).insertBefore selection.view.el
      else
        if selection.children.size() > 0
          selection = selection.children.first()
          item.insertBefore selection
          $(item.view.el).insertBefore selection.view.el
        else
          if placement == "indent"
            item.insertAfter selection
            item.indent()
          else # insert after
            item.insertAfter selection
            $(item.view.el).insertAfter selection.view.el
    else
      $(@el).append itemView.el
    item.select()
    _.defer ->
      App.selection().view.switchToForm()

  deleteItem: ->
    App.selection().remove()

      App.mainList.view.outdentItem()

  setupItems: (items) ->


  setup: ->
    list = App.data.list
