[richfaces-svn-commits] JBoss Rich Faces SVN: r18660 - in trunk/ui: output/ui/src/main/resources/META-INF/resources/org.richfaces and 1 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon Aug 16 09:15:57 EDT 2010


Author: Alex.Kolonitsky
Date: 2010-08-16 09:15:57 -0400 (Mon, 16 Aug 2010)
New Revision: 18660

Added:
   trunk/ui/output/ui/src/test/java/org/richfaces/component/AbstractAccordionTest.java
Modified:
   trunk/ui/dist/richfaces-components-api/pom.xml
   trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
Log:
skinning for accordion

Modified: trunk/ui/dist/richfaces-components-api/pom.xml
===================================================================
--- trunk/ui/dist/richfaces-components-api/pom.xml	2010-08-16 13:04:29 UTC (rev 18659)
+++ trunk/ui/dist/richfaces-components-api/pom.xml	2010-08-16 13:15:57 UTC (rev 18660)
@@ -152,7 +152,7 @@
                                 <configuration>
                                     <classifier>sources</classifier>
 
-                                    <includeGroupIds>org.richfaces.ui.common, org.richfaces.ui.core, org.richfaces.ui.iteration, org.richfaces.ui.output</includeGroupIds>
+                                    <includeGroupIds>org.richfaces.ui.common, org.richfaces.ui.core, org.richfaces.ui.iteration, org.richfaces.ui.output, org.richfaces.ui.input</includeGroupIds>
                                     <useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
                                     <excludeTransitive>true</excludeTransitive>
                                 </configuration>

Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss	2010-08-16 13:04:29 UTC (rev 18659)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/accordion.ecss	2010-08-16 13:15:57 UTC (rev 18660)
@@ -1,24 +1,33 @@
 .rf-ac {
     width: 300px; /*visible width*/
-    border: 1px solid #{richSkin.panelBorderColor}; 
+    border-width: 1px;
+    border-style: solid;
+    border-color: '#{richSkin.panelBorderColor}';
     border-bottom: 0px;
-    background: #{richSkin.generalBackgroundColor};
+    background: '#{richSkin.generalBackgroundColor}';
 }
 
 .rf-aci-h {
-    border-bottom: 1px solid #{richSkin.panelBorderColor};
-    background: url(images/bg_header.png) /*from headerGradientColor to headerBackgroundColor, picture height 20px*/ repeat-x top left #{richSkin.headerBackgroundColor};
+    border-bottom-width: 1px;
+    border-bottom-style: solid;
+    border-bottom-color: '#{richSkin.panelBorderColor}';
+    background-image: "url(#{resource['org.richfaces.renderkit.html.GradientA']})";
+    background-repeat: repeat-x;
+    background-position: top left; 
+    background-color: '#{richSkin.headerBackgroundColor}';
     position: relative;
     padding: 8px 10px 7px 10px;
-    font-weight: #{richSkin.headerWeightFont};
-    color: #{richSkin.headerTextColor};
-    font-family: #{richSkin.headerFamilyFont};
-    font-size: #{richSkin.headerSizeFont};
+    font-weight: '#{richSkin.headerWeightFont}';
+    color: '#{richSkin.headerTextColor}';
+    font-family: '#{richSkin.headerFamilyFont}';
+    font-size: '#{richSkin.headerSizeFont}';
     cursor: pointer;
 }
 
 .rf-aci-c {
-    border-bottom: 1px solid #{richSkin.panelBorderColor};
+    border-bottom-width: 1px;
+    border-bottom-style: solid;
+    border-bottom-color: '#{richSkin.panelBorderColor}';
     height: 100px /*visible modal panel height minus header height*/;
     position: relative;
     overflow: auto;

Added: trunk/ui/output/ui/src/test/java/org/richfaces/component/AbstractAccordionTest.java
===================================================================
--- trunk/ui/output/ui/src/test/java/org/richfaces/component/AbstractAccordionTest.java	                        (rev 0)
+++ trunk/ui/output/ui/src/test/java/org/richfaces/component/AbstractAccordionTest.java	2010-08-16 13:15:57 UTC (rev 18660)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.richfaces.component;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.faces.component.UIComponent;
+import java.util.List;
+
+/**
+ * @author akolonitsky
+ * @since 2010-08-14
+ */
+public class AbstractAccordionTest {
+
+    private static final String ITEM1 = "item1";
+    private static final String ITEM2 = "item2";
+    private static final String ITEM3 = "item3";
+
+    private AbstractAccordion accordion;
+    private AbstractTogglePanelTitledItem item1;
+    private AbstractTogglePanelTitledItem item2;
+    private AbstractTogglePanelTitledItem item3;
+
+    @Before
+    public void setUp () {
+        accordion = new AbstractAccordion();
+        List<UIComponent> children = accordion.getChildren();
+
+        item1 = createItem(ITEM1);
+        children.add(item1);
+
+        item2 = createItem(ITEM2);
+        children.add(item2);
+
+        item3 = createItem(ITEM3);
+        children.add(item3);
+    }
+
+    @Test
+    public void testDefaultActiveItem() {
+        Assert.assertNotNull(accordion);
+        Assert.assertEquals(ITEM1, accordion.getActiveItem());
+
+        accordion.setActiveItem(ITEM2);
+        Assert.assertEquals(ITEM2, accordion.getActiveItem());
+    }
+
+    private static AbstractTogglePanelTitledItem createItem(String name) {
+        AbstractTogglePanelTitledItem item = new UITogglePanelTitledItem();
+        item.setName(name);
+
+        return item;
+    }
+}
+



More information about the richfaces-svn-commits mailing list