]> source.dussan.org Git - sonarqube.git/commitdiff
Fix deletion of issue comments
authorStas Vilchik <vilchiks@gmail.com>
Mon, 12 Jan 2015 13:12:52 +0000 (14:12 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 12 Jan 2015 13:17:42 +0000 (14:17 +0100)
server/sonar-web/src/main/coffee/issue/issue-view.coffee

index c1372167f77a24d0f22a29a9aa80c101ac97f091..de94e25726a756c0b8d965fb8bab902693b66c80 100644 (file)
@@ -160,18 +160,19 @@ define [
 
 
     deleteComment: (e) ->
+      p = window.process.addBackgroundProcess()
       commentKey = $(e.target).closest('[data-comment-key]').data 'comment-key'
       confirmMsg = $(e.target).data 'confirm-msg'
 
       if confirm(confirmMsg)
-        @showActionSpinner()
         $.ajax
           type: "POST"
-          url: baseUrl + "/issue/delete_comment?id=" + commentKey
-        .done => @updateAfterAction true
+          url: baseUrl + "/api/issues/delete_comment?key=" + commentKey
+        .done =>
+          @updateAfterAction true
+          window.process.finishBackgroundProcess p
         .fail (r) =>
-          alert  _.pluck(r.responseJSON.errors, 'msg').join(' ')
-          @hideActionSpinner()
+          window.process.failBackgroundProcess p
 
 
     transition: (e) ->