aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/coding-rules
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-03-03 11:15:53 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-03-03 11:16:00 +0100
commitd8f2ffc7f07be46aa1d77b2429244febeea22523 (patch)
tree7468f0fbd0ff84b69fe576205589463423c1d8a3 /server/sonar-web/src/main/js/apps/coding-rules
parent0284c071909c365e22a9d3b0dda151bb78dbb839 (diff)
downloadsonarqube-d8f2ffc7f07be46aa1d77b2429244febeea22523.tar.gz
sonarqube-d8f2ffc7f07be46aa1d77b2429244febeea22523.zip
SONAR-7329 display rule type in the rules list
Diffstat (limited to 'server/sonar-web/src/main/js/apps/coding-rules')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-workspace-list-item.hbs4
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js13
2 files changed, 17 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-workspace-list-item.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-workspace-list-item.hbs
index 92aef7fdc1c..608d10f292b 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-workspace-list-item.hbs
+++ b/server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-workspace-list-item.hbs
@@ -32,6 +32,10 @@
<i class="icon-tags"></i>
<span class="note">{{join tags ', '}}</span>
{{/notEmpty}}
+ &nbsp;&nbsp;&nbsp;
+ <span data-toggle="tooltip" data-placement="bottom" title="{{t 'coding_rules.type.tooltip' this.type}}">
+ {{issueType this.type}}
+ </span>
<a class="js-rule-filter link-no-underline spacer-left" href="#">
<i class="icon-filter icon-half-transparent"></i>&nbsp;<i class="icon-dropdown"></i>
</a>
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 13a433a87e9..bfdc56dcead 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
@@ -46,11 +46,24 @@ export default WorkspaceListItemView.extend(RuleFilterMixin).extend({
'click .coding-rules-detail-quality-profile-deactivate': 'deactivate'
},
+ onRender () {
+ WorkspaceListItemView.prototype.onRender.apply(this, arguments);
+ this.$('[data-toggle="tooltip"]').tooltip({
+ container: 'body'
+ });
+ },
+
+ onDestroy () {
+ this.$('[data-toggle="tooltip"]').tooltip('destroy');
+ WorkspaceListItemView.prototype.onDestroy.apply(this, arguments);
+ },
+
selectCurrent () {
this.options.app.state.set({ selectedIndex: this.model.get('index') });
},
openRule () {
+ this.$('[data-toggle="tooltip"]').tooltip('destroy');
this.options.app.controller.showDetails(this.model);
},