]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5820 fix template facet
authorStas Vilchik <vilchiks@gmail.com>
Fri, 6 Feb 2015 10:00:04 +0000 (11:00 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 6 Feb 2015 10:00:04 +0000 (11:00 +0100)
server/sonar-web/src/main/js/coding-rules/facets/template-facet.js

index 81a031da126d45e51b1bad4b8350b7976e7878c6..3524935bdf02b6a4f0b398a761a42d74a4779da2 100644 (file)
@@ -20,7 +20,11 @@ define([
       $(e.currentTarget).toggleClass('active');
       var property = this.model.get('property'),
           obj = {};
-      obj[property] = '' + $(e.currentTarget).data('value');
+      if ($(e.currentTarget).hasClass('active')) {
+        obj[property] = '' + $(e.currentTarget).data('value');
+      } else {
+        obj[property] = null;
+      }
       this.options.app.state.updateFilter(obj);
     }