]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaw
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Tue, 11 Jul 2017 10:01:19 +0000 (12:01 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Tue, 11 Jul 2017 12:43:47 +0000 (14:43 +0200)
server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js

index 836e10783c9714121640f09211d9b2ce8c62bbc2..9142102574eadab39b4deb2049517cb5d7ed90ac 100644 (file)
@@ -34,22 +34,10 @@ export default BaseFacet.extend({
   },
 
   onRender() {
-    this.$el.toggleClass('search-navigator-facet-box-collapsed', !this.model.get('enabled'));
-    this.$el.attr('data-property', this.model.get('property'));
-    const that = this;
-    const property = this.model.get('property');
-    const value = this.options.app.state.get('query')[property];
-    if (typeof value === 'string') {
-      value.split(',').forEach(s => {
-        const facet = that.$('.js-facet').filter(`[data-value="${s}"]`);
-        if (facet.length > 0) {
-          facet.addClass('active');
-        }
-      });
-    }
+    BaseFacet.prototype.onRender.apply(this, arguments);
     const compareToProfile = this.options.app.state.get('query').compareToProfile;
     if (typeof compareToProfile === 'string') {
-      const facet = that.$('.js-facet').filter(`[data-value="${compareToProfile}"]`);
+      const facet = this.$('.js-facet').filter(`[data-value="${compareToProfile}"]`);
       if (facet.length > 0) {
         facet.addClass('active compare');
       }