aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-07-11 12:01:19 +0200
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-07-11 14:43:47 +0200
commit5f6f6943a2bf1bf822b7987cec8d081a58d07ec0 (patch)
tree9dbdce63bf985adfc7b76ff382943575ed5b6713 /server/sonar-web
parent47cfe885fcfc2db477042626bcc8564465344039 (diff)
downloadsonarqube-5f6f6943a2bf1bf822b7987cec8d081a58d07ec0.tar.gz
sonarqube-5f6f6943a2bf1bf822b7987cec8d081a58d07ec0.zip
Fix quality flaw
Diffstat (limited to 'server/sonar-web')
-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');
}