diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-03-01 11:37:50 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-03-01 11:37:50 +0100 |
commit | 33b92834463e73d97376c8f159ed357f953d5642 (patch) | |
tree | 8d432281c2e3fddb7559febc2197fa79e61d48f0 | |
parent | 5eec0522412016db9ee307a6c7fe7db859e8a6d2 (diff) | |
download | sonarqube-33b92834463e73d97376c8f159ed357f953d5642.tar.gz sonarqube-33b92834463e73d97376c8f159ed357f953d5642.zip |
Rollback change on widget CSS classname
-> CSS class of widgets is the widget id, for example <div class="coverage"> if the widget id is "coverage"
6 files changed, 12 insertions, 23 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TreemapWidget.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TreemapWidget.java index 261f2347ddf..5ac71e2f661 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TreemapWidget.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/widgets/TreemapWidget.java @@ -29,7 +29,8 @@ import org.sonar.api.web.*; }) public class TreemapWidget extends AbstractRubyTemplate implements RubyRailsWidget { public String getId() { - return "treemap"; + // do not use the id "treemap" to avoid conflict with the same CSS class + return "treemap-widget"; } public String getTitle() { 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 06e73423ad1..dc057cf5dbe 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 @@ -22,7 +22,7 @@ <script type="text/javascript"> function showMostViolatedRules<%= widget.id -%>(severity) { - divs = $$('#widget-<%= widget.id-%> div.hotspot'); + divs = $$('#block_<%= widget.id-%> div.hotspot'); for (i = 0; i < divs.size(); i++) { divs[i].hide(); } @@ -49,7 +49,7 @@ </div> -<div id="widget-<%= widget.id -%>"> +<div> <% measures_by_severity.each do |severity, measures| if measures.empty? diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb index e78d6d2fed1..d89d4d60535 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb @@ -61,12 +61,11 @@ end # Should display the sparkline? - displaySparkLine = widget_properties["displaySparkLine"] if snapshot_by_id.size > 1 + display_sparkline = snapshot_by_id.size > 1 && widget_properties["displaySparkLine"] %> -<div class="widget-matrix"> - - <table class="data"> +<div style="overflow: auto;font-size: 12px;padding: 1px;"> + <table class="table table-bordered"> <thead> <tr> @@ -75,13 +74,13 @@ snapshots.each do |snapshot| event = snapshot.event('Version') %> - <th nowrap="nowrap" style="vertical-align:top"> + <th nowrap="nowrap" style="vertical-align:top;text-align: right;font-size: 12px"> <%= l snapshot.created_at.to_date -%> <br/> <%= event.name unless event==nil -%> </th> <% end %> - <% if displaySparkLine %> + <% if display_sparkline %> <th></th> <% end %> </tr> @@ -103,7 +102,7 @@ <% end %> <% sparkline_url=row.sparkline_url - if displaySparkLine && sparkline_url + if display_sparkline && sparkline_url %> <td width="1%"> <%= image_tag(sparkline_url) %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_configure_widget.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_configure_widget.html.erb index 78196d47796..242508a802e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_configure_widget.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_configure_widget.html.erb @@ -26,7 +26,7 @@ </div> -<div id="widget_<%= widget.id -%>" class="configure_widget widget-<%= widget.java_definition.getId() -%>" style="height:100%;<%= 'display:none;' if !widget.configured -%>"> +<div id="widget_<%= widget.id -%>" class="configure_widget <%= h widget.java_definition.getId() -%>" style="height:100%;<%= 'display:none;' if !widget.configured -%>"> <!--[if lte IE 6]> <style type="text/css"> #dashboard .block .content .transparent { diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb index 56952215ae1..a2beaac861c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb @@ -1,4 +1,4 @@ -<div class="widget-<%= widget.key -%>" style="height:100%;"> +<div class="<%= h widget.key -%>" style="height:100%;"> <% if widget.configured %> <% begin diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index 73574aaf5ea..0d9411a9198 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -2151,17 +2151,6 @@ table.matrix tbody td.title { padding: 5px 0 0 5px; } -div.widget-matrix { - overflow: auto; - font-size: 12px; - padding: 1px; -} - -div.widget-matrix th { - text-align: right; - font-weight: normal; -} - a.nolink, .dashbox a, .dashbox a:visited { text-decoration: none; } |