                     @model.set 'tags', tags
                     @hideLoading()
                     @saving = false
+                    callback?.success()
                 error: =>
                     alert "An error occured, modifications were not saved."
                     @hideLoading()

        @list.draggedItem = null

    onReorder: (draggedItem, newIndex) ->
        #console.debug newIndex
        if not @list.isSaving
            isReordered = @model.collection.reorder draggedItem.model, newIndex

            if @model.collection.listId? and isReordered
                @list.isSaving = true
                draggedItem.showLoading()
                childrenTasks = @list.$el.children('.task')
                oldIndex = childrenTasks.index(draggedItem.$el)


    # Display loading indicator inside todo/done button and hide button text.
    showLoading: ->
        #@hideLoading()
        @todoButton.html "&nbsp;"
        @todoButton.spin "tiny"

