Author: blabno
Date: 2011-12-17 08:20:29 -0500 (Sat, 17 Dec 2011)
New Revision: 23093
Added:
sandbox/trunk/ui/carousel/
sandbox/trunk/ui/carousel/bom/
sandbox/trunk/ui/carousel/bom/pom.xml
sandbox/trunk/ui/carousel/demo/
sandbox/trunk/ui/carousel/demo/pom.xml
sandbox/trunk/ui/carousel/demo/src/
sandbox/trunk/ui/carousel/demo/src/main/
sandbox/trunk/ui/carousel/demo/src/main/java/
sandbox/trunk/ui/carousel/demo/src/main/java/org/
sandbox/trunk/ui/carousel/demo/src/main/java/org/richfaces/
sandbox/trunk/ui/carousel/demo/src/main/java/org/richfaces/sandbox/
sandbox/trunk/ui/carousel/demo/src/main/java/org/richfaces/sandbox/carousel/
sandbox/trunk/ui/carousel/demo/src/main/java/org/richfaces/sandbox/carousel/Bean.java
sandbox/trunk/ui/carousel/demo/src/main/resources/
sandbox/trunk/ui/carousel/demo/src/main/webapp/
sandbox/trunk/ui/carousel/demo/src/main/webapp/META-INF/
sandbox/trunk/ui/carousel/demo/src/main/webapp/META-INF/MANIFEST.MF
sandbox/trunk/ui/carousel/demo/src/main/webapp/META-INF/context.xml
sandbox/trunk/ui/carousel/demo/src/main/webapp/WEB-INF/
sandbox/trunk/ui/carousel/demo/src/main/webapp/WEB-INF/faces-config.xml
sandbox/trunk/ui/carousel/demo/src/main/webapp/WEB-INF/web.xml
sandbox/trunk/ui/carousel/demo/src/main/webapp/img/
sandbox/trunk/ui/carousel/demo/src/main/webapp/img/banner_bike.jpg
sandbox/trunk/ui/carousel/demo/src/main/webapp/img/banner_paint.jpg
sandbox/trunk/ui/carousel/demo/src/main/webapp/img/banner_tunnel.jpg
sandbox/trunk/ui/carousel/demo/src/main/webapp/index.jsp
sandbox/trunk/ui/carousel/demo/src/main/webapp/menu.xhtml
sandbox/trunk/ui/carousel/demo/src/main/webapp/sample_1.xhtml
sandbox/trunk/ui/carousel/parent/
sandbox/trunk/ui/carousel/parent/pom.xml
sandbox/trunk/ui/carousel/pom.xml
sandbox/trunk/ui/carousel/ui/
sandbox/trunk/ui/carousel/ui/pom.xml
sandbox/trunk/ui/carousel/ui/src/
sandbox/trunk/ui/carousel/ui/src/main/
sandbox/trunk/ui/carousel/ui/src/main/java/
sandbox/trunk/ui/carousel/ui/src/main/java/org/
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/component/
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/component/AbstractCarousel.java
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/component/package-info.java
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/renderkit/
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/renderkit/html/
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/renderkit/html/CarouselRenderer.java
sandbox/trunk/ui/carousel/ui/src/main/resources/
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel.alpha.js
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel.css
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel_flavors.css
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/richfaces.carousel.js
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/sprite_ac_disabled.png
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/sprite_ac_hover.png
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/sprite_ac_normal.png
sandbox/trunk/ui/carousel/ui/src/test/
sandbox/trunk/ui/carousel/ui/src/test/java/
Log:
Implemented carousel component prototype.
Property changes on: sandbox/trunk/ui/carousel
___________________________________________________________________
Added: svn:ignore
+ .idea
*.iml
target
Property changes on: sandbox/trunk/ui/carousel/bom
___________________________________________________________________
Added: svn:ignore
+ .idea
*.iml
target
Added: sandbox/trunk/ui/carousel/bom/pom.xml
===================================================================
--- sandbox/trunk/ui/carousel/bom/pom.xml (rev 0)
+++ sandbox/trunk/ui/carousel/bom/pom.xml 2011-12-17 13:20:29 UTC (rev 23093)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ JBoss, Home of Professional Open Source
+ Copyright , 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.
+ -->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.richfaces.sandbox.ui.carousel</groupId>
+ <artifactId>carousel-bom</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <name>Richfaces UI Components: carousel bom</name>
+ <packaging>pom</packaging>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-bom</artifactId>
+ <version>${project.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>carousel-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+ <distributionManagement>
+ <snapshotRepository>
+ <id>bernard.labno.pl</id>
+ <name>MyCo Internal Repository</name>
+
<url>http://bernard.labno.pl/artifactory/libs-snapshot-local</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+</project>
Property changes on: sandbox/trunk/ui/carousel/demo
___________________________________________________________________
Added: svn:ignore
+ .idea
*.iml
target
Added: sandbox/trunk/ui/carousel/demo/pom.xml
===================================================================
--- sandbox/trunk/ui/carousel/demo/pom.xml (rev 0)
+++ sandbox/trunk/ui/carousel/demo/pom.xml 2011-12-17 13:20:29 UTC (rev 23093)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.sandbox.ui.carousel</groupId>
+ <artifactId>carousel-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>carousel-demo</artifactId>
+ <name>Richfaces UI Components: carousel demo</name>
+ <packaging>war</packaging>
+ <build>
+ <finalName>carousel-demo</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.sandbox.ui.carousel</groupId>
+ <artifactId>carousel-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.el</groupId>
+ <artifactId>el-ri</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+</project>
+
+
Added:
sandbox/trunk/ui/carousel/demo/src/main/java/org/richfaces/sandbox/carousel/Bean.java
===================================================================
--- sandbox/trunk/ui/carousel/demo/src/main/java/org/richfaces/sandbox/carousel/Bean.java
(rev 0)
+++
sandbox/trunk/ui/carousel/demo/src/main/java/org/richfaces/sandbox/carousel/Bean.java 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,93 @@
+package org.richfaces.sandbox.carousel;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.model.DataModel;
+import javax.faces.model.ListDataModel;
+import java.util.Arrays;
+import java.util.List;
+
+public class Bean {
+// ------------------------------ FIELDS ------------------------------
+
+ private List<ImageData> imageDatas = Arrays.asList(
+ new ImageData("banner_bike.jpg", "This is a bike"),
+ new ImageData("banner_paint.jpg", "Nice graffitti"),
+ new ImageData("banner_tunnel.jpg", "The tunnel")
+ );
+
+ private DataModel<ImageData> imageDatasDataModel;
+ private RowKeyConverter rowKeyConverter = new RowKeyConverter();
+
+// --------------------- GETTER / SETTER METHODS ---------------------
+
+ public List<ImageData> getImageDatas() {
+ return imageDatas;
+ }
+
+ public DataModel<ImageData> getImageDatasDataModel() {
+ if (imageDatasDataModel == null) {
+ imageDatasDataModel = new ListDataModel<ImageData>(imageDatas);
+ }
+ return imageDatasDataModel;
+ }
+
+ public RowKeyConverter getRowKeyConverter() {
+ return rowKeyConverter;
+ }
+
+// -------------------------- INNER CLASSES --------------------------
+
+ public class ImageData {
+// ------------------------------ FIELDS ------------------------------
+
+ private String filename;
+ private String text;
+
+// --------------------------- CONSTRUCTORS ---------------------------
+
+ public ImageData(String filename, String text) {
+ this.filename = filename;
+ this.text = text;
+ }
+
+// --------------------- GETTER / SETTER METHODS ---------------------
+
+ public String getFilename() {
+ return filename;
+ }
+
+ public void setFilename(String filename) {
+ this.filename = filename;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+ }
+
+ public class RowKeyConverter implements Converter {
+// ------------------------ INTERFACE METHODS ------------------------
+
+
+// --------------------- Interface Converter ---------------------
+
+ public Object getAsObject(FacesContext context, UIComponent component, String
value) {
+ for (ImageData data : imageDatas) {
+ if (data.getFilename().equals(value)) {
+ return data;
+ }
+ }
+ return null;
+ }
+
+ public String getAsString(FacesContext context, UIComponent component, Object
value) {
+ return imageDatas.get((Integer) value).getFilename();
+ }
+ }
+}
Property changes on: sandbox/trunk/ui/carousel/demo/src/main/resources
___________________________________________________________________
Added: svn:ignore
+ rebel.xml
Added: sandbox/trunk/ui/carousel/demo/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- sandbox/trunk/ui/carousel/demo/src/main/webapp/META-INF/MANIFEST.MF
(rev 0)
+++ sandbox/trunk/ui/carousel/demo/src/main/webapp/META-INF/MANIFEST.MF 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: sandbox/trunk/ui/carousel/demo/src/main/webapp/META-INF/context.xml
===================================================================
--- sandbox/trunk/ui/carousel/demo/src/main/webapp/META-INF/context.xml
(rev 0)
+++ sandbox/trunk/ui/carousel/demo/src/main/webapp/META-INF/context.xml 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+ JBoss, Home of Professional Open Source
+ Copyright , 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.
+ -->
+
+<Context antiJARLocking="true" path="/notify-demo"/>
Added: sandbox/trunk/ui/carousel/demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- sandbox/trunk/ui/carousel/demo/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++ sandbox/trunk/ui/carousel/demo/src/main/webapp/WEB-INF/faces-config.xml 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,33 @@
+<?xml version='1.0' encoding='UTF-8'?><!--
+ JBoss, Home of Professional Open Source
+ Copyright , 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.
+ -->
+
+<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ version="2.0">
+
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+
<managed-bean-class>org.richfaces.sandbox.carousel.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
\ No newline at end of file
Added: sandbox/trunk/ui/carousel/demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- sandbox/trunk/ui/carousel/demo/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ sandbox/trunk/ui/carousel/demo/src/main/webapp/WEB-INF/web.xml 2011-12-17 13:20:29 UTC
(rev 23093)
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+ JBoss, Home of Professional Open Source
+ Copyright , 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.
+ -->
+
+<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
+ <display-name>Carousel demo</display-name>
+ <context-param>
+ <param-name>javax.faces.CONFIG_FILES</param-name>
+ <param-value>/WEB-INF/faces-config.xml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>classic</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: sandbox/trunk/ui/carousel/demo/src/main/webapp/img/banner_bike.jpg
===================================================================
(Binary files differ)
Property changes on: sandbox/trunk/ui/carousel/demo/src/main/webapp/img/banner_bike.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/carousel/demo/src/main/webapp/img/banner_paint.jpg
===================================================================
(Binary files differ)
Property changes on: sandbox/trunk/ui/carousel/demo/src/main/webapp/img/banner_paint.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/carousel/demo/src/main/webapp/img/banner_tunnel.jpg
===================================================================
(Binary files differ)
Property changes on: sandbox/trunk/ui/carousel/demo/src/main/webapp/img/banner_tunnel.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/carousel/demo/src/main/webapp/index.jsp
===================================================================
--- sandbox/trunk/ui/carousel/demo/src/main/webapp/index.jsp (rev
0)
+++ sandbox/trunk/ui/carousel/demo/src/main/webapp/index.jsp 2011-12-17 13:20:29 UTC (rev
23093)
@@ -0,0 +1,29 @@
+<%--
+ JBoss, Home of Professional Open Source
+ Copyright , 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.
+ --%>
+
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+<body>
+<jsp:forward page="sample_1.jsf"/>
+</body>
+</html>
Added: sandbox/trunk/ui/carousel/demo/src/main/webapp/menu.xhtml
===================================================================
--- sandbox/trunk/ui/carousel/demo/src/main/webapp/menu.xhtml (rev
0)
+++ sandbox/trunk/ui/carousel/demo/src/main/webapp/menu.xhtml 2011-12-17 13:20:29 UTC (rev
23093)
@@ -0,0 +1,28 @@
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright , 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.
+ -->
+
+<ui:component
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html">
+ <h:panelGrid colsumns="3">
+ <h:outputLink
value="#{facesContext.externalContext.requestContextPath}/sample_1.jsf">Example
1</h:outputLink>
+ </h:panelGrid>
+</ui:component>
Added: sandbox/trunk/ui/carousel/demo/src/main/webapp/sample_1.xhtml
===================================================================
--- sandbox/trunk/ui/carousel/demo/src/main/webapp/sample_1.xhtml
(rev 0)
+++ sandbox/trunk/ui/carousel/demo/src/main/webapp/sample_1.xhtml 2011-12-17 13:20:29 UTC
(rev 23093)
@@ -0,0 +1,269 @@
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright , 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.
+ -->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
+
xmlns:carousel="http://richfaces.org/sandbox/carousel">
+<h:head>
+ <title>Carousel sample</title>
+</h:head>
+<h:body class="rich-container">
+ <style type="text/css">
+ td {
+ vertical-align: top;
+ }
+
+ .flavor_2 .content_button_inner {
+ padding: 1em 0;
+ }
+
+ .flavor_3 .rf-crl-cbtn img {
+ max-width: 37px;
+ max-height: 37px;
+ margin: 1em;
+ vertical-align: middle;
+ }
+
+ .flavor_2 .rf-crl-cbtn img {
+ margin: 1em auto;
+ display: block;
+ max-height: 48px;
+ max-width: 48px;
+ }
+ .source {
+ white-space: pre; font-family: arial,sans; font-size: 10px;
+ }
+ </style>
+ <ui:include src="menu.xhtml"/>
+
+ <p>
+ This component is based on <a
href="http://www.agilecarousel.com/">Agile carousel</a>, a jQuery
plugin.
+ Note that this component can work in 2 ways. You can hard code the slides :
+ </p>
+ <p class="source">
+ <carousel:carousel>
+ <h:graphicImage value="/img/banner_bike.jpg"/>
+ <h:graphicImage value="/img/banner_paint.jpg"/>
+ </carousel:carousel>
+ </p>
+
+ <p>
+ or you can iterate over some collection or datamodel (presence of value attribute
decides):
+ </p>
+ <p class="source">
+ <carousel:carousel value="\#{bean.data}"
var="img">
+ <h:graphicImage value="\#{img.photo}"/>
+ \#{img.title}
+ </carousel:carousel>
+ </p>
+ <h:panelGrid columns="2">
+ <carousel:carousel id="carousel" styleClass="pink"
width="480" height="229"
+ control_set_1="numbered_buttons,pause_button">
+ <h:graphicImage value="/img/banner_bike.jpg"/>
+ <h:graphicImage value="/img/banner_paint.jpg"/>
+ <h:graphicImage value="/img/banner_tunnel.jpg"/>
+ </carousel:carousel>
+ <h:panelGroup styleClass="source">
+<carousel:carousel id="carousel" styleClass="pink"
width="480" height="229"
+ control_set_1="numbered_buttons,pause_button">
+ <h:graphicImage value="/img/banner_bike.jpg"/>
+ <h:graphicImage value="/img/banner_paint.jpg"/>
+ <h:graphicImage value="/img/banner_tunnel.jpg"/>
+</carousel:carousel>
+ </h:panelGroup>
+
+ <carousel:carousel id="carousel2" interval="2000"
width="480" height="330" slideHeight="230"
slideWidth="480"
+ flavor="flavor_2" transitionType="fade"
transitionTime="600"
+
control_set_1="numbered_buttons,previous_button,pause_button,next_button"
+ control_set_2="content_buttons">
+ <h:panelGroup style="color:orange">
+ <h:graphicImage value="/img/banner_bike.jpg"/>
+ <h:panelGroup styleClass="rf-crl-cbtn">
+ <h:graphicImage value="/img/banner_bike.jpg"/>
+ The bike
+ </h:panelGroup>
+ </h:panelGroup>
+ <h:panelGroup style="color:blue">
+ <h:graphicImage value="/img/banner_paint.jpg"/>
+ <h:panelGroup styleClass="rf-crl-cbtn">
+ <h:graphicImage value="/img/banner_paint.jpg"/>
+ This is 'paint' slide
+ </h:panelGroup>
+ </h:panelGroup>
+ <h:panelGroup>
+ <h:graphicImage value="/img/banner_tunnel.jpg"/>
+ <h:panelGroup styleClass="rf-crl-cbtn">
+ <h:graphicImage value="/img/banner_tunnel.jpg"/>
+ Have you seen this tunnel?
+ </h:panelGroup>
+ </h:panelGroup>
+ </carousel:carousel>
+
+ <h:panelGroup styleClass="source">
+ <carousel:carousel id="carousel2" interval="2000"
width="480" height="330" slideHeight="230"
slideWidth="480"
+ flavor="flavor_2" transitionType="fade"
transitionTime="600"
+
control_set_1="numbered_buttons,previous_button,pause_button,next_button"
+ control_set_2="content_buttons">
+ <h:panelGroup style="color:orange">
+ <h:graphicImage value="/img/banner_bike.jpg"/>
+ <h:panelGroup styleClass="rf-crl-cbtn">
+ <h:graphicImage value="/img/banner_bike.jpg"/>
+ The bike
+ </h:panelGroup>
+ </h:panelGroup>
+ <h:panelGroup style="color:blue">
+ <h:graphicImage value="/img/banner_paint.jpg"/>
+ <h:panelGroup styleClass="rf-crl-cbtn">
+ <h:graphicImage value="/img/banner_paint.jpg"/>
+ This is 'paint' slide
+ </h:panelGroup>
+ </h:panelGroup>
+ <h:panelGroup>
+ <h:graphicImage value="/img/banner_tunnel.jpg"/>
+ <h:panelGroup styleClass="rf-crl-cbtn">
+ <h:graphicImage value="/img/banner_tunnel.jpg"/>
+ Have you seen this tunnel?
+ </h:panelGroup>
+ </h:panelGroup>
+ </carousel:carousel>
+ </h:panelGroup>
+
+ <carousel:carousel id="carousel3" styleClass="pink"
width="480" height="229" continuousScrolling="true"
+ value="#{bean.imageDatas}" var="img"
+ control_set_1="numbered_buttons,pause_button"
rowKeyConverter="#{bean.rowKeyConverter}"
+ stateVar="state" rowKeyVar="key">
+ <h:graphicImage id="im"
value="/img/#{img.filename}"/>
+ </carousel:carousel>
+
+ <h:panelGroup styleClass="source">
+ <carousel:carousel id="carousel3" styleClass="pink"
width="480" height="229" continuousScrolling="true"
+ value="\#{bean.imageDatas}" var="img"
+ control_set_1="numbered_buttons,pause_button"
rowKeyConverter="\#{bean.rowKeyConverter}"
+ stateVar="state" rowKeyVar="key">
+ <h:graphicImage id="im"
value="/img/\#{img.filename}"/>
+ </carousel:carousel>
+ </h:panelGroup>
+
+ <carousel:carousel id="carousel4" styleClass="pink"
continuousScrolling="true" interval="1000"
+ width="480" height="330"
slideHeight="230" slideWidth="480"
+ flavor="flavor_2"
+ value="#{bean.imageDatasDataModel}"
var="img"
+
control_set_1="numbered_buttons,previous_button,pause_button,next_button"
+ control_set_2="content_buttons"
+ changeOnHover="content_buttons"
+ rowKeyConverter="#{bean.rowKeyConverter}"
+ stateVar="state" rowKeyVar="key"
rows="3">
+ <h:panelGroup>
+ <h:graphicImage id="im"
value="/img/#{img.filename}"/>
+ <h:panelGroup styleClass="rf-crl-cbtn">
+ <h:graphicImage id="im"
value="/img/#{img.filename}"/>
+ #{img.text}
+ </h:panelGroup>
+ </h:panelGroup>
+ </carousel:carousel>
+
+ <h:panelGroup styleClass="source">
+ <carousel:carousel id="carousel4"
styleClass="pink" continuousScrolling="true"
interval="1000"
+ width="480" height="330"
slideHeight="230" slideWidth="480"
+ flavor="flavor_2"
+ value="\#{bean.imageDatasDataModel}"
var="img"
+
control_set_1="numbered_buttons,previous_button,pause_button,next_button"
+ control_set_2="content_buttons"
+ changeOnHover="content_buttons"
+ rowKeyConverter="\#{bean.rowKeyConverter}"
+ stateVar="state" rowKeyVar="key"
rows="3">
+ <h:panelGroup>
+ <h:graphicImage id="im"
value="/img/\#{img.filename}"/>
+ <h:panelGroup styleClass="rf-crl-cbtn">
+ <h:graphicImage id="im"
value="/img/\#{img.filename}"/>
+ \#{img.text}
+ </h:panelGroup>
+ </h:panelGroup>
+ </carousel:carousel>
+ </h:panelGroup>
+
+ <carousel:carousel id="carousel5" styleClass="pink"
continuousScrolling="true" interval="1000"
+ width="480" height="220"
slideHeight="220" slideWidth="480"
+ flavor="flavor_3"
+ value="#{bean.imageDatas}" var="img"
+ control_set_1="content_buttons"
+ changeOnHover="content_buttons"
+ >
+ <h:panelGroup>
+ <h:graphicImage id="im"
value="/img/#{img.filename}"/>
+ <h:panelGroup styleClass="rf-crl-cbtn">
+ <h:graphicImage id="im"
value="/img/#{img.filename}"/>
+ #{img.text}
+ </h:panelGroup>
+ </h:panelGroup>
+ </carousel:carousel>
+
+ <h:panelGroup styleClass="source">
+ <carousel:carousel id="carousel5"
styleClass="pink" continuousScrolling="true"
interval="1000"
+ width="480" height="220"
slideHeight="220" slideWidth="480"
+ flavor="flavor_3"
+ value="\#{bean.imageDatas}" var="img"
+ control_set_1="content_buttons"
+ changeOnHover="content_buttons"
+ >
+ <h:panelGroup>
+ <h:graphicImage id="im"
value="/img/\#{img.filename}"/>
+ <h:panelGroup styleClass="rf-crl-cbtn">
+ <h:graphicImage id="im"
value="/img/\#{img.filename}"/>
+ \#{img.text}
+ </h:panelGroup>
+ </h:panelGroup>
+ </carousel:carousel>
+ </h:panelGroup>
+ </h:panelGrid>
+
+ <h1>Custom CSS used</h1>
+ <div class="source">
+ <style type="text/css">
+ td {
+ vertical-align: top;
+ }
+
+ .flavor_2 .content_button_inner {
+ padding: 1em 0;
+ }
+
+ .flavor_3 .rf-crl-cbtn img {
+ max-width: 37px;
+ max-height: 37px;
+ margin: 1em;
+ vertical-align: middle;
+ }
+
+ .flavor_2 .rf-crl-cbtn img {
+ margin: 1em auto;
+ display: block;
+ max-height: 48px;
+ max-width: 48px;
+ }
+ </style>
+ </div>
+</h:body>
+</html>
Property changes on: sandbox/trunk/ui/carousel/parent
___________________________________________________________________
Added: svn:ignore
+ .idea
*.iml
target
Added: sandbox/trunk/ui/carousel/parent/pom.xml
===================================================================
--- sandbox/trunk/ui/carousel/parent/pom.xml (rev 0)
+++ sandbox/trunk/ui/carousel/parent/pom.xml 2011-12-17 13:20:29 UTC (rev 23093)
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ JBoss, Home of Professional Open Source
+ Copyright , 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.
+ -->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-root-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.richfaces.sandbox.ui.carousel</groupId>
+ <artifactId>carousel-parent</artifactId>
+ <name>Richfaces UI Components: carousel parent</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <richfaces.checkstyle.version>1</richfaces.checkstyle.version>
+
<org.richfaces.cdk.version>4.1.0-SNAPSHOT</org.richfaces.cdk.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.sandbox.ui.carousel</groupId>
+ <artifactId>carousel-bom</artifactId>
+ <version>${project.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>annotations</artifactId>
+ <version>${org.richfaces.cdk.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>${org.richfaces.cdk.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>xml-maven-plugin</artifactId>
+ <version>1.0-beta-2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.0-alpha-4</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.0-beta-1</version>
+ <configuration>
+ <fail>false</fail>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <distributionManagement>
+ <snapshotRepository>
+ <id>bernard.labno.pl</id>
+ <name>MyCo Internal Repository</name>
+
<url>http://bernard.labno.pl/artifactory/libs-snapshot-local</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+</project>
Added: sandbox/trunk/ui/carousel/pom.xml
===================================================================
--- sandbox/trunk/ui/carousel/pom.xml (rev 0)
+++ sandbox/trunk/ui/carousel/pom.xml 2011-12-17 13:20:29 UTC (rev 23093)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?><!--
+ JBoss, Home of Professional Open Source
+ Copyright , 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.
+ -->
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.sandbox.ui.carousel</groupId>
+ <artifactId>carousel-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <relativePath>parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>carousel-aggregator</artifactId>
+ <packaging>pom</packaging>
+ <name>Richfaces UI Components: carousel Aggregator</name>
+
+ <modules>
+ <module>bom</module>
+ <module>parent</module>
+ <module>ui</module>
+ <module>demo</module>
+ </modules>
+
+ <profiles>
+ <profile>
+ <id>cli</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.twdata.maven</groupId>
+ <artifactId>maven-cli-plugin</artifactId>
+ <version>1.0.6-SNAPSHOT</version>
+ <configuration>
+ <userAliases>
+ <ui>carousel-ui clean install</ui>
+ <demo>carousel-demo clean package</demo>
+ </userAliases>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <distributionManagement>
+ <snapshotRepository>
+ <id>bernard.labno.pl</id>
+ <name>MyCo Internal Repository</name>
+
<url>http://bernard.labno.pl/artifactory/libs-snapshot-local</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+</project>
Property changes on: sandbox/trunk/ui/carousel/ui
___________________________________________________________________
Added: svn:ignore
+ .idea
*.iml
target
Added: sandbox/trunk/ui/carousel/ui/pom.xml
===================================================================
--- sandbox/trunk/ui/carousel/ui/pom.xml (rev 0)
+++ sandbox/trunk/ui/carousel/ui/pom.xml 2011-12-17 13:20:29 UTC (rev 23093)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ JBoss, Home of Professional Open Source
+ Copyright , 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.
+ -->
+
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.sandbox.ui.carousel</groupId>
+ <artifactId>carousel-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+ <artifactId>carousel-ui</artifactId>
+ <name>Richfaces UI Components: carousel ui</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui.core</groupId>
+ <artifactId>richfaces-ui-core-ui</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>annotations</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-test-stage</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ <version>${org.richfaces.cdk.version}</version>
+ <executions>
+ <execution>
+ <id>cdk-generate-sources</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <scm>
+
<
connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/sandbox/tr...
+
<
developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/sand...
+ <
url>http://fisheye.jboss.org/browse/richfaces/</url>
+ </scm>
+
+</project>
Added:
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/component/AbstractCarousel.java
===================================================================
---
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/component/AbstractCarousel.java
(rev 0)
+++
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/component/AbstractCarousel.java 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright , 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.richfaces.cdk.annotations.*;
+import org.richfaces.renderkit.html.CarouselRenderer;
+
+@JsfComponent(tag = @Tag(name = "carousel", type = TagType.Facelets),
+ renderer = @JsfRenderer(family = AbstractCarousel.COMPONENT_FAMILY, type =
CarouselRenderer.RENDERER_TYPE))
+public abstract class AbstractCarousel extends UIRepeat {
+// ------------------------------ FIELDS ------------------------------
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.Carousel";
+
+ public static final String COMPONENT_TYPE = "org.richfaces.Carousel";
+
+// -------------------------- OTHER METHODS --------------------------
+
+ @Attribute
+ public abstract String getChangeOnHover();
+
+ @Attribute
+ public abstract String getControl_set_1();
+
+ @Attribute
+ public abstract String getControl_set_2();
+
+ @Attribute
+ public abstract String getControl_set_3();
+
+ @Attribute
+ public abstract String getControl_set_4();
+
+ @Attribute
+ public abstract String getControl_set_5();
+
+ @Attribute(defaultValue = "Flavor.flavor_1")
+ public abstract Flavor getFlavor();
+
+ @Attribute
+ public abstract Integer getHeight();
+
+ @Attribute
+ public abstract Integer getInterval();
+
+ @Attribute(defaultValue = "hover_previous_button,hover_next_button")
+ public abstract String getNo_control_set();
+
+ @Attribute
+ public abstract Integer getSlideHeight();
+
+ @Attribute
+ public abstract Integer getSlideWidth();
+
+ @Attribute
+ public abstract String getStyle();
+
+ @Attribute
+ public abstract String getStyleClass();
+
+ @Attribute
+ public abstract Integer getTransitionTime();
+
+ @Attribute(defaultValue = "TransitionType.slide")
+ public abstract TransitionType getTransitionType();
+
+ @Attribute(defaultValue = "1")
+ public abstract int getVisibleSlides();
+
+
+ @Attribute
+ public abstract Integer getWidth();
+
+ @Attribute(defaultValue = "false")
+ public abstract boolean isContinuousScrolling();
+
+// -------------------------- ENUMERATIONS --------------------------
+
+ public static enum Flavor {
+ flavor_1,
+ flavor_2,
+ flavor_3,
+ }
+
+ public static enum TransitionType {
+ slide,
+ fade
+ }
+}
Added:
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/component/package-info.java
===================================================================
--- sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/component/package-info.java
(rev 0)
+++
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/component/package-info.java 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,4 @@
+@TagLibrary(uri = "http://richfaces.org/sandbox/carousel", shortName =
"carousel", prefix = "carousel",
+ displayName = "Carousel component tags") package org.richfaces.component;
+
+import org.richfaces.cdk.annotations.TagLibrary;
\ No newline at end of file
Added:
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/renderkit/html/CarouselRenderer.java
===================================================================
---
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/renderkit/html/CarouselRenderer.java
(rev 0)
+++
sandbox/trunk/ui/carousel/ui/src/main/java/org/richfaces/renderkit/html/CarouselRenderer.java 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,178 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright , 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.renderkit.html;
+
+import org.ajax4jsf.javascript.JSObject;
+import org.ajax4jsf.model.DataVisitResult;
+import org.ajax4jsf.model.DataVisitor;
+import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.component.AbstractCarousel;
+import org.richfaces.renderkit.HtmlConstants;
+import org.richfaces.renderkit.RendererBase;
+
+import javax.faces.application.ResourceDependencies;
+import javax.faces.application.ResourceDependency;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+@JsfRenderer(family = AbstractCarousel.COMPONENT_FAMILY, type =
CarouselRenderer.RENDERER_TYPE)
+@ResourceDependencies({@ResourceDependency(library = "javax.faces", name =
"jsf.js"), @ResourceDependency(name = "jquery.js", target =
"head"),
+ @ResourceDependency(name = "richfaces.js", target = "head"),
+ @ResourceDependency(name = "richfaces-base-component.js", target =
"head"),
+ @ResourceDependency(name = "agile_carousel.alpha.js", target =
"head"),
+ @ResourceDependency(name = "richfaces.carousel.js", target =
"head"), @ResourceDependency(name = "agile_carousel.css", target =
"head"),
+ @ResourceDependency(name = "agile_carousel_flavors.css", target =
"head")})
+public class CarouselRenderer extends RendererBase {
+// ------------------------------ FIELDS ------------------------------
+
+ public static final String RENDERER_TYPE =
"org.richfaces.CarouselRenderer";
+
+ private static final Map<String, Object> DEFAULTS;
+
+// -------------------------- STATIC METHODS --------------------------
+
+ static {
+ Map<String, Object> defaults = new HashMap<String, Object>();
+ defaults.put("continuousScrolling", false);
+ defaults.put("visibleSlides", 1);
+ defaults.put("interval", 4000);
+ defaults.put("transitionTime", 300);
+ defaults.put("transitionType", "slide");
+ DEFAULTS = Collections.unmodifiableMap(defaults);
+ }
+
+// -------------------------- OTHER METHODS --------------------------
+
+ @Override
+ public void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
+ if (!(component instanceof AbstractCarousel)) {
+ return;
+ }
+ String clientId = component.getClientId(context);
+ writer.startElement(HtmlConstants.SCRIPT_ELEM, null);
+ writer.writeAttribute(HtmlConstants.TYPE_ATTR, "text/javascript",
"type");
+ final Map<String, Object> options = getOptions((AbstractCarousel)
component);
+ writer.writeText(new JSObject("RichFaces.ui.Carousel", clientId,
options), null);
+ writer.writeText(";", null);
+ writer.endElement(HtmlConstants.SCRIPT_ELEM);
+ writer.endElement(HtmlConstants.DIV_ELEM);
+ }
+
+ @Override
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ protected void addOptionIfSetAndNotDefault(String optionName, Object value,
Map<String, Object> options) {
+ if (value != null && !"".equals(value) &&
!value.equals(DEFAULTS.get(
+ optionName)) && !(value instanceof Collection &&
((Collection) value).size() == 0) && !(value instanceof Map && ((Map)
value).size() == 0)) {
+ options.put(optionName, value);
+ }
+ }
+
+ @Override
+ protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
+ if (!(component instanceof AbstractCarousel)) {
+ return;
+ }
+ AbstractCarousel carousel = (AbstractCarousel) component;
+ writer.startElement(HtmlConstants.DIV_ELEM, null);
+ writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, getUtils().clientId(context,
component), "type");
+ String styleClass = "rf-crl" + (carousel.getFlavor() != null ? "
" + carousel.getFlavor().name() : "");
+ styleClass += carousel.getStyleClass() != null ? " " +
carousel.getStyleClass() : "";
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, styleClass,
"class");
+ getUtils().encodeAttributesFromArray(context, component, new
String[]{"style"});
+ }
+
+ @Override
+ protected void doEncodeChildren(final ResponseWriter writer, FacesContext context,
UIComponent component) throws IOException {
+ final AbstractCarousel repeater = (AbstractCarousel) component;
+ if (repeater.getValue() != null) {
+ try {
+ DataVisitor visitor = new DataVisitor() {
+ public DataVisitResult process(FacesContext context, Object rowKey,
Object argument) {
+ repeater.setRowKey(context, rowKey);
+
+ if (repeater.isRowAvailable()) {
+ if (repeater.getChildCount() > 0) {
+ try {
+ writer.startElement(HtmlConstants.DIV_ELEM, null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE,
"rf-crl-sl", "class");
+ for (UIComponent child : repeater.getChildren()) {
+ child.encodeAll(context);
+ }
+ writer.endElement(HtmlConstants.DIV_ELEM);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ return DataVisitResult.CONTINUE;
+ }
+ };
+
+ repeater.walk(context, visitor, null);
+ } finally {
+ repeater.setRowKey(context, null);
+ }
+ } else {
+ for (UIComponent child : component.getChildren()) {
+ writer.startElement(HtmlConstants.DIV_ELEM, null);
+ writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE,
"rf-crl-sl", "class");
+ child.encodeAll(context);
+ writer.endElement(HtmlConstants.DIV_ELEM);
+ }
+ }
+ }
+
+ protected Map<String, Object> getOptions(AbstractCarousel carousel) throws
IOException {
+ /**
+ * Include only attributes that are actually set.
+ */
+ Map<String, Object> options = new HashMap<String, Object>();
+ addOptionIfSetAndNotDefault("width", carousel.getWidth(), options);
+ addOptionIfSetAndNotDefault("height", carousel.getHeight(), options);
+ addOptionIfSetAndNotDefault("slideWidth", carousel.getSlideWidth(),
options);
+ addOptionIfSetAndNotDefault("slideHeight", carousel.getSlideHeight(),
options);
+ addOptionIfSetAndNotDefault("continuousScrolling",
carousel.isContinuousScrolling(), options);
+ addOptionIfSetAndNotDefault("changeOnHover",
carousel.getChangeOnHover(), options);
+ addOptionIfSetAndNotDefault("control_set_1",
carousel.getControl_set_1(), options);
+ addOptionIfSetAndNotDefault("control_set_2",
carousel.getControl_set_2(), options);
+ addOptionIfSetAndNotDefault("control_set_3",
carousel.getControl_set_3(), options);
+ addOptionIfSetAndNotDefault("control_set_4",
carousel.getControl_set_4(), options);
+ addOptionIfSetAndNotDefault("control_set_5",
carousel.getControl_set_5(), options);
+ addOptionIfSetAndNotDefault("no_control_set",
carousel.getNo_control_set(), options);
+ addOptionIfSetAndNotDefault("visibleSlides",
carousel.getVisibleSlides(), options);
+ addOptionIfSetAndNotDefault("transitionType",
carousel.getTransitionType(), options);
+ addOptionIfSetAndNotDefault("transitionTime",
carousel.getTransitionTime(), options);
+ addOptionIfSetAndNotDefault("interval", carousel.getInterval(),
options);
+ return options;
+ }
+}
Added:
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel.alpha.js
===================================================================
---
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel.alpha.js
(rev 0)
+++
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel.alpha.js 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,890 @@
+/*
+ * Agile Carousel v alpha 1.1
+ *
http://agilecarousel.com/
+ *
+ * Copyright 2011, Ed Talmadge
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ *
+ *
+ */
+
+(function ($) {
+
+ $.fn.agile_carousel = function (options) {
+
+ var defaults = {
+ timer: 0,
+ continuous_scrolling: false,
+ transition_type: "slide",
+ carousel_data: [],
+ carousel_outer_width: 600,
+ slide_width: 600,
+ slide_height: 400,
+ carousel_outer_height: 400,
+ transition_time: 600,
+ number_slides_visible: 1,
+ persistent_content: "",
+ change_on_hover: "",
+ no_control_set: "",
+ control_set_1: "",
+ control_set_2: "",
+ control_set_3: "",
+ control_set_4: "",
+ control_set_5: "",
+ slide_class: "slide",
+ thumbnail_button_class:"thumbnail_button",
+ content_button_class:"content_button"
+ };
+
+ options = $.extend(defaults, options);
+
+
+ return this.each(function () {
+
+ var number_of_slides = 0;
+ var ac_html = "";
+ var ac_numbered_buttons = "";
+ var ac_group_numbered_buttons = "";
+ var ac_thumbnails = "";
+ var ac_content_buttons = "";
+ var ac_pause = "";
+ var ac_previous_button = "";
+ var ac_next_button = "";
+ var ac_hover_previous_button = "";
+ var ac_hover_next_button = "";
+ var ac_slide_count = "";
+ var ac_current_slide_number = "";
+ var ac_trigger_type = "ac_click";
+ var bd = "";
+ var button_type = "";
+ var trigger_type = "";
+ var button_action = "";
+ var ac_disabled = "";
+ var current_slide_number = "";
+ var next_slide_number = false;
+ var current_slide_index = "";
+ var next_slide_index = "";
+ var current_slide = "";
+ var next_slide = "";
+ var continuous_scrolling = options.continuous_scrolling;
+ var carousel_outer_width = options.carousel_outer_width;
+ var carousel_outer_height = options.carousel_outer_height;
+ var carousel_data = jQuery(options.carousel_data);
+ var change_on_hover = options.change_on_hover;
+ var slide_width = options.slide_width;
+ var slide_height = options.slide_height;
+ var control_set_1 = options.control_set_1;
+ var control_set_2 = options.control_set_2;
+ var control_set_3 = options.control_set_3;
+ var control_set_4 = options.control_set_4;
+ var control_set_5 = options.control_set_5;
+ var no_control_set = options.no_control_set;
+ var persistent_content = options.persistent_content;
+ var number_slides_visible = options.number_slides_visible;
+ var transition_type = options.transition_type;
+ var transition_time = options.transition_time;
+ var slide_class = options.slide_class;
+ var thumbnail_button_class = options.thumbnail_button_class;
+ var content_button_class = options.content_button_class;
+ var timer = options.timer;
+ var content = "";
+ var obj_inner = "";
+ var content_button = "";
+ var $this = "";
+ var timer_data = "";
+ var ac_timer = "";
+
+ // get the number of slides
+ $.each(carousel_data, function (key, value) {
+ number_of_slides++;
+ });
+
+ var slide_remainder = number_of_slides % number_slides_visible;
+
+ var slide_number_conversion_array = [];
+ var new_num = "";
+
+ function get_trigger_type(check_me) {
+ if (change_on_hover !== "") {
+ ac_trigger_type = "ac_click";
+ var change_on_hover_array = change_on_hover.split(",");
+ if ($.inArray(check_me, change_on_hover_array) != -1) {
+ ac_trigger_type = "ac_hover";
+ }
+ }
+ return ac_trigger_type;
+ } // function
+
+ ////////////////////////
+ // Group Numbered Buttons
+ ////////////////////////
+
+ var j = 0;
+ var i = 0;
+ for (i = 0; i < number_of_slides; i++) {
+
+ if (i === 0) {
+ ac_group_numbered_buttons = $("<div
class='group_numbered_buttons_container button_container'></div>");
+ } // if
+ var curr_num = Math.floor((i + 1) / number_slides_visible) *
number_slides_visible + 1;
+ if (curr_num !== new_num && curr_num <= number_of_slides) {
+ slide_number_conversion_array[j] = curr_num;
+
+ ac_group_numbered_buttons.append($("<div
class='slide_number_" + curr_num + " group_numbered_button slide_button
" + get_trigger_type("group_numbered_buttons") + "'
data-options='{\"button_type\":\"group_numbered_button\",\"button_action\":\"direct\",\"go_to\":"
+ curr_num + ", \"trigger_type\":\"" + ac_trigger_type +
"\",\"disabled\": false}'>" + (j + 1) +
"</div>"));
+
+ new_num = curr_num;
+
+ j++;
+ }
+
+ } // for
+ ////////////////////////
+ // Pause Button
+ ////////////////////////
+ ac_pause += "<span class='pause_button slide_button pause'
data-options='{\"button_type\":\"pause_button\",\"trigger_type\":
\"none\",\"disabled\": false,\"paused\":
false}'>Pause</span>";
+
+ ////////////////////////
+ // Previous Button
+ ////////////////////////
+ ac_previous_button += "<span class='previous_next_button
previous_button slide_button " + get_trigger_type("previous_button") +
"'
data-options='{\"button_type\":\"previous_button\",\"button_action\":\"previous\",\"trigger_type\":
\"" + ac_trigger_type + "\",\"disabled\":
false}'>Prev</span>";
+
+ ////////////////////////
+ // Next Button
+ ////////////////////////
+ ac_next_button += "<span class='previous_next_button next_button
slide_button " + get_trigger_type("next_button") + "'
data-options='{\"button_type\":\"next_button\",\"button_action\":\"next\",\"trigger_type\":
\"" + ac_trigger_type + "\",\"disabled\":
false}'>Next</span>";
+
+ ////////////////////////
+ // Hover Previous Button
+ ////////////////////////
+ ac_hover_previous_button += "<div
class='hover_previous_next_button hover_previous_button slide_button " +
get_trigger_type("hover_previous_button") + "'
data-options='{\"button_type\":\"hover_previous_button\",\"button_action\":\"previous\",\"trigger_type\":
\"" + ac_trigger_type + "\",\"disabled\":
false}'><span style='opacity: 0;'
class='hover_previous_next_button_inner'>Prev</span></div>";
+
+ ////////////////////////
+ // Hover Next Button
+ ////////////////////////
+ ac_hover_next_button += "<div class='hover_previous_next_button
hover_next_button slide_button " + get_trigger_type("hover_next_button") +
"'
data-options='{\"button_type\":\"hover_next_button\",\"button_action\":\"next\",\"trigger_type\":
\"" + ac_trigger_type + "\",\"disabled\":
false}'><span style='opacity: 0;'
class='hover_previous_next_button_inner'>Next</span></div>";
+
+ ////////////////////////
+ // Slide Count
+ ////////////////////////
+ ac_slide_count += "<span class='slide_count'>" +
number_of_slides + "</span>";
+
+ ////////////////////////
+ // Current Slide Number
+ ////////////////////////
+ ac_current_slide_number += "<span
class='current_slide_number'>1</span>";
+
+ // render beginning of div containers
+ var obj = $(this);
+ var agile_carousel = $("<div class='agile_carousel'
style='overflow: hidden; position: relative; width: " + carousel_outer_width +
"px; height: " + carousel_outer_height + "px;'></div>");
+ var ac_slides_container = $("<div class='slides'
style='width: " + slide_width * number_of_slides + "px; height: " +
slide_height + "px;'></div>");
+ ac_numbered_buttons = $("<div class='numbered_buttons_container
button_container'></div>");
+ ac_thumbnails = $("<div class='thumbnail_buttons_container
button_container'></div>");
+ ac_content_buttons = $("<div class='content_buttons_container
button_container'></div>");
+ obj.append(agile_carousel);
+ agile_carousel.append(ac_slides_container);
+ i = 1;
+ carousel_data.each(function() {
+ var thumbnail_button;
+ obj_inner = this;
+ if (obj_inner instanceof HTMLElement) {
+ content = $(obj_inner).hasClass(slide_class) ? obj_inner :
$("." + slide_class, obj_inner);
+ thumbnail_button = jQuery("." + thumbnail_button_class,
obj_inner);
+ content_button = jQuery("." + content_button_class,
obj_inner);
+ } else {
+ content = obj_inner.content;
+ thumbnail_button = obj_inner['thumbnail_button'];
+ content_button = obj_inner['content_button'];
+ }
+
+
+ ////////////////////////
+ // Slides
+ ////////////////////////
+
+
+ if ((content instanceof jQuery) ? content.size() > 0 : content) {
+ // render
+// var slide = $("<div class='slide_" + i +
" slide' style='height: " + slide_height + "px; width: " +
slide_width + "px;'></div>").append(content);
+ var slide = $(content).css({height:slide_height +
"px",width:slide_width + "px"}).addClass("slide_" +
i).addClass("slide");
+ ac_slides_container.append(slide);
+ } // if obj_inner.content
+
+
+ ////////////////////////
+ // Numbered Buttons
+ ////////////////////////
+ ac_numbered_buttons.append($("<div class='slide_number_"
+ i + " numbered_button slide_button " +
get_trigger_type("numbered_buttons") + "'
data-options='{\"button_type\":\"numbered_button\",\"button_action\":\"direct\",\"go_to\":"
+ i + ", \"trigger_type\":\"" + ac_trigger_type +
"\",\"disabled\": false}'>" + i +
"</div>"));
+
+
+ ////////////////////////
+ // Thumbnails
+ ////////////////////////
+ if ((thumbnail_button instanceof jQuery) ? thumbnail_button.size() > 0
: thumbnail_button) {
+
+ var thumb = $("<div class='slide_number_" + i +
" thumbnail_button slide_button " + get_trigger_type("thumbnails") +
"'
data-options='{\"button_type\":\"thumbnail_button\",\"button_action\":\"direct\",\"go_to\":"
+ i + ",\"trigger_type\": \"" + ac_trigger_type +
"\",\"disabled\": false}'></div>");
+ thumb.append(thumbnail_button);
+ ac_thumbnails.append(thumb);
+
+ } // if
+
+ ////////////////////////
+ // Content Button
+ ////////////////////////
+ if ((content_button instanceof jQuery) ? content_button.size() > 0 :
content_button) {
+ var holder = $("<div class='slide_number_" + i +
" content_button_" + i + " content_button slide_button " +
get_trigger_type("content_buttons") + "'
data-options='{\"button_type\":\"content_button\",\"button_action\":\"direct\",\"go_to\":"
+ i + ",\"trigger_type\": \"" + ac_trigger_type +
"\",\"disabled\": false}'><div
class='content_button_inner'></div></div>")
+ $(".content_button_inner", holder).append(content_button);
+ ac_content_buttons.append(holder);
+ }
+
+ i++;
+
+ }); // for
+ var create_control_set = function (set, set_number) {
+ var control_set = $("<div></div>");
+ if (set !== "") {
+ if (set_number) {
+ control_set = $("<div class='control_set_" +
set_number + " control_set'><div class='control_set_" + set_number
+ "_inner control_set_inner'></div></div>");
+ agile_carousel.append(control_set);
+ control_set = $(".control_set_inner", control_set);
+ }
+
+ var control_set_array = set.split(",");
+
+ for (j = 0; j < control_set_array.length; j++) {
+
+ // numbered_buttons
+ if (control_set_array[j] == "numbered_buttons") {
+ control_set.append(ac_numbered_buttons);
+ }
+
+ // group_numbered_buttons
+ if (control_set_array[j] == "group_numbered_buttons")
{
+ control_set.append(ac_group_numbered_buttons);
+ }
+
+ // thumbnails
+ if (control_set_array[j] == "thumbnails") {
+ control_set.append(ac_thumbnails);
+ }
+ // content_buttons
+ if (control_set_array[j] == "content_buttons") {
+ control_set.append(ac_content_buttons);
+ }
+ // pause_button
+ if (control_set_array[j] == "pause_button") {
+ control_set.append(ac_pause);
+ }
+ // previous_button
+ if (control_set_array[j] == "previous_button") {
+ control_set.append(ac_previous_button);
+ }
+ // previous_button
+ if (control_set_array[j] == "next_button") {
+ control_set.append(ac_next_button);
+ }
+ // hover_previous_button
+ if (control_set_array[j] == "hover_previous_button") {
+ control_set.append(ac_hover_previous_button);
+ }
+ // hover_next_button
+ if (control_set_array[j] == "hover_next_button") {
+ control_set.append(ac_hover_next_button);
+ }
+ // slide_count
+ if (control_set_array[j] == "slide_count") {
+ control_set.append(ac_slide_count);
+ }
+ // current_slide_number
+ if (control_set_array[j] == "current_slide_number") {
+ control_set.append(ac_current_slide_number);
+ }
+
+ } // for
+ if (!set_number) {
+ agile_carousel.append(control_set.children());
+ }
+
+
+ } // if
+ }; // function
+
+
+ if (options.control_set_1) {
+ create_control_set(control_set_1, 1);
+ } // if
+ if (options.control_set_2) {
+ create_control_set(control_set_2, 2);
+ } // if
+ if (options.control_set_3) {
+ create_control_set(control_set_3, 3);
+ } // if
+ if (options.control_set_4) {
+ create_control_set(control_set_4, 4);
+ } // if
+ if (options.control_set_5) {
+ create_control_set(control_set_5, 5);
+ } // if
+ if (options.no_control_set) {
+ create_control_set(no_control_set);
+ } // if
+ if (persistent_content) {
+ agile_carousel.append($(persistent_content));
+ }
+
+ var ac_slides = obj.find("." + slide_class);
+ var ac_slide_buttons = obj.find(".slide_button");
+ var ac_slide_buttons_length = ac_slide_buttons.length;
+
+
+ var ac_previous_buttons = obj.find(".previous_button,
.hover_previous_button");
+ var ac_previous_buttons_length = ac_previous_buttons.length;
+ var ac_next_buttons = obj.find(".next_button,
.hover_next_button");
+
+ // kludge - above variables not working in disable_buttons function -
disabled is undefined in disable_buttons function
+ var previous_button = obj.find(".previous_button");
+ var previous_button_length = previous_button.length;
+ var hover_previous_button = obj.find(".hover_previous_button");
+ var hover_previous_button_length = hover_previous_button.length;
+ var next_button = obj.find(".next_button");
+ var next_button_length = next_button.length;
+ var hover_next_button = obj.find(".hover_next_button");
+ var hover_next_button_length = hover_next_button.length;
+
+
+ function disable_buttons(slide_num) {
+
+ if (continuous_scrolling === false && number_slides_visible <
2) {
+
+ // if first slide
+ if (slide_num == 1) {
+ if (previous_button_length > 0) {
+ previous_button.addClass("ac_disabled");
+ previous_button.data("options").disabled = true;
+ } // if
+ // error
+ if (hover_previous_button_length > 0) {
+ hover_previous_button.addClass("ac_disabled");
+ hover_previous_button.data("options").disabled =
true;
+ } // if
+ } else {
+ if (previous_button_length > 0) {
+ previous_button.removeClass("ac_disabled");
+ previous_button.data("options").disabled = false;
+ } // if
+ if (hover_previous_button_length > 0) {
+ hover_previous_button.removeClass("ac_disabled");
+ hover_previous_button.data("options").disabled =
false;
+ } // if
+ }
+
+ // if last slide
+ if (slide_num == number_of_slides) {
+ if (next_button_length > 0) {
+ next_button.addClass("ac_disabled");
+ next_button.data("options").disabled = true;
+ } // if
+ if (hover_next_button_length > 0) {
+ hover_next_button.addClass("ac_disabled");
+ hover_next_button.data("options").disabled = true;
+ } // if
+ } else {
+ if (next_button_length > 0) {
+ next_button.removeClass("ac_disabled");
+ next_button.data("options").disabled = false;
+ } // if
+ if (hover_next_button_length > 0) {
+ hover_next_button.removeClass("ac_disabled");
+ hover_next_button.data("options").disabled =
false;
+ } // if
+ }
+
+ } // if
+
+ if (continuous_scrolling === false && number_slides_visible >
1) {
+
+ // if first slide
+ if (slide_num <= number_slides_visible) {
+ if (previous_button_length > 0) {
+ previous_button.addClass("ac_disabled");
+ previous_button.data("options").disabled = true;
+ } // if
+ if (hover_previous_button_length > 0) {
+ hover_previous_button.addClass("ac_disabled");
+ hover_previous_button.data("options").disabled =
true;
+ } // if
+ } else {
+ if (previous_button_length > 0) {
+ previous_button.removeClass("ac_disabled");
+ previous_button.data("options").disabled = false;
+ } // if
+ if (hover_previous_button_length > 0) {
+ hover_previous_button.removeClass("ac_disabled");
+ hover_previous_button.data("options").disabled =
false;
+ } // if
+ }
+
+ // if last slide
+ if (slide_num >= (number_of_slides - number_slides_visible +
slide_remainder)) {
+ if (next_button_length > 0) {
+ next_button.addClass("ac_disabled");
+ next_button.data("options").disabled = true;
+ } // if
+ if (hover_next_button_length > 0) {
+ hover_next_button.addClass("ac_disabled");
+ hover_next_button.data("options").disabled = true;
+ } // if
+ } else {
+ if (next_button_length > 0) {
+ next_button.removeClass("ac_disabled");
+ next_button.data("options").disabled = false;
+ } // if
+ if (hover_next_button_length > 0) {
+ hover_next_button.removeClass("ac_disabled");
+ hover_next_button.data("options").disabled =
false;
+ } // if
+ }
+
+ } // if
+
+ } // function
+
+ var current_slide_number_display =
obj.find(".current_slide_number");
+ var current_slide_number_display_length =
current_slide_number_display.length;
+
+ // update slide number
+
+ function update_current_slide_number(slide_num) {
+ if (current_slide_number_display_length > 0) {
+ current_slide_number_display.html(slide_num);
+ }
+ }
+
+ // add/remove class for buttons corresponding to selected slides
+
+
+ function add_selected_class(slide_num) {
+ obj.find(".ac_selected").removeClass("ac_selected");
+ obj.find(".slide_number_" +
slide_num).addClass("ac_selected");
+ }
+
+ // prepare carousel for number_slides_visible = 1
+ if (number_slides_visible == 1) {
+ ac_slides.eq(0).css({
+ "position": "absolute",
+ "top": 0,
+ "left": 0
+ });
+ ac_slides.slice(1, number_of_slides).css({
+ "position": "absolute",
+ "top": "-5000px",
+ "left": 0
+ });
+ ac_slides_container.css("width", slide_width +
"px");
+
+ }
+
+ // prepare carousel for number_slides_visible > 1
+ if (number_slides_visible > 1) {
+
+ agile_carousel.css("width", number_slides_visible * slide_width
+ "px");
+
+ var k = 0;
+
+ for (k = 1; k <= number_of_slides; k++) {
+
+ ac_slides.eq(k).css({
+ "position": "absolute",
+ "top": 0,
+ "left": slide_width * k + "px"
+
+ });
+ } // for
+ } // if
+
+ var fade_complete = function () {
+ current_slide.css({
+ "z-index": 10,
+ top: -5000
+ });
+ };
+
+ var slide_complete = function () {
+ current_slide.css({
+ "position": "absolute",
+ "top": "-5000px",
+ "left": 0
+ });
+ };
+
+
+ // prepare carousel for all
+ disable_buttons(1);
+ update_current_slide_number(1);
+ add_selected_class(1);
+
+ // if a hoveer transition button is hovered over for 1 seconds, then simulate
click
+ button_type = bd.button_type;
+ current_slide_number = 1;
+
+
+ var slide_number_conversion_array_last =
slide_number_conversion_array[slide_number_conversion_array.length - 1];
+
+ ///////////////////////////////
+ ///////////////////////////////
+ ///////// Transition Slides
+ ///////////////////////////////
+ ///////////////////////////////
+
+ function transition_slides(button_data) {
+
+ bd = $(button_data)[0];
+ var ac_disabled = bd.disabled;
+
+ if (ac_disabled !== true) {
+
+ button_type = bd.button_type;
+ trigger_type = bd.trigger_type;
+ button_action = bd.button_action;
+ var go_to = bd.go_to;
+ ac_disabled = bd.disabled;
+
+ if (next_slide_number !== false) {
+ current_slide_number = next_slide_number;
+ }
+
+
+ current_slide_index = current_slide_number - 1;
+ current_slide = $(ac_slides).eq(current_slide_index);
+
+
+ // calculate the next_slide_number
+ ///////////////////////////
+ ///////////////////////////
+ ////// One Slide Visible
+ ///////////////////////////
+ ///////////////////////////
+ if (number_slides_visible < 2) {
+ if (button_action == "next" &&
current_slide_number < number_of_slides) {
+ next_slide_number = current_slide_number + 1;
+ } else if (button_action == "next" &&
current_slide_number == number_of_slides) {
+ next_slide_number = 1;
+ }
+
+
+ // go back
+ if (button_action == "previous" &&
current_slide_number > 1) {
+ next_slide_number = current_slide_number - 1;
+
+ // go to last slide position
+ } else if (button_action == "previous" &&
current_slide_number == 1) {
+ next_slide_number = number_of_slides;
+ }
+
+ } // if
+ ///////////////////////////
+ ///////////////////////////
+ ////// Multiple Slides Visible
+ ///////////////////////////
+ ///////////////////////////
+ if (number_slides_visible > 1) {
+
+
+ if (button_action == "next" &&
current_slide_number < (number_of_slides - number_slides_visible + slide_remainder)) {
+
+ next_slide_number =
slide_number_conversion_array[Math.ceil(current_slide_number / number_slides_visible)];
+
+
+ } else if (button_action == "next" &&
current_slide_number >= (number_of_slides - number_slides_visible + slide_remainder)
&& number_slides_visible > 1) {
+ next_slide_number = 1;
+
+ }
+
+ // go back
+ if (button_action == "previous" &&
current_slide_number > number_slides_visible && number_slides_visible > 1)
{
+ var curr_lookup = Math.floor(current_slide_number /
number_slides_visible);
+ curr_lookup = curr_lookup - 1;
+ next_slide_number =
slide_number_conversion_array[curr_lookup];
+
+ // go to last slide position
+ } else if (button_action == "previous" &&
current_slide_number <= number_slides_visible && number_slides_visible > 1)
{
+ next_slide_number = slide_number_conversion_array_last;
+ }
+
+ } // if
+ if (button_action == "direct") {
+ next_slide_number = go_to;
+ }
+
+
+ next_slide_index = next_slide_number - 1;
+ next_slide = $(ac_slides).eq(next_slide_index);
+
+ add_selected_class(next_slide_number);
+ update_current_slide_number(next_slide_number);
+
+
+ if (next_slide_index != current_slide_index) {
+
+
+ /////////////////////////////////
+ /////////////////////////////////
+ ///// Sliding Transition - more than one slide visible
+ /////////////////////////////////
+ /////////////////////////////////
+ if (transition_type == "slide" &&
number_slides_visible > 1) {
+
+
+ ac_slides_container.stop().animate({
+ "left": ((next_slide_number * slide_width) -
slide_width) * -1 + "px"
+ }, {
+ duration: transition_time
+ });
+
+
+ } // if
+
+ /////////////////////////////////
+ /////////////////////////////////
+ ///// Sliding Transition - 1 slide visible
+ /////////////////////////////////
+ /////////////////////////////////
+ if (transition_type == "slide" &&
number_slides_visible == 1) {
+
+ // change slide position - go forward
+ var animate_current_slide_to = "";
+
+ if (button_action == "next" || (next_slide_number
> current_slide_number) && button_action == "direct") {
+ next_slide.css({
+ top: 0,
+ left: slide_width
+ });
+
+ animate_current_slide_to = slide_width * -1;
+
+ }
+
+ // change slide position - go back
+ if (button_action == "previous" ||
(next_slide_number < current_slide_number && button_action ==
"direct")) {
+ next_slide.css({
+ top: 0,
+ left: slide_width * -1
+ });
+
+ animate_current_slide_to = slide_width;
+ }
+
+ // animate slides
+
+
+ //,{ duration:300, complete: fade_complete}
+ current_slide.stop().animate({
+ "left": animate_current_slide_to +
"px"
+ }, {
+ duration: transition_time,
+ complete: slide_complete
+ });
+ next_slide.stop().animate({
+ "left": "0px"
+ }, {
+ duration: transition_time
+ });
+
+ } // if transition type is slide
+
+
+ /////////////////////////////////
+ /////////////////////////////////
+ ///// Fade Transition - 1 slide visible
+ /////////////////////////////////
+ /////////////////////////////////
+ if (transition_type == "fade" &&
number_slides_visible == 1) {
+
+ //if(trigger_type == "ac_hover"){
+ //ac_slides.stop();
+ //}
+ // change slide position
+ // rest of the slides
+ ac_slides.not(current_slide, next_slide).css({
+ "top": "-5000px",
+ "left": 0,
+ "z-index": 0,
+ "opacity": 0
+ });
+
+ // next slide
+ if (button_action) {
+ next_slide.css({
+ "top": 0,
+ "left": 0,
+ "z-index": 20
+ });
+
+ // current slide
+ current_slide.css({
+ "z-index": 10,
+ "opacity": 1
+ });
+
+
+ } // if
+ // animate slides
+ next_slide.stop().animate({
+ "opacity": 1
+ }, {
+ duration: transition_time,
+ complete: fade_complete
+ });
+
+
+ } // if transition type is slide
+ } // if current slide is not the next slide
+ } // if slide button is not disabled && transition complete
+
+ disable_buttons(next_slide_number);
+ add_selected_class(next_slide_number);
+
+ } // transition_slides;
+
+
+ /////////////////////
+ ///////// button behavior
+ ////////////////////
+
+
+ var agile_carousel_buttons_click = obj.find(".ac_click");
+ var agile_carousel_buttons_hover = obj.find(".ac_hover");
+
+ // start timer
+ if (timer !== 0) {
+ ac_timer = setInterval(timer_transition, timer);
+ }
+
+ var pause_button = obj.find(".pause_button");
+
+ function pause_slideshow() {
+
+ if (pause_button.length > 0) {
+ pause_button.html("play");
+ pause_button.data("options").paused = true;
+ pause_button.addClass("play_button");
+ }
+ clearInterval(ac_timer);
+ } // function
+
+
+ /////////////////
+ //////// click button
+ ////////////////
+
+ $(agile_carousel_buttons_click).click(function() {
+ pause_slideshow();
+ if (obj.find(':animated').length < 1) {
+ transition_slides($(this).data().options);
+ } else {
+ $this = $(this);
+ // don't use timer on next & previous buttons... causes
strage, infinite cycle
+ if ($this.data("options").button_action != "next"
&& $this.data("options").button_action != "previous") {
+ function check_transition() {
+
+ if (ac_slides_container.find(':animated').length <
1) {
+ transition_slides($this.data().options);
+ clearInterval($this.data("options").timeout);
+ } // if
+ } // function
+
+ t = setInterval(check_transition, 30);
+
+ $this.data("options").timeout = t;
+ }// if
+ } // else
+
+ }); // click
+
+
+ /////////////////
+ //////// hover button
+ ////////////////
+
+ $(agile_carousel_buttons_hover).hover(function() {
+ pause_slideshow();
+ if (ac_slides_container.find(':animated').length < 1) {
+ transition_slides($(this).data().options);
+
+ } else {
+ $this = $(this);
+
+ function check_transition() {
+
+ if (ac_slides_container.find(':animated').length < 1)
{
+ transition_slides($this.data().options);
+ clearInterval($this.data("options").timeout);
+ } // if
+ } // function
+
+ t = setInterval(check_transition, 30);
+
+ $this.data("options").timeout = t;
+
+ } // else
+
+ }, function() {
+ $this = $(this);
+ clearInterval($this.data("options").timeout);
+ });
+
+
+ ////////////////////////////
+ ////////////////////////////
+ //////// Timer
+ ////////////////////////////
+ ////////////////////////////
+
+
+ timer_data = {
+ "button_action": "next",
+ "button_type": "pause",
+ "disabled": false,
+ "trigger_type": "ac_click"
+ };
+
+
+ function timer_transition() {
+ transition_slides(timer_data);
+ }
+
+
+ function play_slideshow() {
+ clearInterval(ac_timer);
+ pause_button.html("pause");
+ pause_button.data("options").paused = false;
+ pause_button.addClass("pause_button");
+ pause_button.removeClass("play_button");
+ transition_slides(timer_data);
+ ac_timer = setInterval(timer_transition, timer);
+ return ac_timer;
+ } // function
+ // play/pause button behavior
+ pause_button.click(function () {
+ var $this = $(this);
+ if ($this.data("options").paused === true) {
+ play_slideshow();
+
+ } else if ($this.data("options").paused === false) {
+ pause_slideshow();
+ clearInterval(ac_timer);
+ }
+ }); // click
+
+ // hover previous and hover next buttons
+
+ $('.hover_previous_next_button').hover(function() {
+
$(this).find(".hover_previous_next_button_inner").stop().fadeTo("fast",
0.85);
+ },
+ // function
+ function() {
+
$(this).find(".hover_previous_next_button_inner").stop().fadeTo("fast",
0.00);
+ }); // hover
+
+ }); // each
+ }; // function
+})(jQuery);
\ No newline at end of file
Added:
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel.css
===================================================================
--- sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel.css
(rev 0)
+++
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel.css 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,331 @@
+/* general styles */
+
+/* reset styles */
+
+.agile_carousel img {
+ border: 0;
+}
+
+.agile_carousel p, .agile_carousel ul, .agile_carousel ul li {
+ margin: 0;
+ padding: 0;
+}
+
+/* agile carousel styles */
+
+/* -----------------------------------*/
+/*-- outer containers --*/
+/* -----------------------------------*/
+
+/*-- the most outer container rendered by JS
+Contains .slides .slide_content_... .persistent_content and controls that have
"no_control_set" --*/
+
+.agile_carousel {
+ position: relative;
+ overflow: hidden;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 11px;
+}
+
+/*-- container for all slides only --*/
+
+.agile_carousel .slides {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+
+/*-- individual slide --*/
+
+.agile_carousel .slide {
+ float: left;
+}
+
+/* -----------------------------------*/
+/*-- default style for controls --*/
+/* -----------------------------------*/
+
+/*-- default styles for all control sets --*/
+
+.agile_carousel .control_set {
+ position: absolute;
+ z-index: 4000;
+}
+
+/*-- default styles for all button containers --*/
+
+.agile_carousel .button_container {
+ z-index: 5000;
+}
+
+/*-- default style for controls whose trigger type is "hover" --*/
+
+.agile_carousel .ac_hover {
+ cursor: text;
+}
+
+/*-- default style for controls which are currently selected
+such as the current slide number --*/
+
+.agile_carousel .ac_selected {
+}
+
+/*-- default style for disabled controls
+"previous" and "next" controls may be disabled near the first/last
slide --*/
+
+.agile_carousel .ac_disabled {
+}
+
+/*-- style applied to all controls --*/
+
+.slide_button {
+ z-index: 5000;
+ cursor: pointer;
+ display: block;
+ background-position: 0 0;
+ background-repeat: no-repeat;
+ position: relative;
+}
+
+/*-- previous button --*/
+
+.previous_button {
+}
+
+/*-- next button --*/
+
+.next_button {
+}
+
+/*-- hover previous button --*/
+
+.hover_previous_button {
+}
+
+/*-- hover next button --*/
+
+.hover_next_button {
+}
+
+/*-- numbered buttons container --*/
+
+.agile_carousel .numbered_buttons_container {
+}
+
+/*-- numbered button --*/
+
+.agile_carousel .numbered_button {
+ float: left;
+}
+
+/*-- grouped numbered buttons container --*/
+
+.agile_carousel .grouped_numbered_buttons_container {
+}
+
+/*-- group numbered button --*/
+
+.agile_carousel .grouped_numbered_button {
+ float: left;
+}
+
+/*-- content buttons container --*/
+
+.agile_carousel .content_buttons_container {
+}
+
+/*-- content button --*/
+
+.agile_carousel .content_button {
+}
+
+/*-- thumbnail buttons container --*/
+
+.agile_carousel .thumbnail_buttons_container {
+}
+
+/*-- thumbnail button --*/
+
+.agile_carousel .thumbnail_button {
+}
+
+/* -------------------------------------------- */
+/*-- "things" that are not slides or controls --*/
+/* -------------------------------------------- */
+
+.current_slide_number {
+ cursor: text;
+}
+
+.slide_count {
+ cursor: text;
+}
+
+/* -------------------------------------------- */
+/*-- #basic_slideshow styles --*/
+/* -------------------------------------------- */
+
+/*-- hide the captions --*/
+#basic_slideshow .caption {
+ display: none;
+}
+
+/* -------------------------------------------- */
+/*-- .multiple_slides_visible styles --*/
+/* -------------------------------------------- */
+
+/*-- outer container --*/
+
+.multiple_slides_visible .agile_carousel {
+ overflow: hidden;
+ -moz-box-shadow: 0px 0px 4px #dfdfdf; /* FF3.5+ */
+ -webkit-box-shadow: 0px 0px 0px #dfdfdf; /* Saf3.0+, Chrome */
+ box-shadow: 0px 0px 4px #dfdfdf; /* Opera 10.5, IE9, Chrome 10+ */
+ background-color: #ededeb;
+}
+
+/*-- slide container --*/
+
+.multiple_slides_visible .slides {
+ margin-top: 28px;
+}
+
+/*-- individual slides --*/
+
+.multiple_slides_visible .slide_inner {
+ text-align: center;
+}
+
+.multiple_slides_visible .slide_inner {
+ overflow: hidden;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ border: 1px solid #cfcece;
+ background-color: #fff;
+ text-align: center;
+ width: 144px;
+ margin: 0 auto;
+}
+
+/*-- large photos --*/
+
+.multiple_slides_visible .photo_link {
+ width: 129px;
+ height: 137px;
+ overflow: hidden;
+ display: block;
+ margin: 8px auto 4px;
+}
+
+.multiple_slides_visible .photo {
+ height: 137px;
+}
+
+/*-- for the links beneath the photos --*/
+
+.multiple_slides_visible .caption:link, .multiple_slides_visible .caption:visited,
.multiple_slides_visible .caption:hover {
+ color: #333333;
+ text-decoration: none;
+ width: 128px;
+ display: block;
+ margin: 0 auto;
+ padding-bottom: 3px;
+}
+
+.multiple_slides_visible .caption:hover {
+ text-decoration: underline;
+}
+
+.multiple_slides_visible .persistent_content {
+ position: absolute;
+ top: 2px;
+ left: 12px;
+ font-size: 14px;
+ text-shadow: 0px 1px 1px #ccc;
+ color: #B5B5B5;
+}
+
+/*-- .control_set_1 - includes: .previous_next_button --*/
+
+.multiple_slides_visible .control_set_1 {
+ float: right;
+ position: relative;
+ margin: 4px 6px 0;
+}
+
+.multiple_slides_visible .previous_next_button {
+ width: 16px;
+ height: 16px;
+ overflow: hidden;
+ text-indent: 1000px;
+ background-image: url(#{resource['sprite_ac_normal.png']});
+ background-color: #ccc;
+ border: 1px solid #cfcece;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ background-color: #fff;
+ -moz-box-shadow: 0px 0px 2px #dfdfdf; /* FF3.5+ */
+ -webkit-box-shadow: 0px 0px 0px #dfdfdf; /* Saf3.0+, Chrome */
+ box-shadow: 0px 0px 2px #dfdfdf; /* Opera 10.5, IE9, Chrome 10+ */
+}
+
+.multiple_slides_visible .previous_button {
+ background-position: 4px 3px;
+}
+
+.multiple_slides_visible .next_button {
+ background-position: -44px 3px;
+}
+
+.multiple_slides_visible .previous_next_button:hover {
+ background-color: #f7f7f7;
+}
+
+.multiple_slides_visible .previous_button:hover {
+ background-image: url(#{resource['sprite_ac_hover.png']});
+}
+
+.multiple_slides_visible .next_button:hover {
+ background-image: url(#{resource['sprite_ac_hover.png']});
+}
+
+.multiple_slides_visible .control_set_1 .ac_disabled {
+ background-image: url(#{resource['sprite_ac_disabled.png']});
+}
+
+/*-- .control_set_2 - includes: group_numbered_buttons --*/
+
+.multiple_slides_visible .control_set_2 {
+ float: right;
+ position: relative;
+ margin: 8px 0 0 0;
+}
+
+.multiple_slides_visible .slide_button {
+ float: left;
+}
+
+.multiple_slides_visible .group_numbered_buttons_container {
+ float: left;
+ margin-right: 14px;
+}
+
+.multiple_slides_visible .group_numbered_button {
+ color: #000;
+ padding: 0 2px;
+ font-size: 12px;
+ margin-right: 2px;
+ background-image: url(#{resource['sprite_ac_normal.png']});
+ background-position: -95px 0;
+ width: 10px;
+ height: 10px;
+ overflow: hidden;
+ text-indent: 1000px;
+ background-color: transparent;
+}
+
+.multiple_slides_visible .group_numbered_button:hover, .multiple_slides_visible
.group_numbered_buttons_container .ac_selected {
+ background-image: url(#{resource['sprite_ac_hover.png']});
+}
\ No newline at end of file
Added:
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel_flavors.css
===================================================================
---
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel_flavors.css
(rev 0)
+++
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/agile_carousel_flavors.css 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,335 @@
+/* -------------------------------------------- */
+/*-- #flavor_1 styles --*/
+/* -------------------------------------------- */
+
+/*-- outer container --*/
+
+.flavor_1 .agile_carousel {
+ overflow: hidden;
+ -moz-box-shadow: 0px 0px 4px #dfdfdf; /* FF3.5+ */
+ -webkit-box-shadow: 0px 0px 0px #dfdfdf; /* Saf3.0+, Chrome */
+ box-shadow: 0px 0px 4px #dfdfdf; /* Opera 10.5, IE9, Chrome 10+ */
+}
+
+/*-- hide the captions --*/
+.flavor_1 .caption {
+ display: none;
+}
+
+/*-- .control_set_1 - includes: numbered_buttons --*/
+
+.flavor_1 .control_set_1 {
+ float: right;
+ position: relative;
+ margin: 6px 2px 0 0;
+}
+
+.flavor_1 .numbered_buttons_container {
+ float: left;
+}
+
+.flavor_1 .control_set_1 .slide_button {
+ float: left;
+}
+
+.flavor_1 .numbered_button {
+ color: #000;
+ padding: 2px 5px;
+ font-size: 12px;
+ margin-right: 4px;
+ background-color: #d9d9d9;
+ opacity: .6;
+}
+
+.flavor_1 .numbered_buttons_container .ac_selected, .flavor_1 .numbered_buttons_container
.numbered_button:hover {
+ color: #fff;
+ background-color: #666;
+ opacity: .9;
+}
+
+/*-- "no control set" - includes: .hover_previous_button, .hover_next_button
--*/
+
+.hover_previous_next_button {
+ position: absolute;
+ top: 30px;
+ width: 90px;
+ height: 150px;
+}
+
+.hover_previous_next_button .hover_previous_next_button_inner {
+ position: absolute;
+ top: 60px;
+ background-color: #d9d9d9;
+ opacity: 0.5;
+ width: 54px;
+ height: 35px;
+ display: block;
+ overflow: hidden;
+ text-indent: 1000px;
+ background-image: url(#{resource['sprite_ac_normal.png']});
+ background-repeat: no-repeat;
+}
+
+.hover_previous_button {
+ left: 0px;
+}
+
+.hover_next_button {
+ right: 0px;
+}
+
+.hover_previous_button .hover_previous_next_button_inner {
+ left: 0px;
+ -webkit-border-top-right-radius: 10px;
+ -webkit-border-bottom-right-radius: 10px;
+ -moz-border-radius-topright: 10px;
+ -moz-border-radius-bottomright: 10px;
+ border-top-right-radius: 10px;
+ border-bottom-right-radius: 10px;
+ background-position: -298px 8px;
+}
+
+.hover_next_button .hover_previous_next_button_inner {
+ right: 0px;
+ -webkit-border-top-left-radius: 10px;
+ -webkit-border-bottom-left-radius: 10px;
+ -moz-border-radius-topleft: 10px;
+ -moz-border-radius-bottomleft: 10px;
+ border-top-left-radius: 10px;
+ border-bottom-left-radius: 10px;
+ background-position: -351px 8px;
+}
+
+.flavor_1 .persistent_content {
+ top: 100px;
+ left: 10px;
+ color: #ccc;
+ position: absolute;
+ z-index: 5000;
+}
+
+/* -------------------------------------------- */
+/*-- .flavor_2 styles --*/
+/* -------------------------------------------- */
+
+/*-- outer container --*/
+
+.flavor_2 .agile_carousel {
+ overflow: hidden;
+ -moz-box-shadow: 0px 0px 4px #dfdfdf; /* FF3.5+ */
+ -webkit-box-shadow: 0px 0px 0px #dfdfdf; /* Saf3.0+, Chrome */
+ box-shadow: 0px 0px 4px #dfdfdf; /* Opera 10.5, IE9, Chrome 10+ */
+}
+
+/*-- hide the captions --*/
+.flavor_2 .caption {
+ display: none;
+}
+
+/*-- .control_set_1 - includes: numbered_buttons, .previous_next_button, .pause_button
--*/
+
+.flavor_2 .control_set_1 {
+ float: right;
+ position: relative;
+ margin: 6px 6px 0 0;
+ background-color: #d9d9d9;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+ opacity: 0.5;
+ padding: 2px 8px;
+}
+
+.flavor_2 .numbered_buttons_container {
+ float: left;
+ margin-right: 14px;
+}
+
+.flavor_2 .control_set_1 .slide_button {
+ float: left;
+}
+
+.flavor_2 .numbered_button {
+ color: #000;
+ padding: 0 2px;
+ font-size: 12px;
+ margin-right: 2px;
+}
+
+.flavor_2 .numbered_buttons_container .ac_selected, .flavor_2 .numbered_buttons_container
.numbered_button:hover {
+ color: #fff;
+ background-color: #666;
+}
+
+.agile_carousel .previous_next_button, .pause_button {
+ width: 10px;
+ height: 18px;
+ overflow: hidden;
+ text-indent: 1000px;
+ background-image: url(#{resource['sprite_ac_normal.png']});
+}
+
+.agile_carousel .previous_button {
+ background-position: 0 3px;
+}
+
+.agile_carousel .next_button {
+ background-position: -48px 3px;
+}
+
+.agile_carousel .pause_button {
+ background-position: -24px 3px;
+}
+
+.agile_carousel .control_set_1 .play_button {
+ background-position: -70px 3px;
+}
+
+.agile_carousel .previous_button, .flavor_2 .pause_button {
+ margin-right: 10px;
+}
+
+/*-- .control_set_2 - includes: .conent_button --*/
+
+.flavor_2 .control_set_2 {
+ left: 0;
+ bottom: 0;
+ width: 480px;
+ height: 112px;
+}
+
+.flavor_2 .content_button {
+ float: left;
+ width: 96px;
+ text-align: center;
+}
+
+.flavor_2 .content_buttons_container .ac_selected {
+ background-image: url(#{resource['sprite_ac_normal.png']});
+ background-position: -124px 0;
+}
+
+.flavor_2 .content_button_inner {
+ background-color: #f4f3f3;
+ height: 100px;
+ margin-top: 12px;
+ border-right: 1px solid #f4f3f3;
+ border-bottom: 1px solid #f4f3f3;
+ border-left: 1px solid #f4f3f3;
+}
+
+.flavor_2 .ac_selected .content_button_inner {
+ background-color: #dfdddd;
+ border-right: 1px solid #acabab;
+ border-bottom: 1px solid #acabab;
+ border-left: 1px solid #acabab;
+ height: 99px;
+ width: 94px;
+}
+
+.flavor_2 .content_button p {
+ margin-top: 4px;
+ width: auto;
+ line-height: 15px;
+}
+
+.flavor_2 .content_button_inner:hover {
+ background-color: #dfdddd;
+}
+
+.flavor_2 .content_button img {
+ border: 4px solid #fff;
+ margin: 7px auto 0 auto;
+ -moz-box-shadow: 1px 1px 1px #bcbbbb; /* FF3.5+ */
+ -webkit-box-shadow: 1px 1px 1px #bcbbbb; /* Saf3.0+, Chrome */
+ box-shadow: 1px 1px 1px #bcbbbb; /* Opera 10.5, IE9, Chrome 10+ */
+}
+
+.flavor_2 .persistent_content {
+ top: 100px;
+ left: 10px;
+ color: #ccc;
+ position: absolute;
+ z-index: 5000;
+}
+
+/* -------------------------------------------- */
+/*-- .flavor_3 styles --*/
+/* -------------------------------------------- */
+
+/*-- outer container --*/
+
+.flavor_3 .agile_carousel {
+ overflow: hidden;
+ -moz-box-shadow: 0px 0px 4px #dfdfdf; /* FF3.5+ */
+ -webkit-box-shadow: 0px 0px 0px #dfdfdf; /* Saf3.0+, Chrome */
+ box-shadow: 0px 0px 4px #dfdfdf; /* Opera 10.5, IE9, Chrome 10+ */
+}
+
+/*-- hide the captions --*/
+.flavor_3 .caption {
+ display: none;
+}
+
+/*-- .control_set_1 - includes: content_buttons --*/
+
+.flavor_3 .control_set_1 {
+ position: absolute;
+ right: 0;
+ top: 0;
+ width: 208px;
+ height: 224px;
+ color: #fff;
+}
+
+.flavor_3 .content_button {
+ width: 208px;
+ height: 44px;
+}
+
+.flavor_3 .content_button_inner p {
+ float: left;
+}
+
+.flavor_3 .content_buttons_container .ac_selected {
+ background-image: url(#{resource['sprite_ac_normal.png']});
+ background-position: -244px 0;
+}
+
+.flavor_3 .content_button p {
+ opacity: 1;
+ vertical-align: auto;
+ float: left;
+ padding-right: 5px;
+ width: 138px;
+}
+
+.flavor_3 .content_button_inner {
+ background-color: #333;
+ width: 189px;
+ height: 43px;
+ border-bottom: 1px solid #000;
+ opacity: 0.8;
+ float: right;
+}
+
+.flavor_3 .ac_selected .content_button_inner, .flavor_3 .ac_selected
.content_button_inner:hover {
+ opacity: 0.95;
+}
+
+.flavor_3 .content_button_inner:hover {
+ opacity: 0.9;
+}
+
+.flavor_3 .content_button img {
+ opacity: 1;
+}
+
+.flavor_3 .content_button .thumb {
+ width: 37px;
+ height: 37px;
+ overflow: hidden;
+ float: left;
+ border: 1px solid #000;
+ margin: 3px 3px 0 3px;
+}
\ No newline at end of file
Added:
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/richfaces.carousel.js
===================================================================
---
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/richfaces.carousel.js
(rev 0)
+++
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/richfaces.carousel.js 2011-12-17
13:20:29 UTC (rev 23093)
@@ -0,0 +1,82 @@
+(function ($, rf) {
+
+
+ /**
+ * Copies attributes from one objects to other object, but
+ * can change the name of target attributes.
+ */
+ function extend(target, source, translation) {
+ for (var attr in source) {
+ var targetAttr = translation[attr] != null ? translation[attr] : attr;
+ target[targetAttr] = source[attr];
+ if (attr != 'stack' && target[targetAttr] instanceof Object)
{
+ target[targetAttr] = extend({}, target[targetAttr], translation);
+ }
+ }
+ return target;
+ }
+
+ // Create (for example) ui container for our component class
+ rf.ui = rf.ui || {};
+ // Default options definition if needed for the component
+ // var defaultOptions = {};
+ // Extending component class with new properties and methods using extendClass
+ // $super - reference to the parent prototype, will be available inside those
methods
+ rf.ui.Carousel = rf.BaseComponent.extendClass({
+ // class name
+ name:"Carousel",
+ init: function (componentId, options) {
+ if (!document.getElementById(componentId)) {
+ throw "No element with id '" + componentId + "'
found.";
+ }
+ this.options = options;
+ // call constructor of parent class if needed
+ $super.constructor.call(this, componentId);
+ // attach component object to DOM element for
+ // future cleaning and for client side API calls
+ this.attachToDom(this.id);
+ // ...
+ /**
+ * Message bundle & event handlers setup.
+ */
+ options = extend({
+ slide_class:"rf-crl-sl",
+ content_button_class:"rf-crl-cbtn",
+ thumbnail_button_class:"rf-crl-thbtn",
+ transition_time:300,
+ transition_type:"slide",
+
carousel_data:jQuery(".rf-crl-sl",document.getElementById(componentId)),
+ timer:4000
+ }, options, {
+ width:"carousel_outer_width",
+ height:"carousel_outer_height",
+ slideWidth:"slide_width",
+ slideHeight:"slide_height",
+ continuousScrolling:"continuous_scrolling",
+ changeOnHover:"change_on_hover",
+ visibleSlides:"number_slides_visible",
+ transitionType:"transition_type",
+ transitionTime:"transition_time",
+ interval:"timer",
+ contentButtonClass:"content_button_class"
+ });
+ var _this = this;
+ jQuery(function() {
+ _this.delegate =
$(document.getElementById(componentId)).agile_carousel(options);
+ });
+ },
+ // private functions definition
+ __getDelegate : function() {
+ return this.delegate;
+ },
+ // destructor definition
+ destroy: function () {
+ // define destructor if additional cleaning is needed but
+ // in most cases its not nessesary.
+ // call parent’s destructor
+ $super.destroy.call(this);
+ }
+ });
+ // define super class reference - reference to the parent prototype
+ var $super = rf.ui.Carousel.$super;
+})(jQuery, RichFaces);
\ No newline at end of file
Added:
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/sprite_ac_disabled.png
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/sprite_ac_disabled.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/sprite_ac_hover.png
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/sprite_ac_hover.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/sprite_ac_normal.png
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/carousel/ui/src/main/resources/META-INF/resources/sprite_ac_normal.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream