diff options
Diffstat (limited to 'server/sonar-web')
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; } |