]> source.dussan.org Git - sonarqube.git/commitdiff
New Issues Page: enable source code reference links
authorStas Vilchik <vilchiks@gmail.com>
Thu, 6 Feb 2014 11:51:00 +0000 (17:51 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 6 Feb 2014 11:51:00 +0000 (17:51 +0600)
sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail.hbs.erb
sonar-server/src/main/webapp/javascripts/navigator/issues.js

index 9d3317caace0a386637980ab3b136f83db147a91..64a6e8498145de322160d467350688adc08d5fed 100644 (file)
@@ -24,7 +24,7 @@
     {{/unless}}
 
     <div class="bordered">
-      <table id="sources_60" class="sources2 code" cellpadding="0" cellspacing="0">
+      <table id="sources_{{key}}" class="sources2 code" cellpadding="0" cellspacing="0">
         {{#sources source scm}}
           <tr class="row">
             <td class="scm {{#if scm}}revision{{/if}}" {{#if first}}style="border-top:none;"{{/if}}>
index a04259a9b6a267c348e251ed93712092be44a519..bf5b824138f8f780add568e43725d8b1cf4a48b0 100644 (file)
@@ -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);
     },