aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/coding-rules/facets
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/coding-rules/facets')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js16
1 files changed, 2 insertions, 14 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js
index 836e10783c9..9142102574e 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js
@@ -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');
}