aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-03-20 17:29:22 +0600
committerStas Vilchik <vilchiks@gmail.com>2014-03-20 17:29:22 +0600
commitb9be7782fa7e316f682b6eca0843610584d70c29 (patch)
tree10dcff806229da75e0b18458c43b5bbc79fc823e
parentdd2e1401e5c74ab50a7432964995de87e100d95f (diff)
downloadsonarqube-b9be7782fa7e316f682b6eca0843610584d70c29.tar.gz
sonarqube-b9be7782fa7e316f682b6eca0843610584d70c29.zip
SONAR-5007 Apply some feedback
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_detail_quality_profile_template.hbs.erb52
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_detail_template.hbs.erb8
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_list_item_template.hbs.erb2
-rw-r--r--sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.coffee2
-rw-r--r--sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.js2
-rw-r--r--sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-quality-profile-view.coffee8
-rw-r--r--sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-quality-profile-view.js9
-rw-r--r--sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-view.coffee2
-rw-r--r--sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-view.js2
-rw-r--r--sonar-server/src/main/webapp/stylesheets/coding-rules.css41
-rw-r--r--sonar-server/src/main/webapp/stylesheets/coding-rules.less46
-rw-r--r--sonar-server/src/main/webapp/stylesheets/icons.css1
-rw-r--r--sonar-server/src/main/webapp/stylesheets/icons.less1
13 files changed, 100 insertions, 76 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_detail_quality_profile_template.hbs.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_detail_quality_profile_template.hbs.erb
index b5d4295ccfa..6a07f89c317 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_detail_quality_profile_template.hbs.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_detail_quality_profile_template.hbs.erb
@@ -1,11 +1,12 @@
<script id="coding-rules-detail-quality-profile-template" type="text/x-handlebars-template">
- <div class="coding-rules-detail-quality-profile-name">{{name}}</div>
-
- {{#if parent}}
- <div class="coding-rules-detail-quality-profile-inheritance">
- <i class="icon-inheritance"></i> {{t 'coding_rules.inherits'}} <strong>{{parent.name}}</strong>
- </div>
- {{/if}}
+ <div class="coding-rules-detail-quality-profile-name">
+ {{name}}
+ {{#if parent}}
+ <span class="coding-rules-detail-quality-profile-inheritance">
+ <i class="icon-inheritance"></i> {{parent.name}}
+ </span>
+ {{/if}}
+ </div>
<ul class="coding-rules-detail-parameters coding-rules-detail-quality-profile-parameters">
<li class="coding-rules-detail-parameter">
@@ -18,7 +19,9 @@
</select>
{{#if parent}}
{{#notEq severity parent.severity}}
- {{t 'coding_rules.original'}} {{severityIcon parent.severity}}{{t 'severity' parent.severity}}
+ <span class="coding-rules-detail-parameter-original">
+ {{t 'coding_rules.original'}} {{severityIcon parent.severity}}{{t 'severity' parent.severity}}
+ </span>
{{/notEq}}
{{/if}}
</div>
@@ -30,7 +33,9 @@
<input type="text" value="{{value}}">
{{#if ../parent}}
{{#notEq value original}}
- {{t 'coding_rules.original'}} {{original}}
+ <span class="coding-rules-detail-parameter-original">
+ {{t 'coding_rules.original'}} {{original}}
+ </span>
{{/notEq}}
{{/if}}
</div>
@@ -38,8 +43,19 @@
{{/each}}
</ul>
- <div class="coding-rules-detail-quality-profile-note">
- {{#if note}}
+ <div class="button-group coding-rules-detail-quality-profile-actions">
+ <button class="coding-rules-detail-quality-profile-update" disabled>{{t 'update'}}</button>
+ {{#unless note}}
+ <button class="coding-rules-detail-quality-profile-note-add">{{t 'coding_rules.add_note'}}</button>
+ {{/unless}}
+ {{#if parent}}
+ <button class="button-red">{{t 'coding_rules.revert_to_parent_definition'}}</button>
+ {{/if}}
+ <button class="button-red">{{t 'coding_rules.deactivate_quality_profile'}}</button>
+ </div>
+
+ {{#if note}}
+ <div class="coding-rules-detail-quality-profile-note">
<blockquote class="rule-desc">
<cite>
<b>{{note.username}}</b> ({{note.fCreationDate}}) &nbsp;|&nbsp;
@@ -48,10 +64,8 @@
</cite>
{{{note.html}}}
</blockquote>
- {{else}}
- <a class="coding-rules-detail-quality-profile-note-add link-action">{{t 'coding_rules.add_note'}}</a>
- {{/if}}
- </div>
+ </div>
+ {{/if}}
<div class="coding-rules-detail-quality-profile-note-form admin">
<table class="width100 table">
@@ -75,12 +89,4 @@
</tbody>
</table>
</div>
-
- <div class="button-group coding-rules-detail-quality-profile-actions">
- <button>{{t 'update'}}</button>
- {{#if parent}}
- <button class="button-red">{{t 'coding_rules.revert_to_parent_definition'}}</button>
- {{/if}}
- <button class="button-red">{{t 'coding_rules.deactivate_quality_profile'}}</button>
- </div>
</script>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_detail_template.hbs.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_detail_template.hbs.erb
index 09447f2c00e..733e567f5a4 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_detail_template.hbs.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_detail_template.hbs.erb
@@ -3,13 +3,9 @@
<ul class="coding-rules-detail-properties">
<li class="coding-rules-detail-property">{{severityIcon severity}} {{t "severity" severity}}</li>
- <li class="coding-rules-detail-property">
- <span class="coding-rules-detail-status">{{language}}</span>
- </li>
+ <li class="coding-rules-detail-property">{{language}}</li>
{{#notEq status 'READY'}}
- <li class="coding-rules-detail-property">
- <span class="coding-rules-detail-status">{{status}}</span>
- </li>
+ <li class="coding-rules-detail-property">{{status}}</li>
{{/notEq}}
<li class="coding-rules-detail-property coding-rules-detail-tag-list">
<i class="icon-tags"></i>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_list_item_template.hbs.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_list_item_template.hbs.erb
index 22f6ce7a019..754888a0d1d 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_list_item_template.hbs.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/coding_rules/templates/_coding_rules_list_item_template.hbs.erb
@@ -4,7 +4,7 @@
<i class="icon-quality-profile"></i>&nbsp;{{qualityProfileName}}&nbsp;
{{severityIcon severity}}{{t "severity" severity}}&nbsp;
{{/if}}
- <span class="coding-rules-detail-status">{{language}}</span>
+ {{language}}
<div class="line-right">{{#notEq status 'READY'}}{{status}}{{/notEq}}</div>
</div>
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.coffee b/sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.coffee
index d052e6dd829..27b45a97ecc 100644
--- a/sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.coffee
+++ b/sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.coffee
@@ -71,7 +71,7 @@ define ['jquery.mockjax'], ->
'coding_rules.extend_description': 'Extend Description'
'coding_rules.deactivate_quality_profile': 'Deactivate'
'coding_rules.found': 'Found'
- 'coding_rules.inherits': 'Inherits'
+ 'coding_rules._inherits': 'inherits'
'coding_rules.key': 'Key:'
'coding_rules.new_search': 'New Search'
'coding_rules.no_results': 'No Coding Rules'
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.js b/sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.js
index 6d86976882b..b1bbc0be9ad 100644
--- a/sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.js
+++ b/sonar-server/src/main/webapp/javascripts/coding-rules/mockjax.js
@@ -85,7 +85,7 @@
'coding_rules.extend_description': 'Extend Description',
'coding_rules.deactivate_quality_profile': 'Deactivate',
'coding_rules.found': 'Found',
- 'coding_rules.inherits': 'Inherits',
+ 'coding_rules._inherits': 'inherits',
'coding_rules.key': 'Key:',
'coding_rules.new_search': 'New Search',
'coding_rules.no_results': 'No Coding Rules',
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-quality-profile-view.coffee b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-quality-profile-view.coffee
index 289c209d2c0..15fc149d888 100644
--- a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-quality-profile-view.coffee
+++ b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-quality-profile-view.coffee
@@ -11,6 +11,7 @@ define [
ui:
+ update: '.coding-rules-detail-quality-profile-update'
severitySelect: '.coding-rules-detail-quality-profile-severity'
note: '.coding-rules-detail-quality-profile-note'
@@ -30,6 +31,9 @@ define [
'click @ui.noteCancel': 'cancelNote'
'click @ui.noteSubmit': 'submitNote'
+ 'change .coding-rules-detail-parameters select': 'enableUpdate'
+ 'keyup .coding-rules-detail-parameters input': 'enableUpdate'
+
editNote: ->
@ui.note.hide()
@@ -62,6 +66,10 @@ define [
@render()
+ enableUpdate: ->
+ @ui.update.prop 'disabled', false
+
+
onRender: ->
@ui.noteForm.hide()
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-quality-profile-view.js b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-quality-profile-view.js
index 4cb28435c39..7ba3234d502 100644
--- a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-quality-profile-view.js
+++ b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-quality-profile-view.js
@@ -18,6 +18,7 @@
CodingRulesDetailQualityProfilesView.prototype.template = getTemplate('#coding-rules-detail-quality-profile-template');
CodingRulesDetailQualityProfilesView.prototype.ui = {
+ update: '.coding-rules-detail-quality-profile-update',
severitySelect: '.coding-rules-detail-quality-profile-severity',
note: '.coding-rules-detail-quality-profile-note',
noteForm: '.coding-rules-detail-quality-profile-note-form',
@@ -34,7 +35,9 @@
'click @ui.noteEdit': 'editNote',
'click @ui.noteDelete': 'deleteNote',
'click @ui.noteCancel': 'cancelNote',
- 'click @ui.noteSubmit': 'submitNote'
+ 'click @ui.noteSubmit': 'submitNote',
+ 'change .coding-rules-detail-parameters select': 'enableUpdate',
+ 'keyup .coding-rules-detail-parameters input': 'enableUpdate'
};
CodingRulesDetailQualityProfilesView.prototype.editNote = function() {
@@ -74,6 +77,10 @@
});
};
+ CodingRulesDetailQualityProfilesView.prototype.enableUpdate = function() {
+ return this.ui.update.prop('disabled', false);
+ };
+
CodingRulesDetailQualityProfilesView.prototype.onRender = function() {
var format;
this.ui.noteForm.hide();
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-view.coffee b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-view.coffee
index 01e4cca5d40..3f91063ef4a 100644
--- a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-view.coffee
+++ b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-view.coffee
@@ -56,7 +56,7 @@ define [
@ui.tagInput.select2
tags: _.difference @options.app.tags, @model.get 'tags'
- width: '500px'
+ width: '300px'
@ui.tagsEdit.hide()
@ui.extendDescriptionForm.hide()
diff --git a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-view.js b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-view.js
index 5649c0b1dfa..b4afc08950e 100644
--- a/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-view.js
+++ b/sonar-server/src/main/webapp/javascripts/coding-rules/views/coding-rules-detail-view.js
@@ -55,7 +55,7 @@
this.qualityProfilesRegion.show(this.qualityProfilesView);
this.ui.tagInput.select2({
tags: _.difference(this.options.app.tags, this.model.get('tags')),
- width: '500px'
+ width: '300px'
});
this.ui.tagsEdit.hide();
this.ui.extendDescriptionForm.hide();
diff --git a/sonar-server/src/main/webapp/stylesheets/coding-rules.css b/sonar-server/src/main/webapp/stylesheets/coding-rules.css
index 7e2e846532d..5c178362ab5 100644
--- a/sonar-server/src/main/webapp/stylesheets/coding-rules.css
+++ b/sonar-server/src/main/webapp/stylesheets/coding-rules.css
@@ -22,16 +22,14 @@
line-height: 1.5;
font-weight: bold;
}
+.coding-rules-detail-header {
+ font-size: 18px;
+}
.coding-rules-detail-title {
display: inline-block;
+ margin-top: 30px;
text-transform: uppercase;
}
-.coding-rules-detail-status {
- padding: 3px 4px;
- background-color: #efefef;
- color: #777;
- font-size: 11px;
-}
.coding-rules-detail-properties {
margin: 10px 0;
font-size: 0;
@@ -67,10 +65,10 @@
}
.coding-rules-detail-parameter-name {
display: inline-block;
- visibility: top;
+ vertical-align: top;
width: 150px;
font-size: 13px;
- font-weight: bold;
+ font-weight: normal;
text-align: right;
}
.coding-rules-detail-parameter-description {
@@ -79,6 +77,10 @@
margin-left: 20px;
font-size: 13px;
}
+.coding-rules-detail-parameter-original {
+ margin-left: 10px;
+ font-size: 11px;
+}
.coding-rules-detail-quality-profiles-header {
margin-top: 30px;
}
@@ -86,10 +88,7 @@
font-size: 0;
}
.coding-rules-detail-quality-profile {
- border: 1px solid transparent;
-}
-.coding-rules-detail-quality-profile.active {
- border-color: #4b9fd5;
+ margin-left: 20px;
}
.coding-rules-detail-quality-profile.active .coding-rules-detail-quality-profile-name {
background-color: #4b9fd5;
@@ -97,11 +96,10 @@
}
.coding-rules-detail-quality-profile + .coding-rules-detail-quality-profile {
margin-top: 20px;
+ padding-top: 20px;
+ border-top: 1px solid #e1e1e1;
}
.coding-rules-detail-quality-profile-name {
- padding: 5px;
- background-color: #efefef;
- line-height: 1;
font-weight: bold;
}
.coding-rules-detail-quality-profile-actions {
@@ -118,14 +116,21 @@
width: 200px;
}
.coding-rules-detail-quality-profile-inheritance {
- margin: 10px 0;
- padding: 0 5px;
+ vertical-align: middle;
+ margin-left: 10px;
+ font-size: 11px;
+ font-weight: normal;
+}
+.coding-rules-detail-quality-profile-inheritance i {
+ position: relative;
+ top: -1px;
+ font-size: 14px;
}
.coding-rules-detail-quality-profile-inheritance strong {
font-weight: bold;
}
.coding-rules-detail-quality-profile-note {
- margin: 10px 0;
+ margin: 20px 0;
padding: 0 5px;
}
.coding-rules-detail-quality-profiles-activation {
diff --git a/sonar-server/src/main/webapp/stylesheets/coding-rules.less b/sonar-server/src/main/webapp/stylesheets/coding-rules.less
index 6a3358b90aa..9669c34aceb 100644
--- a/sonar-server/src/main/webapp/stylesheets/coding-rules.less
+++ b/sonar-server/src/main/webapp/stylesheets/coding-rules.less
@@ -24,22 +24,16 @@
font-weight: bold;
}
+.coding-rules-detail-header {
+ font-size: 18px;
+}
+
.coding-rules-detail-title {
display: inline-block;
+ margin-top: 3 * @navigatorPadding;
text-transform: uppercase;
}
-.coding-rules-detail-status {
- padding: 3px 4px;
- background-color: @navigatorBarBackground;
- color: #777;
- font-size: @smallFontSize;
-}
-
-.coding-rules-detail-key {
-
-}
-
.coding-rules-detail-properties {
margin: @navigatorPadding 0;
font-size: 0;
@@ -82,10 +76,10 @@
.coding-rules-detail-parameter-name {
display: inline-block;
- visibility: top;
+ vertical-align: top;
width: 150px;
font-size: @baseFontSize;
- font-weight: bold;
+ font-weight: normal;
text-align: right;
}
@@ -96,6 +90,11 @@
font-size: @baseFontSize;
}
+.coding-rules-detail-parameter-original {
+ margin-left: @navigatorPadding;
+ font-size: @smallFontSize;
+}
+
// Quality Profiles
.coding-rules-detail-quality-profiles-header {
@@ -107,10 +106,9 @@
}
.coding-rules-detail-quality-profile {
- border: 1px solid transparent;
+ margin-left: 2 * @navigatorPadding;
&.active {
- border-color: @highlighted;
.coding-rules-detail-quality-profile-name {
background-color: @highlighted;
@@ -121,12 +119,11 @@
.coding-rules-detail-quality-profile + .coding-rules-detail-quality-profile {
margin-top: 2 * @navigatorPadding;
+ padding-top: 2 * @navigatorPadding;
+ border-top: 1px solid @navigatorBorderLightColor;
}
.coding-rules-detail-quality-profile-name {
- padding: @navigatorPadding / 2;
- background-color: @navigatorBarBackground;
- line-height: 1;
font-weight: bold;
}
@@ -148,14 +145,21 @@
}
.coding-rules-detail-quality-profile-inheritance {
- margin: @navigatorPadding 0;
- padding: 0 @navigatorPadding / 2;
+ vertical-align: middle;
+ margin-left: @navigatorPadding;
+ font-size: @smallFontSize;
+ font-weight: normal;
+ i {
+ position: relative;
+ top: -1px;
+ font-size: @iconSmallFontSize;
+ }
strong { font-weight: bold; }
}
.coding-rules-detail-quality-profile-note {
- margin: @navigatorPadding 0;
+ margin: @navigatorPadding * 2 0;
padding: 0 @navigatorPadding / 2;
}
diff --git a/sonar-server/src/main/webapp/stylesheets/icons.css b/sonar-server/src/main/webapp/stylesheets/icons.css
index cbeeb7190ca..aa150eafb4d 100644
--- a/sonar-server/src/main/webapp/stylesheets/icons.css
+++ b/sonar-server/src/main/webapp/stylesheets/icons.css
@@ -264,7 +264,6 @@ a[class*=" icon-"] {
}
.icon-inheritance:before {
content: "\f126";
- font-size: 16px;
}
.icon-plus:before {
content: "\f067";
diff --git a/sonar-server/src/main/webapp/stylesheets/icons.less b/sonar-server/src/main/webapp/stylesheets/icons.less
index aca5c15c06d..5c8bc983bd1 100644
--- a/sonar-server/src/main/webapp/stylesheets/icons.less
+++ b/sonar-server/src/main/webapp/stylesheets/icons.less
@@ -273,7 +273,6 @@ a[class^="icon-"], a[class*=" icon-"] {
}
.icon-inheritance:before {
content: "\f126";
- font-size: @iconFontSize;
}
.icon-plus:before {
content: "\f067";