]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4193 Improve modal rule css
authorJulien Lancelot <julien.lancelot@gmail.com>
Wed, 13 Mar 2013 16:15:32 +0000 (17:15 +0100)
committerJulien Lancelot <julien.lancelot@gmail.com>
Wed, 13 Mar 2013 16:15:32 +0000 (17:15 +0100)
sonar-server/src/main/webapp/WEB-INF/app/views/rules/_show.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/index.html.erb
sonar-server/src/main/webapp/stylesheets/style.css

index 291804b95c39cc00f6cdd10b520642edee36ea0d..4329c7329911272746bbc937250cc19b56b8c852 100644 (file)
@@ -1,30 +1,31 @@
 <% if @rule %>
-<div class="modal-head" style="height:40px">
+<div class="modal-head">
   <h2>
     <%= @rule.name %>
   </h2>
-  <div class="subtitle" style="line-height:0px;">
-    <%= @rule.plugin_name -%> : <%= @rule.plugin_rule_key -%>
-  </div>
+  <ul class="modal-head-metadata">
+    <li><%= @rule.plugin_name -%> : <%= @rule.plugin_rule_key -%></li>
+  </ul>
 </div>
-<% end %>
 
 <div class="modal-body">
-  <% if @rule %>
-    <% if @rule.description.strip.start_with?('<p>') %>
-      <%= interpret_macro @rule.description %>
-    <% else %>
-      <p><%= @rule.description %></p>
-    <% end %>
-
-    <% if @rule.note && !@rule.note.text.strip.blank? %>
-      <p><%= @rule.note.html_text -%></p>
-    <% end %>
+  <% if @rule.description.strip.start_with?('<p>') %>
+    <%= interpret_macro @rule.description %>
   <% else %>
-    <p class="error"><%= message('rules.not_found', :params => @key) %>
+    <p><%= @rule.description %></p>
+  <% end %>
+
+  <% if @rule.note && !@rule.note.text.strip.blank? %>
+    <p><%= @rule.note.html_text -%></p>
   <% end %>
 </div>
 
+<% else %>
+<div class="modal-body">
+  <p class="error"><%= message('rules.not_found', :params => @key) %>
+</div>
+<% end %>
+
 <div class="modal-foot">
   <a href="#" onclick="return closeModalWindow()"><%= h message('close') -%></a>
 </div>
index 5b5b43bd87fd860ae26f96d7d4ce0a4d205df740..7105734dc06ba1a142c8beed0dacebd0dc8d6a9f 100644 (file)
       <th class="left" nowrap><%= message('active') -%>/<%= message('severity') -%></th>
       <th class="left"><%= message('name') -%> <span style="font-weight: normal">
         [<%= link_to_function(message('rules_configuration.expand'), "expand_rules()") %> / <%= link_to_function(message('rules_configuration.collapse'), "collapse_rules()") %>]</span></th>
-      <th class="right thin" nowrap>
-        <% form_tag({:action => 'index'}) do %>
-          <%= message('rules_configuration.sort_by') -%>
+      <th class="right" nowrap>
+        <span class="middle"><%= message('rules_configuration.sort_by') -%></span>
+        <% form_tag({:action => 'index'}, :class=> 'middle', :style => 'display:inline-block') do %>
           <%= dropdown_tag "sort_by", options_for_select(@select_sort_by, @sort_by), {
               :width => '120px'
           }, {:id => 'select-rules-sort-by', :onChange => 'submitSortBy()'} -%>
index 76b527e5d00fa219ee797b54ef84f79c3aa15617..b8cfd25e79caf959ad3dc8d24e34137b73e4d463 100644 (file)
@@ -1,3 +1,23 @@
+/*
+ * Sonar, open source software quality management tool.
+ * Copyright (C) 2008-2012 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * Sonar is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * Sonar is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Sonar; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02
+ */
+
 /* CSS optimized by http://www.cleancss.com */
 
 /* ------------------- PROJECTS SEARCH FORM ------------------- */
@@ -2322,10 +2342,14 @@ ul.modal-head-metadata li {
   color: #777;
 }
 
+.modal-body {
+  padding: 10px;
+}
+
 .modal-field {
   clear: both;
   display: block;
-  padding: 5px 0 5px 140px;
+  padding: 5px 0 5px 130px;
 }
 
 .modal-field label {