aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-10-16 14:39:53 +0200
committerStas Vilchik <vilchiks@gmail.com>2015-10-16 14:40:08 +0200
commitd87dac7c73a4070d49f3e974eb6c92c113e1ec16 (patch)
tree25849b347636b27599a79e4435938094727aeef2
parenta94b33068dbd319846385dcc8ac086beb643deb3 (diff)
downloadsonarqube-d87dac7c73a4070d49f3e974eb6c92c113e1ec16.tar.gz
sonarqube-d87dac7c73a4070d49f3e974eb6c92c113e1ec16.zip
do not reload profile details when selecting a project, fix tooltips
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js13
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties3
2 files changed, 13 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
index 03ea016e555..164e727ac00 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
@@ -17,7 +17,7 @@ export default Marionette.LayoutView.extend({
},
modelEvents: {
- 'change': 'render',
+ 'change': 'onChange',
'flashChangelog': 'flashChangelog'
},
@@ -47,6 +47,13 @@ export default Marionette.LayoutView.extend({
});
},
+ onChange: function () {
+ var changed = Object.keys(this.model.changedAttributes());
+ if (!(changed.length === 1 && changed[0] === 'projectCount')) {
+ this.render();
+ }
+ },
+
initProjectsSelect: function () {
var key = this.model.get('key');
this.projectsSelectList = new window.SelectList({
@@ -73,8 +80,8 @@ export default Marionette.LayoutView.extend({
noResults: t('quality_gates.projects.noResults')
},
tooltips: {
- select: t('quality_gates.projects.select_hint'),
- deselect: t('quality_gates.projects.deselect_hint')
+ select: t('quality_profiles.projects.select_hint'),
+ deselect: t('quality_profiles.projects.deselect_hint')
}
});
this.listenTo(this.projectsSelectList.collection, 'change:selected', this.onProjectsChange);
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index eda4051dd78..6d52e0d462c 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -1821,6 +1821,9 @@ quality_profiles.all_profiles=All Profiles
quality_profiles.x_profiles={0} Profiles
quality_profiles.x_projects={0} projects
quality_profiles.no_results=No profiles found. Try installing a language plugin.
+quality_profiles.projects.select_hint=Click to associate this project with the quality profile
+quality_profiles.projects.deselect_hint=Click to remove association between this project and the quality profile
+