]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5007 Allow user to cancel rule tag edition
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 3 Jun 2014 16:50:38 +0000 (18:50 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 3 Jun 2014 16:50:38 +0000 (18:50 +0200)
sonar-server/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee

index 0603a5985c29a5985be957202c705a3724026a2c..017cd4a71c2252bad86df2c82a0da54abaaff314 100644 (file)
@@ -117,6 +117,15 @@ define [
       @ui.tagsEdit.show()
       @ui.tagsList.hide()
       @ui.tagInput.select2 'open'
+      key.setScope 'tags'
+      key 'escape', 'tags', => @cancelEdit()
+
+
+    cancelEdit: ->
+      key.unbind 'escape', 'tags'
+      @ui.tagsList.show()
+      @ui.tagInput.select2 'close'
+      @ui.tagsEdit.hide()
 
 
     editDone: ->