From 2c7eb4eebfa11ab66a9d09529ba0c2f40f5f53ef Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Wed, 18 Nov 2015 17:48:25 +0100 Subject: [PATCH] SONAR-7005 Improve display of the rule activation form --- .../rule/coding-rules-profile-activation.hbs | 111 ++++++++---------- .../src/main/less/components/modals.less | 31 ++--- .../sonar-web/src/main/less/init/forms.less | 8 +- .../src/main/less/select2-sonar.less | 4 + 4 files changed, 80 insertions(+), 74 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-profile-activation.hbs b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-profile-activation.hbs index 0523824d2ed..91ce5585500 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-profile-activation.hbs +++ b/server/sonar-web/src/main/js/apps/coding-rules/templates/rule/coding-rules-profile-activation.hbs @@ -16,67 +16,60 @@ {{/unless}} {{/empty}} - - - - - - - - - - {{#if isCustomRule}} - - + - - - + + {{/any}} + +

{{t 'coding_rules.quality_profile'}}

- {{#any key qProfile}} - {{name}} - {{else}} - - {{/any}} -

{{t 'severity'}}

- -
{{t 'coding_rules.custom_rule.activation_notice'}}

{{key}}

- {{#eq type 'TEXT'}} - - {{else}} - {{#eq type 'BOOLEAN'}} - - {{else}} - - {{/eq}} - {{/eq}} -
{{{htmlDesc}}}
- {{#if extra}} -
{{extra}}
- {{/if}} -
+ + + {{#if isCustomRule}} + - + diff --git a/server/sonar-web/src/main/less/components/modals.less b/server/sonar-web/src/main/less/components/modals.less index 8c6b13851a1..8c7f612bdfc 100644 --- a/server/sonar-web/src/main/less/components/modals.less +++ b/server/sonar-web/src/main/less/components/modals.less @@ -90,16 +90,18 @@ ul.modal-head-metadata li { } .modal-field label { + position: relative; + left: -140px; display: block; float: left; - text-align: right; width: 130px; - left: -140px; margin-right: -130px; - line-height: 1; - word-wrap: break-word; - position: relative; padding-top: 5px; + padding-bottom: 2px; + line-height: 1; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; &.simple-label { display: inline-block; @@ -118,7 +120,9 @@ ul.modal-head-metadata li { line-height: 1; } -.modal-field input { +.modal-field input, +.modal-field select, +.modal-field textarea { margin-right: 5px; margin-bottom: 10px; } @@ -131,8 +135,13 @@ ul.modal-head-metadata li { width: 250px; } -.modal-field .text { - line-height: 20px; +.modal-field-description { + padding-bottom: 4px; + line-height: 1.4; + color: @secondFontColor; + font-size: @smallFontSize; + overflow: hidden; + text-overflow: ellipsis; } .modal-foot { @@ -150,12 +159,6 @@ ul.modal-head-metadata li { } } -.modal-field-description { - clear: both; - font-size: 93%; - color: #777; -} - .modal-error, .modal-warning, .modal-notice { display: none; } diff --git a/server/sonar-web/src/main/less/init/forms.less b/server/sonar-web/src/main/less/init/forms.less index b3e03b99894..5f9fc874359 100644 --- a/server/sonar-web/src/main/less/init/forms.less +++ b/server/sonar-web/src/main/less/init/forms.less @@ -11,7 +11,8 @@ input[type=password], input[type=email], input[type=search], input[type=date], -textarea { +textarea, +select { border: 1px solid @darkGrey; box-sizing: border-box; border-radius: 2px; @@ -46,6 +47,11 @@ textarea { padding: 3px; } +select { + height: @formControlHeight; + line-height: @formControlHeight; +} + button, .button, input[type=submit], diff --git a/server/sonar-web/src/main/less/select2-sonar.less b/server/sonar-web/src/main/less/select2-sonar.less index 26977e37df7..8dd75b6ec37 100644 --- a/server/sonar-web/src/main/less/select2-sonar.less +++ b/server/sonar-web/src/main/less/select2-sonar.less @@ -45,6 +45,10 @@ background-position: -17px -1px; } +.select2-container .select2-choice span i { + position: relative; + top: 2px; +} .select2-container-active .select2-choice, .select2-container-active .select2-choices { -- 2.39.5