aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2014-06-23 15:24:21 +0600
committerStas Vilchik <vilchiks@gmail.com>2014-06-23 15:24:29 +0600
commit217fdf83b4250bb0d6df8cb853ab1b8f9a3366a7 (patch)
treee11e842580880d6df5ba3e1f4fa6f5096d979d72
parent9e1acce68a170b0945ef55db16fc9707cfa347db (diff)
downloadsonarqube-217fdf83b4250bb0d6df8cb853ab1b8f9a3366a7.tar.gz
sonarqube-217fdf83b4250bb0d6df8cb853ab1b8f9a3366a7.zip
SONAR-5333 Improve links consistency
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_metric.html.erb6
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb4
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb6
-rw-r--r--sonar-server/src/main/less/dashboard.less3
-rw-r--r--sonar-server/src/main/less/layout.less1
-rw-r--r--sonar-server/src/main/less/style.less2
-rw-r--r--sonar-server/src/main/less/ui.less33
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/components/index.html.erb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_severity.html.erb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb2
13 files changed, 30 insertions, 41 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_metric.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_metric.html.erb
index 103b9ac8bad..bf2872762d8 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_metric.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_metric.html.erb
@@ -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,14 +63,14 @@
%>
<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>
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb
index f9697b58ab2..8bd76b5af67 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb
@@ -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>
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb
index 2618f3cd952..d30b7b700db 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb
@@ -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>
@@ -97,13 +97,13 @@
<%= 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>
diff --git a/sonar-server/src/main/less/dashboard.less b/sonar-server/src/main/less/dashboard.less
index de628316f9f..6d9a149ae59 100644
--- a/sonar-server/src/main/less/dashboard.less
+++ b/sonar-server/src/main/less/dashboard.less
@@ -74,8 +74,7 @@
}
#dashboard .widget-title a {
- .base-link;
- .chevron-link;
+ .highlighted-link;
}
/*CONFIGURATION*/
diff --git a/sonar-server/src/main/less/layout.less b/sonar-server/src/main/less/layout.less
index 69d93189211..86cda25ce4f 100644
--- a/sonar-server/src/main/less/layout.less
+++ b/sonar-server/src/main/less/layout.less
@@ -224,7 +224,6 @@ ul.sidebar li {
ul.sidebar li > a {
.highlighted-link;
- .chevron-link;
}
ul.sidebar li.active {
diff --git a/sonar-server/src/main/less/style.less b/sonar-server/src/main/less/style.less
index 26e3c87b43b..2cf665fa67b 100644
--- a/sonar-server/src/main/less/style.less
+++ b/sonar-server/src/main/less/style.less
@@ -2060,7 +2060,7 @@ div.barchart {
}
div.barchart > div {
- background-color: #4B9FD5;
+ background-color: @darkBlue;
height: 0.9em;
}
diff --git a/sonar-server/src/main/less/ui.less b/sonar-server/src/main/less/ui.less
index 7b978880ecd..855473bce36 100644
--- a/sonar-server/src/main/less/ui.less
+++ b/sonar-server/src/main/less/ui.less
@@ -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;
+}
+
/*
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
index d1a7a8c67d2..275226c8250 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb
@@ -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
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb
index 5e3a31dbe50..ca4472c524b 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/measures_helper.rb
@@ -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'
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/components/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/components/index.html.erb
index 0ce35cae214..8ad4f2424ba 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/components/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/components/index.html.erb
@@ -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 %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_severity.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_severity.html.erb
index ebaeb1f8617..cb890b1cf7a 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_severity.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_severity.html.erb
@@ -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) -%>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb
index 9f27edc2855..1c3761ac0de 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb
@@ -101,7 +101,7 @@
: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">
@@ -161,9 +161,9 @@
<%= 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>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb
index b2133dc6896..720a5313ffd 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb
@@ -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 %>