anchor.diff:      dataType: 'json',
       data: {
         item: {
  -        name: data.name,
  -        category_id: data.category_id
  +        name: item.name,
  +        category_id: item.category_id
         }
       }
     }
  
positive.code: Helper function to create a button for each JS Item
  ###
  create_button = (name) ->
    list_item = $(document.createElement('li'))
    list_item.addClass 'list-group-item btn btn-default'
    list_item.append $(document.createTextNode(name))
  
    list_item.click ->
      toggle_active list_item
  
negative.code:       # Close the dialog
        $('#new-item').modal('hide')
  
        # Add the new item to the items picker (maintaining sorted order) and filter by its category
        index = _.sortedIndex(items_by_category[item.category_id], item, 'name')
        items_by_category[item.category_id].splice index, 0, item
        filter_by_category(item.category_id, force: true)
  
        # Scroll to the new item
        first = $('#items li').first().position().top
        elem = $("#items li[name=#{item.name}]").position().top
        $('#items').scrollTop(elem - first);
  
        # And select it
        activate $("#items li[name=#{item.name}")
  
        # Let the user know we did it
        flash_success("Item \"#{item.name}\" created")
      else
        res.errors.forEach (err) -> flash_error(err, selector: '#new-item-errors')
    .fail (xhr, status, msg) ->
  