From 4c358f8ee89cddc977c8f1d9329c5ae22a0475c9 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 18 Aug 2015 15:39:55 +0200 Subject: fix SONAR-6657 Cannot deactivate just activated rule --- .../src/main/js/apps/coding-rules/rule/profile-activation-view.js | 2 +- .../src/main/js/apps/coding-rules/workspace-list-item-view.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'server/sonar-web/src/main/js/apps/coding-rules') diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js index a310ce97674..87296ca2e0f 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js @@ -112,7 +112,7 @@ define([ } }).done(function () { that.destroy(); - that.trigger('profileActivated', severity, params); + that.trigger('profileActivated', severity, params, profileKey); }).fail(function (jqXHR) { that.enableForm(); that.showErrors(jqXHR.responseJSON.errors, jqXHR.responseJSON.warnings); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js index b18ba7b52e1..1041a326de9 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js @@ -62,10 +62,12 @@ define([ collection: new Backbone.Collection(othersQualityProfiles), app: this.options.app }); - activationView.on('profileActivated', function (severity) { + activationView.on('profileActivated', function (severity, params, profile) { var activation = { severity: severity, - inherit: 'NONE' + inherit: 'NONE', + params: params, + qProfile: profile }; that.model.set({ activation: activation }); }); -- cgit v1.2.3