From 7998f3c17e9d7e4cc180f6eabc7c231cb9bac3d3 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Tue, 18 Dec 2012 12:05:16 +0100 Subject: [PATCH] Improve "Comparison" page rendering - Remove "nowrap" on column headers - Put the select boxes on the top of the page --- .../app/views/comparison/index.html.erb | 144 ++++++++++-------- 1 file changed, 82 insertions(+), 62 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb index c225e339379..d3000dce1cb 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/comparison/index.html.erb @@ -4,11 +4,11 @@ vertical-align: middle; } - .move-actions img { + #comparison-page .move-actions img { visibility: hidden; } - .move-actions:hover img { + #comparison-page .move-actions:hover img { visibility: visible; } @@ -70,10 +70,8 @@ - - - - - <% - last_index = @snapshots.size-1 - @snapshots.each_with_index do |s, index| - %> - - <% end %> - - + + + +
-
+
+
<%= metric_select_tag 'new_metric', @metric_to_choose, { :allow_empty => true, :select2_options => {'placeholder' => "'" + message('comparison.add_metric') + "'"} @@ -94,48 +92,9 @@ } }); -
-
- - - - - - -
- <% if index > 0 %> - - <% else %> - - <% end %> - - <%= s.resource.name(true) -%> -
- <%= s.event(EventCategory::KEY_VERSION).name -%> -
- <%= human_short_date s.created_at -%> - -
- -
-
- <% if index < last_index %> - - <% else %> - - <% end %> -
-
-
+
+ +
<%= resource_select_tag 'new_resource', { :resource_type_property => 'comparable', :width => '250px', @@ -158,6 +117,7 @@ $j('#new_version').select2({placeholder:'<%= message('comparison.select_version') -%>'}); $j('#version_loading').hide(); $j('#version_div').show(); + $j('#version_div').css("display", "inline-block"); $j('#new_version').select2("focus"); } }); @@ -167,9 +127,9 @@
- + -
+ + + + + <% + last_index = @snapshots.size-1 + @snapshots.each_with_index do |s, index| + %> + + <% end %> + + + + + <% + last_index = @snapshots.size-1 + @snapshots.each_with_index do |s, index| + %> + + <% end %> + + @@ -196,17 +211,21 @@ @metrics.each_with_index do |m, index| %> - <% @snapshots.each do |s| %> @@ -214,6 +233,7 @@ <%= format_measure s.measure(m) -%> <% end %> + <% end %> -- 2.39.5
+ + + + + + +
+ <% if index > 0 %> + + <% else %> + + <% end %> + +
+ +
+
+ <% if index < last_index %> + + <% else %> + + <% end %> +
+
+ <%= s.resource.name(true) -%> +
+ <%= s.event(EventCategory::KEY_VERSION).name -%> +
+ <%= human_short_date s.created_at -%> +
-
<%= m.short_name -%>
-
- <% if index > 0 %> - - <% end %> - <% if index < last_index %> - - <% end %> - -
+
+ + + + + +
<%= m.short_name -%> + <% if index > 0 %> + + <% end %> + <% if index < last_index %> + + <% end %> + +