]> source.dussan.org Git - vaadin-framework.git/commitdiff
Additional fixes for accordion/IE (#9552) 67/467/4
authorArtur Signell <artur@vaadin.com>
Thu, 29 Nov 2012 18:31:02 +0000 (20:31 +0200)
committerArtur Signell <artur@vaadin.com>
Mon, 10 Dec 2012 09:39:15 +0000 (11:39 +0200)
Fixes Accordion for other themes than Reindeer aswell

Change-Id: If849e77adfb07e6a14784139c19e45b3b35a43b9

WebContent/VAADIN/themes/base/accordion/accordion.scss
WebContent/VAADIN/themes/reindeer/accordion/accordion.scss
WebContent/VAADIN/themes/runo/accordion/accordion.scss
client/src/com/vaadin/client/ui/accordion/AccordionConnector.java
uitest/src/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.java
uitest/src/com/vaadin/tests/components/accordion/AccordionTheme.html [new file with mode: 0644]

index 833060ade8958197233a88c3a2ff710830fac62e..65906d491fdc630bfca2f32f548e5917fa4a3e73 100644 (file)
@@ -8,7 +8,8 @@
 }
 .v-accordion-item {
        position: relative;
-       zoom: 1;
+       display: inline-block;
+       width: 100%;
 }
 .v-accordion-item-caption {
        overflow: visible;
index bc332dd13b85e0420f4c82b610ce100e16e11c47..c6ffaa48231cf12a3cb116871bcc16d46a6900c1 100644 (file)
@@ -5,12 +5,9 @@
        border-radius: 2px;
        -webkit-border-radius: 2px;
        -moz-border-radius: 2px;
-       overflow: visible;
 }
 .#{$primaryStyleName}-item {
        background-color: #fff;
-       display: inline-block;
-       width: 100%;
 }
 .#{$primaryStyleName}-item-caption {
        height: 19px;
@@ -30,7 +27,7 @@
        border-top: none;
 }
 .#{$primaryStyleName}-item-caption .v-caption {
-       padding: 3px 0 0px 10px;
+       padding: 3px 0 3px 10px;
 }
 .#{$primaryStyleName}-item-open .#{$primaryStyleName}-item-caption {
        background-image: url(../tabsheet/img/tabbar-bg-sel.png); /** sprite-ref: verticals; sprite-alignment: repeat */
index deeb4943712d5bf7de977ad4ff0a7dae86f9580e..f85a1dadabc6b283e65f0eb24aec0fa1ffdde7b6 100644 (file)
@@ -9,8 +9,8 @@
        border-top: 1px solid #c8cccd;
 }
 .#{$primaryStyleName}-item-caption .v-caption {
-       padding: 7px 0 6px 31px;
-       background: transparent url(img/collapsed-icon.png) no-repeat 18px 50%;
+       padding: 7px 0 4px 31px;
+       background: transparent url(img/collapsed-icon.png) no-repeat 18px 55%;
 }
 .#{$primaryStyleName}-item-open .#{$primaryStyleName}-item-caption {
        color: #3b4b57;
@@ -20,7 +20,7 @@
 }
 .#{$primaryStyleName}-item-open .#{$primaryStyleName}-item-caption .v-caption {
        background-image: url(img/expanded-icon.png);
-       background-position: 17px 50%;
+       background-position: 17px 55%;
 }
 .#{$primaryStyleName}-item-first .#{$primaryStyleName}-item-caption {
        border-top: none;
index 99e4ec0ffd9f17337b7d09fb5a3cf324f1b7a435..9bf48285844c0485d24a2e4be328f4038ad77a6d 100644 (file)
@@ -21,6 +21,7 @@ import com.vaadin.client.ApplicationConnection;
 import com.vaadin.client.ComponentConnector;
 import com.vaadin.client.ConnectorHierarchyChangeEvent;
 import com.vaadin.client.UIDL;
+import com.vaadin.client.Util;
 import com.vaadin.client.ui.SimpleManagedLayout;
 import com.vaadin.client.ui.VAccordion;
 import com.vaadin.client.ui.VAccordion.StackItem;
@@ -108,7 +109,7 @@ public class AccordionConnector extends TabsheetBaseConnector implements
                     usedPixels += item.getCaptionHeight();
                 } else {
                     // This includes the captionNode borders
-                    usedPixels += item.getHeight();
+                    usedPixels += Util.getRequiredHeight(item.getElement());
                 }
             }
             int rootElementInnerHeight = getLayoutManager().getInnerHeight(
index 387ec7857f5ebc7e62d1704755377aa8678a314f..00aadb58dad18d8c54127c5e7988a8a4bdc98d3d 100644 (file)
@@ -22,7 +22,7 @@ public class AccordionInactiveTabSize extends TestBase {
     protected void setup() {
         HorizontalSplitPanel sp = new HorizontalSplitPanel();
         sp.setWidth("100%");
-        sp.setHeight("70px");
+        sp.setHeight("100px");
 
         Accordion acc = new Accordion();
 
diff --git a/uitest/src/com/vaadin/tests/components/accordion/AccordionTheme.html b/uitest/src/com/vaadin/tests/components/accordion/AccordionTheme.html
new file mode 100644 (file)
index 0000000..4d04d30
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>com.vaadin.tests.components.accordion.AccordionInactiveTabSize</title>
+</head>
+<body>
+       <table cellpadding="1" cellspacing="1" border="1">
+               <thead>
+                       <tr>
+                               <td rowspan="1" colspan="3">com.vaadin.tests.components.accordion.AccordionInactiveTabSize</td>
+                       </tr>
+               </thead>
+               <tbody>
+                       <tr>
+                               <td>open</td>
+                               <td>/run/com.vaadin.tests.components.accordion.AccordionInactiveTabSize?restartApplication&amp;theme=base</td>
+                               <td></td>
+                       </tr>
+                       <tr>
+                               <td>screenCapture</td>
+                               <td></td>
+                               <td>base</td>
+                       </tr>
+                       <tr>
+                               <td>open</td>
+                               <td>/run/com.vaadin.tests.components.accordion.AccordionInactiveTabSize?restartApplication&amp;theme=runo</td>
+                               <td></td>
+                       </tr>
+                       <tr>
+                               <td>screenCapture</td>
+                               <td></td>
+                               <td>runo</td>
+                       </tr>
+                       <tr>
+                               <td>open</td>
+                               <td>/run/com.vaadin.tests.components.accordion.AccordionInactiveTabSize?restartApplication&amp;theme=chameleon</td>
+                               <td></td>
+                       </tr>
+                       <tr>
+                               <td>screenCapture</td>
+                               <td></td>
+                               <td>chameleon</td>
+                       </tr>
+                       <tr>
+                               <td>open</td>
+                               <td>/run/com.vaadin.tests.components.accordion.AccordionInactiveTabSize?restartApplication&amp;theme=liferay</td>
+                               <td></td>
+                       </tr>
+                       <tr>
+                               <td>screenCapture</td>
+                               <td></td>
+                               <td>liferay</td>
+                       </tr>
+               </tbody>
+       </table>
+</body>
+</html>
\ No newline at end of file