From ef5534881630a51be81fc75144ba8db70f5571cb Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 24 Feb 2014 17:36:45 +0100 Subject: [PATCH] Some feedback on the issues page --- .../src/main/resources/org/sonar/l10n/core.properties | 1 + .../webapp/WEB-INF/app/views/issue/_issue.html.erb | 10 ++++++---- .../webapp/WEB-INF/app/views/issues/search.html.erb | 2 +- .../webapp/WEB-INF/app/views/measures/search.html.erb | 2 +- .../src/main/webapp/javascripts/navigator/issues.js | 10 +++++++++- sonar-server/src/main/webapp/stylesheets/navigator.css | 4 +++- .../src/main/webapp/stylesheets/navigator/base.css | 4 +++- .../src/main/webapp/stylesheets/navigator/base.less | 4 +++- 8 files changed, 27 insertions(+), 10 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 07a9451d12a..42447410947 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -144,6 +144,7 @@ technical_debt=Technical Debt template=Template title=Title to=To +to.downcase=to treemap=Treemap true=True type=Type diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_issue.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_issue.html.erb index 07c7546c33d..d283763dd69 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_issue.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_issue.html.erb @@ -52,10 +52,12 @@
  • <%= message('assigned_to') -%> <%= h @issue_results.user(issue.assignee).name -%>
  • <% end %> <% elsif current_user %> -
  • <%= message('issue.assign.formlink') -%>
  • - <% if issue.assignee != current_user.login %> -
  • [<%= message('issue.assign.to_me') -%>]
  • - <% end %> +
  • + <%= message('issue.assign.formlink') -%> + <% if issue.assignee != current_user.login %> + [<%= message('issue.assign.to_me') -%>] + <% end %> +
  • <% end %> <% if issue.actionPlanKey %> <% if current_user %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb index da0af92c124..d0c89a2b112 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb @@ -48,7 +48,7 @@ 'all': '<%= escape_javascript message('all') -%>', 'edit': '<%= escape_javascript message('edit') -%>', 'delete': '<%= escape_javascript message('delete') -%>', - 'to': '<%= escape_javascript message('to') -%>', + 'to': '<%= escape_javascript message('to.downcase') -%>', 'project': '<%= escape_javascript message('issue_filter.criteria.project') -%>', 'severity': '<%= escape_javascript message('issue_filter.criteria.severity') -%>', 'severities': { diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/search.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/search.html.erb index 709e1caf4d3..8885e6806e7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/measures/search.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/measures/search.html.erb @@ -66,7 +66,7 @@ 'anytime': '<%= escape_javascript message('anytime') -%>', 'all': '<%= escape_javascript message('all') -%>', 'manage': '<%= escape_javascript message('manage') -%>', - 'to': '<%= escape_javascript message('to') -%>', + 'to': '<%= escape_javascript message('to.downcase') -%>', 'value': '<%= escape_javascript message('value') -%>', 'components': '<%= escape_javascript message('measure_filter.criteria.components') -%>', 'age': '<%= escape_javascript message('measure_filter.criteria.age') -%>', diff --git a/sonar-server/src/main/webapp/javascripts/navigator/issues.js b/sonar-server/src/main/webapp/javascripts/navigator/issues.js index d4111c6447b..7cc91ce5e04 100644 --- a/sonar-server/src/main/webapp/javascripts/navigator/issues.js +++ b/sonar-server/src/main/webapp/javascripts/navigator/issues.js @@ -556,8 +556,16 @@ jQuery(function() { onRender: function() { + var format = function(state) { + if (!state.id) return state.text; // optgroup + return '' + state.text; + } + this.ui.select.select2({ - minimumResultsForSearch: 100 + minimumResultsForSearch: 100, + formatResult: format, + formatSelection: format, + escapeMarkup: function(m) { return m; } }); }, diff --git a/sonar-server/src/main/webapp/stylesheets/navigator.css b/sonar-server/src/main/webapp/stylesheets/navigator.css index fca7d52c52c..2847ce7adae 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator.css +++ b/sonar-server/src/main/webapp/stylesheets/navigator.css @@ -108,12 +108,14 @@ position: relative; } .navigator-fetching#tab-issue-rule:before { + z-index: 3; background-color: #EFEFEF; } .navigator-fetching.code-issue-actions { position: relative; } .navigator-fetching.code-issue-actions:before { + z-index: 3; background-color: #E4ECF3; } .navigator-header { @@ -269,7 +271,7 @@ .navigator-details .source { padding-right: 10px; } -.navigator-details .source table { +.navigator-details .source > table { border: 1px solid #DDD; } .navigator-details .scm .author { diff --git a/sonar-server/src/main/webapp/stylesheets/navigator/base.css b/sonar-server/src/main/webapp/stylesheets/navigator/base.css index 3e37f544611..c86ddfc501d 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator/base.css +++ b/sonar-server/src/main/webapp/stylesheets/navigator/base.css @@ -108,12 +108,14 @@ position: relative; } .navigator-fetching#tab-issue-rule:before { + z-index: 3; background-color: #EFEFEF; } .navigator-fetching.code-issue-actions { position: relative; } .navigator-fetching.code-issue-actions:before { + z-index: 3; background-color: #E4ECF3; } .navigator-header { @@ -269,7 +271,7 @@ .navigator-details .source { padding-right: 10px; } -.navigator-details .source table { +.navigator-details .source > table { border: 1px solid #DDD; } .navigator-details .scm .author { diff --git a/sonar-server/src/main/webapp/stylesheets/navigator/base.less b/sonar-server/src/main/webapp/stylesheets/navigator/base.less index ea7de94df0d..73623b8bdc9 100644 --- a/sonar-server/src/main/webapp/stylesheets/navigator/base.less +++ b/sonar-server/src/main/webapp/stylesheets/navigator/base.less @@ -108,6 +108,7 @@ position: relative; &:before { + z-index: 3; background-color: #EFEFEF; } } @@ -116,6 +117,7 @@ position: relative; &:before { + z-index: 3; background-color: #E4ECF3; } } @@ -321,7 +323,7 @@ .source { padding-right: 10px; - table { + & > table { border: 1px solid #DDD; } } -- 2.39.5