From 6de86daae8f53f77a2c5a75b1f8eceb7c6cc5ccc Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 16 Sep 2015 15:21:31 +0200 Subject: SONAR-6598 scroll index should be saved when (de-)activating a rule in a profile --- server/sonar-web/src/main/js/apps/coding-rules/models/rule.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'server/sonar-web/src/main/js/apps/coding-rules/models') diff --git a/server/sonar-web/src/main/js/apps/coding-rules/models/rule.js b/server/sonar-web/src/main/js/apps/coding-rules/models/rule.js index 51993df4b98..9610739b9dd 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/models/rule.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/models/rule.js @@ -32,6 +32,16 @@ define(function () { isManual: isManual, isCustom: isCustom }, { silent: true }); + }, + + getInactiveProfiles: function (actives, profiles) { + return actives.map(function (profile) { + var profileBase = _.findWhere(profiles, { key: profile.qProfile }); + if (profileBase != null) { + _.extend(profile, profileBase); + } + return profile; + }); } }); -- cgit v1.2.3