         $el.on "click", ".add-comment a.button-green", (event) ->
             event.preventDefault()
 
+            target = angular.element(event.currentTarget)
+
             $el.find(".comment-list").addClass("activeanimation")
             onSuccess = ->
-                $ctrl.loadHistory(type, objectId)
+                $ctrl.loadHistory(type, objectId).finally ->
+                    $loading.finish(target)
 
             onError = ->
+                $loading.finish(target)
                 $confirm.notify("error")
 
             model = $scope.$eval($attrs.ngModel)
+            $loading.start(target)
             $ctrl.repo.save(model).then(onSuccess, onError)
 
         $el.on "click", ".show-more", (event) ->

        return @rs.history.undeleteComment(type, objectId, activityId).then => @.loadHistory(type, objectId)


HistoryDirective = ($log) ->
    templateChangeDiff = _.template("""
    <div class="change-entry">
        <div class="activity-changed">

    }


module.directive("tgHistory", ["$log", "$tgLoading", HistoryDirective])
