]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2501 improve CSS
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 6 Feb 2013 18:47:33 +0000 (19:47 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 6 Feb 2013 18:51:17 +0000 (19:51 +0100)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/web/lcom4_viewer.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb [deleted file]
sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.html.erb [new file with mode: 0644]
sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase_working_view.erb [deleted file]
sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase_working_view.html.erb [new file with mode: 0644]
sonar-server/src/main/webapp/stylesheets/style.css

index 6e1a283647c74de110c5ea1c7dd58e96824c7e02..1b23f7f00d6a42094eea641b0835ae7f71b0bc71 100644 (file)
@@ -9,16 +9,17 @@
 
   table#lcom4blocks td.lcom4BlockIndex {
     font-size: 130%;
-    margin-top: 3px;
+    padding-top: 10px;
     text-align: center;
     width: 2em;
   }
 
   table.lcom4block {
-    background-color: #EEEEEE;
-    border: 1px solid #CCCCCC;
-    margin-bottom: 15px;
+    background-color: #EFEFEF;
+    border: 1px solid #DDD;
+    border-right: none;
     width: 100%;
+    margin-top: 10px;
   }
 
   table.lcom4block td {
index 4ce093579161607001635d74edf445ee76c1e3ab..a1b01446a25707c9d28095ebf7c7469d6b0354b1 100644 (file)
@@ -15,7 +15,7 @@
         </div>
       <% end %>
       <% if logged_in? %><%= link_to_favourite(@resource) -%><% end %>
-      <span class="h3"><%= qualifier_icon(@resource) -%> <%= @resource.name(true) -%></span>
+      <span class="h1"><%= qualifier_icon(@resource) -%> <%= @resource.name(true) -%></span>
     </div>
   <% end %>
 
@@ -34,7 +34,7 @@
         <a href="<%= ApplicationController.root_context -%>/resource/index/<%= @resource.key -%>?display_title=true" onclick="window.open(this.href,'resource','height=800,width=900,scrollbars=1,resizable=1');return false;"><%= message('new_window') -%></a>
       </li>
     </ul>
-    <ul class="tabs">
+    <ul class="tabs2">
       <% @extensions.each do |extension| %>
         <li>
           <a href="#" onclick="return loadResourceViewer('<%= @resource.id -%>','<%= extension.getId() -%>',<%= display_title -%>, this)" class="<%= 'selected' if @extension && @extension.getId()==extension.getId() -%>"><%= message(extension.getId() + '.page', :default => extension.getTitle()) %></a>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.erb
deleted file mode 100644 (file)
index 9ee32ad..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<div class="accordion-item">
-  <div class="accordion-item-header">
-    <h3>Tests covering <%= @testable.component.longName %> on line <%= @line %></h3>
-  </div>
-  <br/>
-  <div class="accordion-item-body">
-    <% @test_case_by_test_plan.sort_by{|test_plan, test_cases| test_plan.component.longName}.each do |test_plan, test_cases| %>
-      <% resource_key = test_plan.component.key %>
-      <table class="data">
-        <thead>
-        <tr>
-          <th colspan="3">
-            <a href="<%= ApplicationController.root_context -%>/resource/index/<%= resource_key -%>?display_title=true&tab=source"
-               onclick="openAccordionItem(this.href, this); return false;"><%= test_plan.component.longName %>
-            </a>
-          </th>
-        </tr>
-        </thead>
-        <tbody>
-        <% reset_cycle %>
-        <% test_cases.sort_by{|test_case| test_case.name}.each do |test_case| %>
-        <tr class="<%= cycle("even", "odd") -%>">
-          <td class="thin" nowrap>
-            <img src="<%= ApplicationController.root_context + "/images/test/" + test_case.status.name + ".png" -%>"/>
-          </td>
-          <td class="thin right" nowrap><%= test_case.durationInMs -%> ms</td>
-          <td>
-            <%= test_case.name -%>
-          </td>
-        </tr>
-        <% end %>
-        </tbody>
-      </table>
-      <br/>
-    <% end %>
-  </div>
-</div>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable_working_view.html.erb
new file mode 100644 (file)
index 0000000..9af43f4
--- /dev/null
@@ -0,0 +1,33 @@
+<div class="accordion-item">
+  <div class="accordion-item-header">
+    <div class="source_title">
+      <div class="subtitle">Tests covering <%= @testable.component.longName %> on line <%= @line %></div>
+    </div>
+  </div>
+  <div class="accordion-item-body">
+    <% @test_case_by_test_plan.sort_by { |test_plan, test_cases| test_plan.component.longName }.each do |test_plan, test_cases| %>
+      <% resource_key = test_plan.component.key %>
+      <a href="<%= ApplicationController.root_context -%>/resource/index/<%= resource_key -%>?display_title=true&tab=source"
+         onclick="openAccordionItem(this.href, this); return false;"><%= test_plan.component.longName %>
+      </a>
+      <table class="data marginbottom10">
+        <tbody>
+        <% reset_cycle %>
+        <% test_cases.sort_by { |test_case| test_case.name }.each do |test_case|
+            reset_cycle
+        %>
+          <tr class="<%= cycle('even', 'odd') -%>">
+            <td class="thin" nowrap>
+              <img src="<%= ApplicationController.root_context + "/images/test/" + test_case.status.name + ".png" -%>"/>
+            </td>
+            <td class="thin right" nowrap><%= test_case.durationInMs -%> ms</td>
+            <td>
+              <%= test_case.name -%>
+            </td>
+          </tr>
+        <% end %>
+        </tbody>
+      </table>
+    <% end %>
+  </div>
+</div>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase_working_view.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase_working_view.erb
deleted file mode 100644 (file)
index 895305f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<div class="accordion-item">
-  <div class="accordion-item-header">
-    <h3>Files covered by <%= @test %> (<%= @test_plan.component.longName %>)</h3>
-  </div>
-  <br/>
-  <div class="accordion-item-body">
-    <table class="data">
-      <thead>
-      <tr>
-        <th>File</th>
-        <th>Covered Lines</th>
-      </tr>
-      </thead>
-      <tbody>
-      <% @test_case.covers.sort_by{|cover| cover.testable.component.name}.each do |cover| %>
-      <tr class="<%= cycle("even", "odd") -%>">
-        <td>
-          <a href="<%= ApplicationController.root_context -%>/resource/index/<%= cover.testable.component.key -%>?display_title=true&tab=coverage&coverage_filter=lines_covered_per_test&test_case_filter=<%= @test -%>"
-             onclick="openAccordionItem(this.href, this); return false;"><%= cover.testable.component.longName -%>
-          </a>
-        </td>
-        <td><%= cover.lines.size -%></td>
-      </tr>
-      <% end %>
-      </tbody>
-    </table>
-  </div>
-</div>
\ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase_working_view.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase_working_view.html.erb
new file mode 100644 (file)
index 0000000..c44b770
--- /dev/null
@@ -0,0 +1,28 @@
+<div class="accordion-item">
+  <div class="accordion-item-header">
+    <h3>Files covered by <%= @test %> (<%= @test_plan.component.longName %>)</h3>
+  </div>
+  <br/>
+  <div class="accordion-item-body">
+    <table class="data">
+      <thead>
+      <tr>
+        <th>File</th>
+        <th>Covered Lines</th>
+      </tr>
+      </thead>
+      <tbody>
+      <% @test_case.coverageBlocks.sort_by{|cover| cover.testable.component.name}.each do |cover| %>
+      <tr class="<%= cycle("even", "odd") -%>">
+        <td>
+          <a href="<%= ApplicationController.root_context -%>/resource/index/<%= cover.testable.component.key -%>?display_title=true&tab=coverage&coverage_filter=lines_covered_per_test&test_case_filter=<%= @test -%>"
+             onclick="openAccordionItem(this.href, this); return false;"><%= cover.testable.component.longName -%>
+          </a>
+        </td>
+        <td><%= cover.lines.size -%></td>
+      </tr>
+      <% end %>
+      </tbody>
+    </table>
+  </div>
+</div>
\ No newline at end of file
index f82a77c01df554c4cdda15ca786932bf16269c70..5a9288dbc590e1d633e62c4a210bdc7895bb8dd2 100644 (file)
@@ -262,6 +262,10 @@ h4, .h4 {
   color: #777;
 }
 
+h1 img, .h1 img, h2 img, .h2 img, h3 img, .h3 img, h4 img, .h4 img {
+  vertical-align: sub;
+}
+
 .subtitle {
   color: #777;
   font-size: 85%;
@@ -627,7 +631,6 @@ ul.operations li img {
 .sources2 td.lid {
   background-color: #EFEFEF;
   border-right: 1px solid #DDDDDD;
-  border-left: 1px solid #DDDDDD;
   text-align: right;
   padding: 2px 0.5em 0 0.5em;
   vertical-align: top;
@@ -641,7 +644,6 @@ ul.operations li img {
 
 .sources2 td.scm {
   border-right: 1px solid #DDD;
-  border-left: 1px solid #DDD;
   background-color: #EFEFEF;
 }
 
@@ -812,7 +814,7 @@ span.rulename a:hover {
 }
 
 .source_title {
-  padding: 10px 0;
+  padding: 10px 5px;
 }
 
 .source_title span.h1 {
@@ -842,13 +844,9 @@ span.rulename a:hover {
 }
 
 .tab_header {
-  border-color: #DDD;
-  border-style: solid;
-  border-width: 1px;
-  border-top: none;
+  border-bottom: 1px solid #DDD;
   background-color: #EFEFEF;
   padding: 5px 10px;
-  color: #444;
 }
 
 .tab_header td {
@@ -1687,49 +1685,40 @@ ul.bullet li {
   padding: 10px;
 }
 
-.smalltabs {
-  line-height: 1.5em;
-  border-bottom: 1px solid #ccc;
-  vertical-align: bottom;
-  font-size: 85%;
+.tabs2 {
+  height: 20px;
+  border-bottom: 1px solid #DDD;
+  margin: 0;
+  padding: 0;
+  font-size: 93%;
 }
 
-.smalltabs .tab {
+.tabs2 li {
+  display: inline;
+  list-style-type: none;
   font-weight: normal;
-  text-decoration: none;
   color: #777;
-  background-color: #FFF;
-  border: 1px solid #DDD;
-  border-bottom: 0;
-  vertical-align: middle;
+  vertical-align: baseline;
   white-space: nowrap;
-  margin-right: 5px;
-  padding: 0.1em 0.5em;
-}
-
-.smalltabs .tab.selected {
-  font-weight: bold;
-  background-color: #EFEFEF;
-}
-
-.smalltabs .tab.selected a {
-  text-decoration: none;
-  background-color: #EFEFEF;
-  color: #777;
+  margin: 0;
+  border: 0;
+  padding: 0;
 }
 
-.smalltabs .tab a {
-  text-decoration: none;
-  background-color: #FFF;
+.tabs2 li a:link, .tabs2 li a:visited {
+  float: left;
   color: #777;
+  vertical-align: bottom;
+  height: 17px;
+  margin: 0 1px 0 0;
+  padding: 1px 5px;
 }
 
-.smalltabs .tab a:visited {
-  text-decoration: none;
-}
-
-.smalltabs .tab.selected a:visited {
+.tabs2 li a.selected:link, .tabs2 li a.selected:visited {
   text-decoration: none;
+  color: #555;
+  font-weight: bold;
+  margin: 0 1px 0 0;
 }
 
 .tabbed {
@@ -2414,17 +2403,12 @@ textarea.width100 {
 }
 
 .accordion-item {
+  border: 1px solid #DDD;
   margin-bottom: 20px;
 }
 
-.accordion-item-small {
-  height: 50px;
-  overflow: hidden;
-}
-
-.accordion-item-body-medium {
-  height: 200px;
+.accordion-item-medium {
+  max-height: 200px;
   overflow: auto;
-  border-bottom: 1px solid #DDD;
 }