diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-10-16 14:39:53 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-10-16 14:40:08 +0200 |
commit | d87dac7c73a4070d49f3e974eb6c92c113e1ec16 (patch) | |
tree | 25849b347636b27599a79e4435938094727aeef2 /server | |
parent | a94b33068dbd319846385dcc8ac086beb643deb3 (diff) | |
download | sonarqube-d87dac7c73a4070d49f3e974eb6c92c113e1ec16.tar.gz sonarqube-d87dac7c73a4070d49f3e974eb6c92c113e1ec16.zip |
do not reload profile details when selecting a project, fix tooltips
Diffstat (limited to 'server')
-rw-r--r-- | server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js | 13 |
1 files changed, 10 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); |