From ea4f9f99af820d20bf2815a7553bfcfd23c417ca Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 6 Feb 2014 17:51:00 +0600 Subject: [PATCH] New Issues Page: enable source code reference links --- .../app/views/issues/templates/_issue_detail.hbs.erb | 2 +- .../src/main/webapp/javascripts/navigator/issues.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail.hbs.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail.hbs.erb index 9d3317caace..64a6e849814 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail.hbs.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail.hbs.erb @@ -24,7 +24,7 @@ {{/unless}}
- +
{{#sources source scm}}
diff --git a/sonar-server/src/main/webapp/javascripts/navigator/issues.js b/sonar-server/src/main/webapp/javascripts/navigator/issues.js index a04259a9b6a..bf5b824138f 100644 --- a/sonar-server/src/main/webapp/javascripts/navigator/issues.js +++ b/sonar-server/src/main/webapp/javascripts/navigator/issues.js @@ -813,6 +813,13 @@ jQuery(function() { this.$('.code-issue-form').hide(); this.rule = new Rule({ key: this.model.get('rule') }); this.ruleRegion.show(new IssueDetailRuleView({ model: this.rule })); + this.initReferenceLinks(); + }, + + + initReferenceLinks: function() { + var sourcesId = 'sources_' + this.model.get('key'); + this.$('#' + sourcesId).on('click', 'span.sym', { id: sourcesId }, highlight_usages); }, -- 2.39.5