diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-26 09:17:29 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-26 09:17:52 +0100 |
commit | d5df27d16a0b9c669a82b466c1ec3d468c08e817 (patch) | |
tree | 69bf4490ffab641c30dc2aeafa29ac602eb687e3 /sonar-server | |
parent | 86bd30f572bdf18c0d3dc797fb0a4baeafc47242 (diff) | |
download | sonarqube-d5df27d16a0b9c669a82b466c1ec3d468c08e817.tar.gz sonarqube-d5df27d16a0b9c669a82b466c1ec3d468c08e817.zip |
Fix issue on Google Chrome where horizontal scroll appear on resource viewer, reduce height of space separation in source code
Diffstat (limited to 'sonar-server')
8 files changed, 19 insertions, 12 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_extension.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_extension.html.erb index 772ba48e57e..6eee7673dda 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_extension.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_extension.html.erb @@ -1,4 +1,4 @@ -<div class="accordion-item"> +<div> <div class="accordion-item-header"> <%= render :partial => 'tabs' -%> </div> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_index.html.erb index a84a963d0e6..4ba68cf8d0a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_index.html.erb @@ -1,4 +1,4 @@ -<div class="accordion-item"> +<div> <div class="accordion-item-header"> <%= render :partial => 'tabs' -%> </div> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_nothing.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_nothing.html.erb index 8238e6f9bd4..b7f73bc6ae7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_nothing.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_nothing.html.erb @@ -1,3 +1,3 @@ -<div class="accordion-item"> +<div> <%= render :partial => 'tabs' -%> </div>
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_resource_deleted.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_resource_deleted.html.erb index cad00e3f454..202ddda1616 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_resource_deleted.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_resource_deleted.html.erb @@ -1,3 +1,3 @@ -<div class="accordion-item"> +<div> <%= message('resource_viewer.resource_deleted') -%> </div>
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable.html.erb index f9b6f0493a2..5b4dbe05d0e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testable.html.erb @@ -1,4 +1,4 @@ -<div class="accordion-item"> +<div> <div class="accordion-item-header"> <div class="source_title"> <div class="subtitle"><%= message('test_viewer.tests_covering', :params => [@testable.component.longName, @line]) %></div> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase.html.erb index a7c5eb0832f..bf53b59b175 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/test/_testcase.html.erb @@ -1,4 +1,4 @@ -<div class="accordion-item"> +<div> <div class="accordion-item-header"> <div class="source_title"> <div class="subtitle"> diff --git a/sonar-server/src/main/webapp/javascripts/application.js b/sonar-server/src/main/webapp/javascripts/application.js index fe05df2492b..c72312a32f2 100644 --- a/sonar-server/src/main/webapp/javascripts/application.js +++ b/sonar-server/src/main/webapp/javascripts/application.js @@ -323,7 +323,6 @@ function supports_html5_storage() { //******************* HANDLING OF WORKING VIEWS [BEGIN] ******************* // function openAccordionItem(url, elt, updateCurrentElement) { - var htmlClass = 'accordion-item'; var currentElement = $j(elt).closest('.'+ htmlClass); @@ -367,11 +366,9 @@ function openAccordionItem(url, elt, updateCurrentElement) { } if (updateCurrentElement) { - var currentElementOffset = currentElement.offset(); - // Fix the height in order to not change the position on the screen var prevHeight = $j("#accordion-panel").height(); - currentElement.replaceWith(html); + currentElement.html(html); $j("#accordion-panel").height('auto'); var newHeight = $j("#accordion-panel").height(); if (prevHeight > newHeight) { @@ -381,7 +378,11 @@ function openAccordionItem(url, elt, updateCurrentElement) { } } else { // Add new item add the end of the panel and restore the height param - $j("#accordion-panel").append(html); + var nbElement = $j("."+htmlClass).size(); + var newElement = $j('<div id="'+ htmlClass + nbElement +'" class="'+ htmlClass +'">'); + newElement.html(html); + + $j("#accordion-panel").append(newElement); $j("#accordion-panel").height('auto'); // Set the focus on the top of the current item with animation diff --git a/sonar-server/src/main/webapp/stylesheets/style.css b/sonar-server/src/main/webapp/stylesheets/style.css index dac16482f59..ecf269dcdd5 100644 --- a/sonar-server/src/main/webapp/stylesheets/style.css +++ b/sonar-server/src/main/webapp/stylesheets/style.css @@ -404,6 +404,11 @@ h1 img, .h1 img, h2 img, .h2 img, h3 img, .h3 img, h4 img, .h4 img { color: #fff; } +table.data { + /* Fix an issue on Google Chrome to prevent the horizontal scroll to appear */ + border-collapse : separate; +} + table.data > thead > tr > th { font-size: 93%; padding: 4px 7px 4px 3px; @@ -803,7 +808,7 @@ span.rulename a:hover { border-width: 1px 0; border-style: solid; border-color: #EEE #DDD; - height: 40px; + height: 30px; background: url('../images/gray-stripes.png'); } @@ -2388,3 +2393,4 @@ textarea.width100 { overflow: auto; } + |