diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-02-16 19:26:11 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-02-16 19:26:24 +0100 |
commit | b927e75930e82b95b65c8170091d8a0d15db7bbf (patch) | |
tree | 9f5212e2b209ef48e2d8325378bc53126f736065 | |
parent | cd4a931a8de29b68aa3bdfedd2f030c00a369ae0 (diff) | |
download | sonarqube-b927e75930e82b95b65c8170091d8a0d15db7bbf.tar.gz sonarqube-b927e75930e82b95b65c8170091d8a0d15db7bbf.zip |
Use an icon to display help message in treemaps
8 files changed, 23 insertions, 40 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/rules.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/rules.html.erb index 29e61001f83..21abde5f3cb 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/rules.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/rules.html.erb @@ -40,6 +40,7 @@ <% end %> <% end %> </div> + <% if density %> <h3><%= message('widget.rules.rules_compliance') -%></h3> <div> <span class="big"> @@ -47,6 +48,7 @@ </span> <%= dashboard_configuration.selected_period? ? format_variation(density) : trend_icon(density) -%> </div> + <% end %> </div> </td> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb index 579f164064f..5809988093a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_header.html.erb @@ -16,7 +16,7 @@ <% if @snapshot %> <div id="snapshot_title" class="page_title"> <h4> - <%= link_to_favourite(@project) -%> Version <%= @snapshot.version -%> - <%= l @snapshot.created_at %> + <%= link_to_favourite(@project) -%> <%= "Version #{@snapshot.version}" if @snapshot.version.present? -%> - <%= l @snapshot.created_at -%> <% if @snapshot.project_snapshot.periods? %> - <form method="GET" action="<%= url_for :controller => 'dashboard', :action => 'index', :id => @resource.id -%>" style="display: inline"> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb index 3e7317852e6..c4228a1252d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb @@ -69,11 +69,11 @@ <td nowrap> <% if !resource.display_dashboard? %> - <%= qualifier_icon(resource) -%> + <%= qualifier_icon(resource) -%> <a href="#" onclick="d(<%= resource.id -%>)" alt="<%= resource.name(true) -%>" title="<%= resource.name(true) -%>"><%= resource.name(false) -%></a> <% else %> <%= link_to(image_tag('zoom.png'), {:id => resource.id, :metric => @metric.id}, {:class => 'nolink'}) -%> - <%= qualifier_icon(resource) -%> + <%= qualifier_icon(resource) -%> <%= link_to(resource.name, {:only_path => true, :overwrite_params => {:rids => (selected ? rids-[resource.id] : rids+[resource.id])}}) -%> <% end %> </td> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb index ba7ddfcbb38..a6067ef6446 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb @@ -140,11 +140,11 @@ <tr class="<%= clazz -%>"> <td nowrap> <% if !resource.display_dashboard? %> - <%= qualifier_icon(resource) -%> + <%= qualifier_icon(resource) -%> <a href="#" onclick="d(<%= resource.id -%>, '<%= @period_index -%>', '<%= @rule ? @rule.key : @severity -%>');" alt="<%= resource.name(true) -%>" title="<%= resource.name(true) -%>"><%= resource.name(false) %></a> <% else %> <%= link_to(image_tag('zoom.png'), {:id => resource.id}, {:class => 'nolink'}) %> - <%= qualifier_icon(resource) %> + <%= qualifier_icon(resource) %> <%= link_to(h(resource.name), {:only_path => true, :overwrite_params => {:rids => (selected ? rids-[resource.id] : rids+[resource.id])}}) -%> <% end %> </td> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb deleted file mode 100644 index 9f0e3858940..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/treemap.html.erb +++ /dev/null @@ -1,29 +0,0 @@ -<% unless params[:hide_form]=='true' %> -<form> -<table> - <tr> - <td> - <span class="comments"><%= message('size') -%>:</span><br/> - <%= select_tag 'size_metric', options_grouped_by_domain(Sonar::Treemap.size_metrics(), @size_metric.key), - :id => 'size_metric', :class => 'small', :onchange => "load_treemap(this.form.size_metric.value,this.form.color_metric.value, false);return false;" %> - </td> - <td class="sep"> </td> - <td> - <span class="comments"><%= message('color') -%>: <%= render :partial => 'treemap/gradient', :locals => {:metric => @color_metric} %></span> - <br/> - <%= select_tag 'color_metric', options_grouped_by_domain(Sonar::Treemap.color_metrics, @color_metric.key), - :id => 'color_metric', :class => 'small', :onchange => "load_treemap(this.form.size_metric.value,this.form.color_metric.value, false);return false;" %> - </td> - </tr> -</table> -</form> -<br/> -<% end %> - -<div> - <%= render :partial => 'treemap/treemap', :locals => {:treemap => @treemap} -%> -</div> -<div style="margin: 5px 0 0 0" class="notes"> - <div style="float: right"><span><%= message('treemap.click_help') -%></span></div> - <div id="tm-bc-<%= @filter.id -%>">/</div> -</div> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/treemap/_treemap_container.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/treemap/_treemap_container.html.erb index e313e7e4a61..e597cc48e08 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/treemap/_treemap_container.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/treemap/_treemap_container.html.erb @@ -5,14 +5,15 @@ <span class="comments"><%= message('size') -%></span> <br/> <%= select_tag "size", options_grouped_by_domain(Sonar::Treemap.size_metrics, (size_metric ? size_metric.key : nil), :include_empty => true), - :id => "tm-size-#{treemap_id}", :class => 'small spacer-right', :onchange => "return treemapById(#{treemap_id}).changeSizeMetric(this.value)" %> + :id => "tm-size-#{treemap_id}", :class => 'small medium-width spacer-right', :onchange => "return treemapById(#{treemap_id}).changeSizeMetric(this.value)" + %> </td> <td valign="top" class="thin nowrap"> <span class="comments"><%= message('color') -%></span> <span id="tm-gradient-<%= treemap_id -%>" class="note"></span> <br/> <%= select_tag 'color', options_grouped_by_domain(Sonar::Treemap.color_metrics, (color_metric ? color_metric.key : nil), :include_empty => true), - :id => "tm-color-#{treemap_id}", :class => 'small', :onchange => "return treemapById(#{treemap_id}).changeColorMetric(this.value)" %> + :id => "tm-color-#{treemap_id}", :class => 'small medium-width', :onchange => "return treemapById(#{treemap_id}).changeColorMetric(this.value)" %> <%= image_tag 'loading.gif', :id => "tm-loading-#{treemap_id}", :style => 'vertical-align: top;display: none' -%> </td> <td></td> @@ -23,7 +24,7 @@ <div id="tm-<%= treemap_id -%>" class="spacer-bottom"></div> <div style="margin: 5px 0 0 0" class="notes"> - <div style="float: right"><span><%= message('treemap.click_help') -%></span></div> + <div style="float: right"><%= image_tag 'help_gray.gif', :title => h(message('treemap.click_help')) -%></div> <div id="tm-bc-<%= treemap_id -%>">/</div> </div> diff --git a/sonar-server/src/main/webapp/images/help_gray.gif b/sonar-server/src/main/webapp/images/help_gray.gif Binary files differnew file mode 100644 index 00000000000..b4e08c23f74 --- /dev/null +++ b/sonar-server/src/main/webapp/images/help_gray.gif diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index 199b8d627a1..bb5181d245c 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -506,11 +506,13 @@ h4, .h4 { .notes { color: #777; - font-size: 85%; + font-size: 11px; margin-bottom: 10px; background-color: #EFEFEF; border: 1px solid #cdcdcd; - padding: 4px; + line-height: 16px; + height: 16px; + padding: 2px 4px; } .treemap { @@ -1986,7 +1988,7 @@ ul.bullet li { .comments { color: #777; - font-size: 93%; + font-size: 12px; margin-bottom: 10px; padding: 4px; } @@ -2454,3 +2456,10 @@ blockquote cite { .table-bordered > tbody > tr > td { border-top: 1px solid #DDD; } +select.small-width { + max-width: 120px; +} +select.medium-width { + max-width: 175px; + width: 175px; +} |