 
   setBody: ->
     @body.html @itemData.body + "&nbsp;"
-    
+
   moveUp: ->
     $(@el).insertBefore $(@el).prev()
-  
+
   moveDown: ->
     $(@el).insertAfter $(@el).next()
-    
+
   next: ->
     all = $("#app li").toArray()
     index = all.indexOf(@el)
-    if index < all.length - 1 
+    if index < all.length - 1
       index++
     all[index].view
-    
+
   previous: ->
     all = $("#app li").toArray()
     index = all.indexOf(@el)
     if index > 0
       index--
     all[index].view
-    
+
   indent: ->
-    $(@childrenView.el).append @el
-    
+    if $(@el).prev("li").length
+      $($(@el).prev("li")[0].view.childrenView.el).append @el
+
   outdent: ->
     if $(@el).parents("li").length
-      $(@el).insertAfter $(el).parents("li")[0]
-    
+      $(@el).insertAfter $(@el).parents("li")[0]
+
   render: ->
     that = this
     $(@el).html @template(@itemData)

  selectNext: ->
    if not App.selected and App.selection()
      App.selection().select()
    else 
      App.selection()?.next()?.select()
    false


      App.mainList.view.outdentItem()

  setupItems: (items) ->


  setup: ->
    list = App.data.list
