aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-06-13 14:29:19 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-06-13 14:29:28 +0200
commit2ee942fcd4d6ef0ec2367bcc8fc78a9bb1bb5e0d (patch)
treeab6d37345fd40c6a33a23877d1b606471460aff2 /sonar-server
parent3eabe518ac9030980da16e8cb9eeff919a04e354 (diff)
downloadsonarqube-2ee942fcd4d6ef0ec2367bcc8fc78a9bb1bb5e0d.tar.gz
sonarqube-2ee942fcd4d6ef0ec2367bcc8fc78a9bb1bb5e0d.zip
SONAR-5136 Fix handling of server errors when editing tags
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee19
1 files changed, 13 insertions, 6 deletions
diff --git a/sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee b/sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee
index 54b69efdf97..2f9ce297ca4 100644
--- a/sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee
+++ b/sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee
@@ -155,17 +155,22 @@ define [
changeTags: ->
- @ui.tagsEdit.show()
- @ui.tagsList.hide()
+ if @ui.tagsEdit.show
+ @ui.tagsEdit.show()
+ if @ui.tagsList.hide
+ @ui.tagsList.hide()
key.setScope 'tags'
key 'escape', 'tags', => @cancelEdit()
cancelEdit: ->
key.unbind 'escape', 'tags'
- @ui.tagsList.show()
- @ui.tagInput.select2 'close'
- @ui.tagsEdit.hide()
+ if @ui.tagsList.show
+ @ui.tagsList.show()
+ if @ui.tagInput.select2
+ @ui.tagInput.select2 'close'
+ if @ui.tagsEdit.hide
+ @ui.tagsEdit.hide()
editDone: ->
@@ -179,7 +184,9 @@ define [
tags: tags
.done (r) =>
@model.set 'tags', r.rule.tags
- @render()
+ @cancelEdit()
+ .always =>
+ @render()
showExtendDescriptionForm: ->