From: Stas Vilchik Date: Thu, 6 Feb 2014 11:51:00 +0000 (+0600) Subject: New Issues Page: enable source code reference links X-Git-Tag: 4.2~218 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ea4f9f99af820d20bf2815a7553bfcfd23c417ca;p=sonarqube.git New Issues Page: enable source code reference links --- 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); },