]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5333 Improve links consistency
authorStas Vilchik <vilchiks@gmail.com>
Mon, 23 Jun 2014 09:24:21 +0000 (15:24 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 23 Jun 2014 09:24:29 +0000 (15:24 +0600)
13 files changed:
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_metric.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb
sonar-server/src/main/less/dashboard.less
sonar-server/src/main/less/layout.less
sonar-server/src/main/less/style.less
sonar-server/src/main/less/ui.less
sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb
sonar-server/src/main/webapp/WEB-INF/app/views/components/index.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_severity.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb

index 103b9ac8bada439476be07b69793b76346fc6960..bf2872762d8cec6402b60563cac073ccca856fb5 100644 (file)
@@ -40,7 +40,7 @@
 
     <div class="line-block">
       <div style="float:right">
-        <a href="<%= url_for_drilldown(metric) -%>"><%= message('widget.hotspot_metric.more') -%></a>
+        <a class="underlined-link" href="<%= url_for_drilldown(metric) -%>"><%= message('widget.hotspot_metric.more') -%></a>
       </div>
       <h3><%= title -%></h3>
     </div>
       %>
         <tr class="<%= cycle 'even', 'odd', :name => ('hotspot_metric' + widget.id.to_s) -%>">
           <td>
-            <%= link_to_resource(resource, h(resource.name), {:metric => metric.name}) -%>
+            <%= link_to_resource(resource, h(resource.name), {:metric => metric.name, :class => 'underlined-link'}) -%>
           </td>
           <td class="right nowrap">
             <%= format_measure(measure) -%>
           </td>
           <td class="barchart">
             <div class="barchart" style="width: <%= (measure.value*100/metric_max_value).round.to_i -%>%">
-              <div style="width: 100%;background-color:#777;"></div>
+              <div style="width: 100%;"></div>
             </div>
           </td>
         </tr>
index f9697b58ab2087b26edf96f16ef47570feecd5da..8bd76b5af67a5ff98bf4456550bfc040f4492f29 100644 (file)
@@ -40,7 +40,7 @@
 
 <div class="line-block">
   <div style="float:right">
-    <a href="<%= url_for_drilldown(metric) -%>"><%= message('widget.hotspot_metric.more') -%></a>
+    <a class="underlined-link" href="<%= url_for_drilldown(metric) -%>"><%= message('widget.hotspot_metric.more') -%></a>
   </div>
   <h3><%= title -%></h3>
 </div>
@@ -63,7 +63,7 @@
   %>
     <tr class="<%= cycle 'even', 'odd', :name => ('hotspot_most_violated_resources' + widget.id.to_s) -%>">
       <td>
-        <%= link_to_resource(resource, h(resource.name), {:tab => :violations}) -%>
+        <%= link_to_resource(resource, h(resource.name), {:tab => :violations, :class => 'underlined-link'}) -%>
       </td>
       <td class="small right">
         <i class="icon-severity-blocker"></i>
index 2618f3cd952101ce652c401b530469875bf89c9d..d30b7b700db7196e2e4fb79c39c4347fd43309af 100644 (file)
@@ -38,7 +38,7 @@
 
 <div class="line-block">
   <div style="float:right">
-    <a href="#" onclick="window.location.href='<%= url_for(:controller => 'drilldown', :action => 'issues') -%>/<%= @resource.id -%>?period=<%= dashboard_configuration.period_index -%>&severity=' + severityForLink() ">
+    <a class="underlined-link" href="#" onclick="window.location.href='<%= url_for(:controller => 'drilldown', :action => 'issues') -%>/<%= @resource.id -%>?period=<%= dashboard_configuration.period_index -%>&severity=' + severityForLink() ">
       <%= message('widget.hotspot_metric.more') -%>
     </a>
   </div>
                 <%= h rule.name -%>
               </td>
               <td class="right nowrap">
-                <a class="nolink <%= widget.key %>_<%= rule.key.parameterize %>" href="<%= url_for(:controller => 'drilldown', :action => 'issues', :id => @resource.key, :rule => rule.key, :rule_sev => m.severity, :period => dashboard_configuration.period_index) -%>">
+                <a class="underlined-link <%= widget.key %>_<%= rule.key.parameterize %>" href="<%= url_for(:controller => 'drilldown', :action => 'issues', :id => @resource.key, :rule => rule.key, :rule_sev => m.severity, :period => dashboard_configuration.period_index) -%>">
                   <%= dashboard_configuration.selected_period? ? format_variation(m) : format_measure(m) -%>
                 </a>
               </td>
               <td class="barchart">
                 <div class="barchart" style="width: <%= (value*100/max_value).round.to_i -%>%">
-                  <div style="width: 100%;background-color:#777;"></div>
+                  <div style="width: 100%;"></div>
                 </div>
               </td>
             </tr>
index de628316f9f54dffed46c0880d0ec17e4b229523..6d9a149ae5994cc26b90501c07293248f3d43b82 100644 (file)
@@ -74,8 +74,7 @@
 }
 
 #dashboard .widget-title a {
-  .base-link;
-  .chevron-link;
+  .highlighted-link;
 }
 
 /*CONFIGURATION*/
index 69d93189211d95324fffb918a839c6f795ddc36a..86cda25ce4f72ff7506a62171245f783045eca79 100644 (file)
@@ -224,7 +224,6 @@ ul.sidebar li {
 
 ul.sidebar li > a {
   .highlighted-link;
-  .chevron-link;
 }
 
 ul.sidebar li.active {
index 26e3c87b43b1c37eb0b9706b2428bf276acb2947..2cf665fa67bc46f19a6889b7f214cb70b1a1cf15 100644 (file)
@@ -2060,7 +2060,7 @@ div.barchart {
 }
 
 div.barchart > div {
-  background-color: #4B9FD5;
+  background-color: @darkBlue;
   height: 0.9em;
 }
 
index 7b978880ecdfda1ce10b6bfac432c349a646522d..855473bce368509f4d65d1ff46d78022d4923939 100644 (file)
@@ -71,10 +71,6 @@ select::-moz-focus-inner, input::-moz-focus-inner, button::-moz-focus-inner {
  * Links
  */
 
-a {
-  cursor: pointer;
-}
-
 .link() {
   outline: none;
   text-decoration: none;
@@ -87,23 +83,6 @@ a {
   }
 }
 
-.chevron-link {
-  &:after {
-    content: "\f105";
-    position: relative;
-    top: -1px;
-    vertical-align: middle;
-    margin-left: 0.4em;
-    font-family: 'sonar';
-    speak: none;
-    font-style: normal;
-    font-weight: normal;
-    font-variant: normal;
-    text-transform: none;
-    line-height: 1;
-  }
-}
-
 .base-link {
   color: @baseFontColor;
   .link;
@@ -114,6 +93,13 @@ a {
   .link;
 }
 
+.underlined-link {
+  .highlighted-link;
+  border-bottom: 1px solid @lightBlue;
+
+  &.link-red { .widget-link-red; }
+}
+
 .icon-with-link {
   outline: none;
   text-decoration: none;
@@ -134,6 +120,11 @@ a {
   }
 }
 
+a {
+  cursor: pointer;
+  .highlighted-link;
+}
+
 
 
 /*
index d1a7a8c67d25b52a008610aa7aa2b087af3d81b0..275226c8250e41b97fedef9ef82346da58d021b3 100644 (file)
@@ -323,7 +323,7 @@ module ApplicationHelper
         anchor= 'L' + options[:line].to_s
       end
       link_to(name || resource.name, {:controller => 'resource', :action => 'index', :anchor => anchor, :id => resource.id, :period => period_index, :tab => options[:tab], :rule => options[:rule],
-                                      :metric => options[:metric], :display_title => true}, :popup => ['resource', 'height=800,width=900,scrollbars=1,resizable=1'], :title => options[:title])
+                                      :metric => options[:metric], :display_title => true}, :popup => ['resource', 'height=800,width=900,scrollbars=1,resizable=1'], :title => options[:title], :class => options[:class])
     end
   end
 
index 5e3a31dbe50f91ae858886da00a06d0410066a5f..ca4472c524be55d4794bf3c046fc1620d26e71ab 100644 (file)
@@ -50,7 +50,7 @@ module MeasuresHelper
       end
 
     elsif column.key=='name'
-      "#{qualifier_icon(row.snapshot)} #{link_to(h(row.snapshot.resource.name(true)), {:controller => 'dashboard', :id => row.snapshot.resource_id}, {:title => h(row.snapshot.resource.key), :class => 'highlighted-link chevron-link'})}"
+      "#{qualifier_icon(row.snapshot)} #{link_to(h(row.snapshot.resource.name(true)), {:controller => 'dashboard', :id => row.snapshot.resource_id}, {:title => h(row.snapshot.resource.key), :class => 'underlined-link'})}"
     elsif column.key=='short_name'
       "#{qualifier_icon(row.snapshot)} #{link_to(h(row.snapshot.resource.name(false)), {:controller => 'dashboard', :id => row.snapshot.resource_id}, {:title => h(row.snapshot.resource.key), :class => 'highlighted-link'})}"
     elsif column.key=='date'
index 0ce35cae2147accb5e79eb91005c3e76ba61e19c..8ad4f2424bad5609c7087cfcd862906bc0a0d8ba 100644 (file)
@@ -53,7 +53,7 @@
                 <td class="left" x="<%= u(snapshot.project.name) -%>">
                   <%= qualifier_icon(snapshot) %>
                   <% if snapshot.display_dashboard? %>
-                    <%= link_to_resource(project, h(snapshot.project.name), :class => 'chevron-link highlighted-link') %>
+                    <%= link_to_resource(project, h(snapshot.project.name), :class => 'underlined-link') %>
                   <% else %>
                     <%= h snapshot.project.name %>
                   <% end %>
index ebaeb1f86176ee311d091c870d77a585d75bdf28..cb890b1cf7afaa934fd4aef1f916f7d78c41e540 100644 (file)
@@ -2,7 +2,7 @@
 <tr class="<%= css -%> <%= 'selected' if selected -%>">
        <td><i class="icon-severity-<%= severity.downcase -%>"></i></td>
   <td>
-    <%= link_to message("severity.#{severity}"), {:controller => :drilldown, :action => :issues, :id => @resource.id, :severity => (selected ? nil : severity), :period => @period}, :class => 'chevron-link highlighted-link' %>
+    <%= link_to message("severity.#{severity}"), {:controller => :drilldown, :action => :issues, :id => @resource.id, :severity => (selected ? nil : severity), :period => @period}, :class => 'underlined-link' %>
   </td>
   <td style="padding-left: 10px;" align="right" nowrap>
          <%= @period ? format_variation(measure, :index => @period, :style => 'light') : format_measure(measure) -%>
index 9f27edc2855c7c5b6c7417d5262ae96ca1f182a1..1c3761ac0de99f85d66c677310e30af6cefbfb0a 100644 (file)
                                         :rule_sev => (selected ? nil : rule_measure.severity), :sid => nil, :severity => @severity, :period => @period,
                                         :rids => (selected ? nil : @selected_rids)},
                             :title => "#{rule.plugin_name}: #{rule.plugin_rule_key}",
-                            :class => 'chevron-link highlighted-link'
+                            :class => 'underlined-link'
                     ) -%>
               </td>
               <td class="right" nowrap="nowrap">
               <%= qualifier_icon(resource) -%>&nbsp;
               <% if resource.source_code? %>
                 <a href="#" alt="<%= h resource.name(true) -%>" title="<%= h resource.name(true) -%>" data-key="<%= resource.key -%>"
-                   class="js-drilldown-link chevron-link highlighted-link"><%= h resource.name(false) %></a>
+                   class="js-drilldown-link underlined-link"><%= h resource.name(false) %></a>
               <% else %>
-                <%= link_to(h(resource.name), {:only_path => true, :overwrite_params => {:rids => (selected ? rids-[resource.id] : rids+[resource.id])}}, :class => 'chevron-link highlighted-link') -%>
+                <%= link_to(h(resource.name), {:only_path => true, :overwrite_params => {:rids => (selected ? rids-[resource.id] : rids+[resource.id])}}, :class => 'underlined-link') -%>
               <% end %>
             </td>
             <td class="right" nowrap>
index b2133dc68965d55fbb5b14f4c1c6b02a4cc77b72..720a5313ffd4280f39ef1b215973a5cf0bed12b8 100644 (file)
@@ -85,7 +85,7 @@
                 <%= qualifier_icon(resource) -%>&nbsp;
                 <% if resource.source_code? %>
                   <a href="#" title="<%= h resource.name(true) -%>" data-key="<%= resource.key -%>"
-                     class="js-drilldown-link chevron-link highlighted-link"><%= h resource.name(false) %></a>
+                     class="js-drilldown-link underlined-link"><%= h resource.name(false) %></a>
                 <% else %>
                   <%= link_to(h(resource.name), {:only_path => true, :overwrite_params => {:rids => (selected ? rids-[resource.id] : rids+[resource.id])}}, :class => 'chevron-link highlighted-link') -%>
                 <% end %>