]> source.dussan.org Git - sonarqube.git/commitdiff
New Issues Page: move the display of the characteristics info near the rule key ...
authorStas Vilchik <vilchiks@gmail.com>
Mon, 10 Feb 2014 07:23:29 +0000 (13:23 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 10 Feb 2014 07:23:38 +0000 (13:23 +0600)
sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail_inner.hbs.erb
sonar-server/src/main/webapp/WEB-INF/app/views/issues/templates/_issue_detail_rule.hbs.erb
sonar-server/src/main/webapp/javascripts/navigator/issues.js

index 1609182eb0042e581f2487abdeee9f405f1eff54..c41b006953ff8c89503642c928b38bf18be88bc6 100644 (file)
@@ -99,7 +99,7 @@
       {{/ifHasExtraActions}}
 
       {{#if debt}}
-        <li title="{{#all characteristic subCharacteristic}}{{characteristic}} > {{subCharacteristic}}{{else}}<%= message('issue.technical_debt_deleted') -%>{{/all}}"><%= message('issue.technical_debt_short') -%>: {{debt}}</li>
+        <li><%= message('issue.technical_debt_short') -%>: {{debt}}</li>
       {{/if}}
 
       {{#if reporterName}}<li><%= message('reporter') -%>: {{reporterName}}</li>{{/if}}
index 73860a817564375cab016834ba54901a1c60f304..cf8b173b6fd3784adf627faba5e6123f6df19e73 100644 (file)
@@ -1,5 +1,9 @@
 <script id="issue-detail-rule-template" type="text/x-handlebars-template">
   <h1 class="marginbottom10">{{name}}</h1>
   <div class="marginbottom10">{{{description}}}</div>
-  <p class="note">{{key}}</p>
+  <p class="note">
+    <span class="spacer-right">{{key}}</span>
+    <%= image_tag 'sep12.png', :class => 'spacer-right' -%>
+    {{#all characteristic subCharacteristic}}{{characteristic}} > {{subCharacteristic}}{{else}}<%= message('issue.technical_debt_deleted') -%>{{/all}}
+  </p>
 </script>
index 04dec8129cca275cf0cb419b1595360b383255cd..d4111c6447bf5993cb074a62c9610db03363ad28 100644 (file)
@@ -770,7 +770,15 @@ jQuery(function() {
   var IssueDetailRuleView = Backbone.Marionette.ItemView.extend({
     template: Handlebars.compile(jQuery('#issue-detail-rule-template').html() || ''),
     className: 'rule-desc',
-    modelEvents: { 'change': 'render' }
+    modelEvents: { 'change': 'render' },
+
+
+    serializeData: function() {
+      return _.extend({
+        characteristic: this.options.issue.get('characteristic'),
+        subCharacteristic: this.options.issue.get('subCharacteristic')
+      }, this.model.toJSON());
+    }
   });
 
 
@@ -811,7 +819,10 @@ jQuery(function() {
       this.$('.code-issue-details').tabs();
       this.$('.code-issue-form').hide();
       this.rule = new Rule({ key: this.model.get('rule') });
-      this.ruleRegion.show(new IssueDetailRuleView({ model: this.rule }));
+      this.ruleRegion.show(new IssueDetailRuleView({
+        model: this.rule,
+        issue: this.model
+      }));
       this.initReferenceLinks();
     },