From fa2b7833a2956ae4644dfa1bafee38dc6fefa33f Mon Sep 17 00:00:00 2001 From: simonbrandhof Date: Fri, 18 Mar 2011 18:40:47 +0100 Subject: [PATCH] Fix rendering in IE6 --- .../app/controllers/resource_controller.rb | 3 +- .../views/resource/_header_coverage.html.erb | 5 +- .../resource/_header_violations.html.erb | 70 +++++++------------ .../app/views/resource/_measure.html.erb | 4 +- .../src/main/webapp/stylesheets/style.css | 23 +----- 5 files changed, 31 insertions(+), 74 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb index 40c1ccf4614..c66a9272183 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb @@ -303,7 +303,8 @@ class ResourceController < ApplicationController end def highlighted? - !hidden? && @highlighted==true + # highlighted if the @highlighted has not been set or has been set to true + !hidden? && @highlighted!=false end def deprecated_conditions_label=(label) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb index a7a297576bd..96c67ece219 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_coverage.html.erb @@ -1,7 +1,7 @@
<% if @period && measure('new_coverage') %>

On new code:

- +
@@ -41,7 +41,7 @@
<%= format_variation('new_coverage', :period => @period, :style => 'none') -%>
<% else %> - +
@@ -60,6 +60,5 @@ <% end %> <%= render :partial => 'options' -%> -
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_violations.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_violations.html.erb index fc97be464c7..9e6522c5f88 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_violations.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_violations.html.erb @@ -1,40 +1,30 @@
<% if @period && measure('new_violations') %> -
<%= format_measure('coverage', :default => '-') -%>
+
- -
<%= format_variation('new_violations', :default => 0, :period => @period, :style => 'none') -%> new violations
- - + + - -
<%= image_tag 'priority/BLOCKER.png' -%> Blocker: <%= format_variation('new_blocker_violations', :default => 0, :period => @period, :style => 'none') -%>
- - + + - -
<%= image_tag 'priority/CRITICAL.png' -%> Critical: <%= format_variation('new_critical_violations', :default => 0, :period => @period, :style => 'none') -%>
- - + + - -
<%= image_tag 'priority/MAJOR.png' -%> Major: <%= format_variation('new_major_violations', :default => 0, :period => @period, :style => 'none') -%>
- - + + - -
<%= image_tag 'priority/MINOR.png' -%> Minor: <%= format_variation('new_minor_violations', :default => 0, :period => @period, :style => 'none') -%>
- - + + @@ -42,41 +32,31 @@
<%= image_tag 'priority/INFO.png' -%> Info: <%= format_variation('new_info_violations', :default => 0, :period => @period, :style => 'none') -%>
<% else %> - +
- - -
<%= format_measure('violations', :default => 0) -%> violations
- - - + + + + - -
<%= image_tag 'priority/BLOCKER.png' -%><%= format_measure('violations', :default => 0) -%> violations <%= image_tag 'priority/BLOCKER.png' -%> Blocker: <%= format_measure('blocker_violations', :default => 0) -%>
- - + + - -
<%= image_tag 'priority/CRITICAL.png' -%> Critical: <%= format_measure('critical_violations', :default => 0) -%>
- - + + - -
<%= image_tag 'priority/MAJOR.png' -%> Major: <%= format_measure('major_violations', :default => 0) -%>
- - + + - -
<%= image_tag 'priority/MINOR.png' -%> Minor: <%= format_measure('minor_violations', :default => 0) -%>
- - + + @@ -85,6 +65,6 @@ <% end %> <%= render :partial => 'options' -%> -
+ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_measure.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_measure.html.erb index ba75aeb993d..6bbc9d09136 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_measure.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_measure.html.erb @@ -2,9 +2,7 @@ <% else %> diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index ea9c29643e5..2e666eebf99 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -612,12 +612,6 @@ ul.operations li a { /* SOURCE */ -#source_metrics { - width: 100%; -} -#source_metrics { - width: 100%; -} .sources2 { width: 100%; border-top: 1px solid #DDD; @@ -748,20 +742,7 @@ span.rulename a:hover { margin-bottom: 10px; color: #444; } -.tab_header .col { - vertical-align:top; -} -.tab_header table.metrics { - margin-right: 10px; - display: inline-block; - vertical-align: top; -} -.tab_header table.bottomcol { - margin-right: 10px; - display: inline-block; - vertical-align: bottom; -} -.tab_header table.metrics td, .tab_header table.bottomcol td { +.tab_header td { padding-right: 7px; } .tab_header td.name { @@ -790,8 +771,6 @@ span.rulename a:hover { - - #gwtpage { width: 100%; clear: both; -- 2.39.5
<%= image_tag 'priority/INFO.png' -%> Info: <%= format_measure('info_violations', :default => 0) -%><%= h(title) -%>: <%= format_measure(measure) -%> - <% if defined?(ratio) && ratio %> - /<%= format_measure(ratio) -%> - <% end %> + <% if defined?(ratio) && ratio %> / <%= format_measure(ratio) -%><% end %>