aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-07-22 15:25:10 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-07-22 15:40:36 +0200
commita365aff2a33ca1dd32a7f3024c42d4e60a5e2a55 (patch)
tree7d822514ad242003e4158d462ddd18986bb8ecce /server/sonar-web/src/main
parente2067be4a3ecbbdcbd1aca0edeade851e9f67b24 (diff)
downloadsonarqube-a365aff2a33ca1dd32a7f3024c42d4e60a5e2a55.tar.gz
sonarqube-a365aff2a33ca1dd32a7f3024c42d4e60a5e2a55.zip
SONAR-5460 Show all parameter descriptions at once (instead of using bubbles)
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee14
-rw-r--r--server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs34
-rw-r--r--server/sonar-web/src/main/less/coding-rules.less30
-rw-r--r--server/sonar-web/src/main/less/style.less4
4 files changed, 26 insertions, 56 deletions
diff --git a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee
index 32dc6265801..6bb84a5be26 100644
--- a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee
+++ b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-detail-view.coffee
@@ -74,7 +74,6 @@ define [
'click @ui.changeManualRule': 'changeManualRule'
'click @ui.deleteCustomRule': 'deleteRule'
- 'click .coding-rules-detail-parameter-details': 'showParamPopup'
'click .coding-rules-subcharacteristic': 'toggleDebtInfo'
initialize: (options) ->
@@ -82,8 +81,6 @@ define [
if @model.get 'params'
origParams = @model.get('params')
- _.map origParams, (param) =>
- _.extend param, showMoreLink: (param.htmlDesc and param.htmlDesc.indexOf('<') >= 0)
@model.set 'params', _.sortBy(origParams, 'key')
_.map options.actives, (active) =>
@@ -175,17 +172,6 @@ define [
@ui.extendDescriptionSpinner.hide()
- showParamPopup: (e) ->
- e.stopPropagation()
- jQuery('body').click()
- key = jQuery(e.currentTarget).closest('.coding-rules-detail-parameter').data 'key'
- popup = new CodingRulesParameterPopupView
- model: new Backbone.Model _.findWhere(@model.get('params'), key: key)
- triggerEl: jQuery(e.currentTarget)
- popup.render()
- false
-
-
toggleDebtInfo: (e) ->
@ui.subcharacteristicMore.toggle()
false
diff --git a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs
index 9c99ffa04ca..7f65d83a2af 100644
--- a/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs
+++ b/server/sonar-web/src/main/hbs/coding-rules/coding-rules-detail.hbs
@@ -137,31 +137,26 @@
{{#if params}}
<h3 class="coding-rules-detail-title">{{t 'coding_rules.parameters'}}</h3>
- <ul class="coding-rules-detail-parameters">
+ <div class="coding-rules-detail-parameters">
{{#each params}}
- <li class="coding-rules-detail-parameter" data-key="{{key}}">
- <h3 class="coding-rules-detail-parameter-name">{{key}}</h3>
-
- <div class="coding-rules-detail-parameter-description">
- {{#if ../../templateKey}}
- <span class="value">{{defaultValue}}</span>
- {{else}}
- {{{htmlDesc}}}
- {{#if defaultValue}}
- <div>
- {{t 'coding_rules.parameters.default_value'}} {{defaultValue}}
- </div>
- {{/if}}
+ <dl class="coding-rules-detail-parameter">
+ <dt class="coding-rules-detail-parameter-name">{{key}}</dt>
+ <dd class="coding-rules-detail-parameter-description" data-key="{{key}}">
+ {{#if ../../templateKey}}
+ <span class="value">{{defaultValue}}</span>
+ {{else}}
+ {{{htmlDesc}}}
+ {{#if defaultValue}}
+ <div class="subtitle">{{t 'coding_rules.parameters.default_value'}} <span class="value">{{defaultValue}}</span></div>
{{/if}}
- </div>
- {{#if showMoreLink}}
- <a href="#" class="coding-rules-detail-parameter-details">{{t 'more'}}</a>
{{/if}}
- </li>
+ </dd>
+ </dl>
{{/each}}
- </ul>
+ </div>
{{/if}}
+
{{#if isTemplate}}
<div class="coding-rules-detail-custom-rules-section">
<h3 class="coding-rules-detail-title">{{t 'coding_rules.custom_rules'}}</h3>
@@ -173,6 +168,7 @@
</div>
{{/if}}
+
{{#if qualityProfilesVisible}}
<div class="coding-rules-detail-quality-profiles-section">
<h3 class="coding-rules-detail-title">{{t 'coding_rules.quality_profiles'}}</h3>
diff --git a/server/sonar-web/src/main/less/coding-rules.less b/server/sonar-web/src/main/less/coding-rules.less
index 7d8923a9dac..34f299fad55 100644
--- a/server/sonar-web/src/main/less/coding-rules.less
+++ b/server/sonar-web/src/main/less/coding-rules.less
@@ -195,16 +195,12 @@
.coding-rules-detail-parameter {
margin: @navigatorPadding 0;
- font-size: 0;
}
.coding-rules-detail-parameter-name {
- display: inline-block;
- vertical-align: top;
- width: 20%;
- font-size: @baseFontSize;
- font-weight: normal;
- text-align: right;
+ display: block;
+ margin-left: 2 * @navigatorPadding;
+ font-weight: bold;
}
.coding-rules-detail-parameter-description {
@@ -212,8 +208,13 @@
text-overflow: ellipsis;
vertical-align: top;
max-width: 75%;
- padding-left: 2 * @navigatorPadding;
+ margin-left: 2 * @navigatorPadding;
+ padding: @navigatorPadding;
.box-sizing(border-box);
+
+ .subtitle {
+ font-size: @baseFontSize;
+ }
}
.coding-rules-detail-parameter-details {
@@ -222,19 +223,6 @@
padding-left: 5px;
}
-.coding-rules-detail-parameter-description:first-line, .coding-rules-detail-parameter-description :first-child {
- display: block;
- font-size: @baseFontSize;
-}
-
-.coding-rules-detail-parameter-description * {
- display: none;
-}
-
-.coding-rules-parameter-full-description {
- padding: 1px;
-}
-
.coding-rules-detail-parameter-original {
margin-left: @navigatorPadding;
font-size: @smallFontSize;
diff --git a/server/sonar-web/src/main/less/style.less b/server/sonar-web/src/main/less/style.less
index 9bee50ab283..e7b6275252d 100644
--- a/server/sonar-web/src/main/less/style.less
+++ b/server/sonar-web/src/main/less/style.less
@@ -1950,7 +1950,7 @@ ul.bullet li {
margin-top: 10px;
}
-.rule-desc pre, .property pre, .bubble-popup pre {
+.rule-desc pre, .property pre, .bubble-popup pre, .coding-rules-detail-parameter pre {
margin: 10px 0 !important;
padding: 10px !important;
border: 1px dashed #aaa;
@@ -1958,7 +1958,7 @@ ul.bullet li {
font-family: monospace;;
}
-.rule-desc blockquote, .property blockquote {
+.rule-desc blockquote, .property blockquote, .bubble-popup blockquote, .coding-rules-detail-parameter blockquote {
margin-top: 10px;
padding: 10px;
}