Author: blabno
Date: 2011-05-31 05:44:53 -0400 (Tue, 31 May 2011)
New Revision: 22516
Added:
sandbox/trunk/ui/lightbox/
sandbox/trunk/ui/lightbox/bom/
sandbox/trunk/ui/lightbox/bom/pom.xml
sandbox/trunk/ui/lightbox/demo/
sandbox/trunk/ui/lightbox/demo/pom.xml
sandbox/trunk/ui/lightbox/demo/src/
sandbox/trunk/ui/lightbox/demo/src/main/
sandbox/trunk/ui/lightbox/demo/src/main/java/
sandbox/trunk/ui/lightbox/demo/src/main/java/org/
sandbox/trunk/ui/lightbox/demo/src/main/java/org/richfaces/
sandbox/trunk/ui/lightbox/demo/src/main/java/org/richfaces/sandbox/
sandbox/trunk/ui/lightbox/demo/src/main/java/org/richfaces/sandbox/lightbox/
sandbox/trunk/ui/lightbox/demo/src/main/java/org/richfaces/sandbox/lightbox/ConfigBean.java
sandbox/trunk/ui/lightbox/demo/src/main/resources/
sandbox/trunk/ui/lightbox/demo/src/main/webapp/
sandbox/trunk/ui/lightbox/demo/src/main/webapp/META-INF/
sandbox/trunk/ui/lightbox/demo/src/main/webapp/WEB-INF/
sandbox/trunk/ui/lightbox/demo/src/main/webapp/WEB-INF/faces-config.xml
sandbox/trunk/ui/lightbox/demo/src/main/webapp/WEB-INF/web.xml
sandbox/trunk/ui/lightbox/demo/src/main/webapp/index.jsp
sandbox/trunk/ui/lightbox/demo/src/main/webapp/menu.xhtml
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image1.jpg
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image2.jpg
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image3.jpg
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image4.jpg
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image5.jpg
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image1.jpg
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image2.jpg
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image3.jpg
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image4.jpg
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image5.jpg
sandbox/trunk/ui/lightbox/demo/src/main/webapp/sample_1.xhtml
sandbox/trunk/ui/lightbox/demo/src/test/
sandbox/trunk/ui/lightbox/demo/src/test/java/
sandbox/trunk/ui/lightbox/parent/
sandbox/trunk/ui/lightbox/parent/pom.xml
sandbox/trunk/ui/lightbox/pom.xml
sandbox/trunk/ui/lightbox/ui/
sandbox/trunk/ui/lightbox/ui/pom.xml
sandbox/trunk/ui/lightbox/ui/src/
sandbox/trunk/ui/lightbox/ui/src/main/
sandbox/trunk/ui/lightbox/ui/src/main/java/
sandbox/trunk/ui/lightbox/ui/src/main/java/org/
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/component/
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/component/AbstractLightbox.java
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/component/package-info.java
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/renderkit/
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/renderkit/html/
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/renderkit/html/LightboxRenderer.java
sandbox/trunk/ui/lightbox/ui/src/main/resources/
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/jquery.lightbox.css
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/jquery.lightbox.js
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-blank.gif
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-btn-close.gif
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-btn-next.gif
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-btn-prev.gif
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-ico-loading.gif
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/richfaces.lightbox.js
sandbox/trunk/ui/lightbox/ui/src/test/
sandbox/trunk/ui/lightbox/ui/src/test/java/
sandbox/trunk/ui/lightbox/ui/src/test/resources/
Log:
Migrated lightbox component to 4.X.
Property changes on: sandbox/trunk/ui/lightbox
___________________________________________________________________
Added: svn:ignore
+ *.iml
*.ipr
*.iws
Property changes on: sandbox/trunk/ui/lightbox/bom
___________________________________________________________________
Added: svn:ignore
+ *.iml
Added: sandbox/trunk/ui/lightbox/bom/pom.xml
===================================================================
--- sandbox/trunk/ui/lightbox/bom/pom.xml (rev 0)
+++ sandbox/trunk/ui/lightbox/bom/pom.xml 2011-05-31 09:44:53 UTC (rev 22516)
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.lightbox</groupId>
+ <artifactId>lightbox-bom</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <name>Richfaces UI Components: lightbox 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>lightbox-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/lightbox/demo
___________________________________________________________________
Added: svn:ignore
+ *.iml
Added: sandbox/trunk/ui/lightbox/demo/pom.xml
===================================================================
--- sandbox/trunk/ui/lightbox/demo/pom.xml (rev 0)
+++ sandbox/trunk/ui/lightbox/demo/pom.xml 2011-05-31 09:44:53 UTC (rev 22516)
@@ -0,0 +1,62 @@
+<?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.lightbox</groupId>
+ <artifactId>lightbox-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>lightbox-demo</artifactId>
+ <name>Richfaces UI Components: lightbox demo</name>
+ <packaging>war</packaging>
+ <build>
+ <finalName>lightbox-demo</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </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.lightbox</groupId>
+ <artifactId>lightbox-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/lightbox/demo/src/main/java/org/richfaces/sandbox/lightbox/ConfigBean.java
===================================================================
---
sandbox/trunk/ui/lightbox/demo/src/main/java/org/richfaces/sandbox/lightbox/ConfigBean.java
(rev 0)
+++
sandbox/trunk/ui/lightbox/demo/src/main/java/org/richfaces/sandbox/lightbox/ConfigBean.java 2011-05-31
09:44:53 UTC (rev 22516)
@@ -0,0 +1,156 @@
+package org.richfaces.sandbox.lightbox;
+
+import java.io.Serializable;
+
+public class ConfigBean implements Serializable {
+
+ private String overlayBgColor = "#000";
+
+ private double overlayOpacity = .8;
+
+ private int containerBorderSize = 10;
+
+ private int containerResizeSpeed = 400;
+
+ private boolean fixedNavigation = false;
+
+ private String keyToClose = "c";
+
+ private String keyToNext = "n";
+
+ private String keyToPrev = "p";
+
+ private String txtImage = "Image";
+
+ private String txtOf = "of";
+
+ private String imageBlank;
+
+ private String imageBtnClose;
+
+ private String imageBtnNext;
+
+ private String imageBtnPrev;
+
+ private String imageLoading;
+
+ public String getOverlayBgColor() {
+ return overlayBgColor;
+ }
+
+ public void setOverlayBgColor(String overlayBgColor) {
+ this.overlayBgColor = overlayBgColor;
+ }
+
+ public double getOverlayOpacity() {
+ return overlayOpacity;
+ }
+
+ public void setOverlayOpacity(double overlayOpacity) {
+ this.overlayOpacity = overlayOpacity;
+ }
+
+ public int getContainerBorderSize() {
+ return containerBorderSize;
+ }
+
+ public void setContainerBorderSize(int containerBorderSize) {
+ this.containerBorderSize = containerBorderSize;
+ }
+
+ public int getContainerResizeSpeed() {
+ return containerResizeSpeed;
+ }
+
+ public void setContainerResizeSpeed(int containerResizeSpeed) {
+ this.containerResizeSpeed = containerResizeSpeed;
+ }
+
+ public boolean isFixedNavigation() {
+ return fixedNavigation;
+ }
+
+ public void setFixedNavigation(boolean fixedNavigation) {
+ this.fixedNavigation = fixedNavigation;
+ }
+
+ public String getKeyToClose() {
+ return keyToClose;
+ }
+
+ public void setKeyToClose(String keyToClose) {
+ this.keyToClose = keyToClose;
+ }
+
+ public String getKeyToNext() {
+ return keyToNext;
+ }
+
+ public void setKeyToNext(String keyToNext) {
+ this.keyToNext = keyToNext;
+ }
+
+ public String getKeyToPrev() {
+ return keyToPrev;
+ }
+
+ public void setKeyToPrev(String keyToPrev) {
+ this.keyToPrev = keyToPrev;
+ }
+
+ public String getTxtImage() {
+ return txtImage;
+ }
+
+ public void setTxtImage(String txtImage) {
+ this.txtImage = txtImage;
+ }
+
+ public String getTxtOf() {
+ return txtOf;
+ }
+
+ public void setTxtOf(String txtOf) {
+ this.txtOf = txtOf;
+ }
+
+ public void setImageBlank(String imageBlank) {
+ this.imageBlank = imageBlank;
+ }
+
+ public String getImageBlank() {
+ return imageBlank;
+ }
+
+ public void setImageBtnClose(String imageBtnClose) {
+ this.imageBtnClose = imageBtnClose;
+ }
+
+ public String getImageBtnClose() {
+ return imageBtnClose;
+ }
+
+ public void setImageBtnNext(String imageBtnNext) {
+ this.imageBtnNext = imageBtnNext;
+ }
+
+ public String getImageBtnNext() {
+ return imageBtnNext;
+ }
+
+ public void setImageBtnPrev(String imageBtnPrev) {
+ this.imageBtnPrev = imageBtnPrev;
+ }
+
+ public String getImageBtnPrev() {
+ return imageBtnPrev;
+ }
+
+ public void setImageLoading(String imageLoading) {
+ this.imageLoading = imageLoading;
+ }
+
+ public String getImageLoading() {
+ return imageLoading;
+ }
+}
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- sandbox/trunk/ui/lightbox/demo/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++ sandbox/trunk/ui/lightbox/demo/src/main/webapp/WEB-INF/faces-config.xml 2011-05-31
09:44:53 UTC (rev 22516)
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
version="2.0">
+ <managed-bean>
+ <managed-bean-name>config</managed-bean-name>
+
<managed-bean-class>org.richfaces.sandbox.lightbox.ConfigBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+</faces-config>
\ No newline at end of file
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- sandbox/trunk/ui/lightbox/demo/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ sandbox/trunk/ui/lightbox/demo/src/main/webapp/WEB-INF/web.xml 2011-05-31 09:44:53 UTC
(rev 22516)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>Lightbox demo</display-name>
+ <context-param>
+ <param-name>com.sun.faces.allowTextChildren</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <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/lightbox/demo/src/main/webapp/index.jsp
===================================================================
--- sandbox/trunk/ui/lightbox/demo/src/main/webapp/index.jsp (rev
0)
+++ sandbox/trunk/ui/lightbox/demo/src/main/webapp/index.jsp 2011-05-31 09:44:53 UTC (rev
22516)
@@ -0,0 +1,7 @@
+<!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/lightbox/demo/src/main/webapp/menu.xhtml
===================================================================
--- sandbox/trunk/ui/lightbox/demo/src/main/webapp/menu.xhtml (rev
0)
+++ sandbox/trunk/ui/lightbox/demo/src/main/webapp/menu.xhtml 2011-05-31 09:44:53 UTC (rev
22516)
@@ -0,0 +1,8 @@
+<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">
+ <div>
+ <ul>
+ <!--<li><h:outputLink
value="#{facesContext.externalContext.requestContextPath}/sample_1.jsf">Example
1</h:outputLink></li>-->
+ </ul>
+ </div>
+</ui:component>
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image1.jpg
===================================================================
(Binary files differ)
Property changes on: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image1.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image2.jpg
===================================================================
(Binary files differ)
Property changes on: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image2.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image3.jpg
===================================================================
(Binary files differ)
Property changes on: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image3.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image4.jpg
===================================================================
(Binary files differ)
Property changes on: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image4.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image5.jpg
===================================================================
(Binary files differ)
Property changes on: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/image5.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image1.jpg
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image1.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image2.jpg
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image2.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image3.jpg
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image3.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image4.jpg
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image4.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image5.jpg
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/lightbox/demo/src/main/webapp/photos/thumb_image5.jpg
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: sandbox/trunk/ui/lightbox/demo/src/main/webapp/sample_1.xhtml
===================================================================
--- sandbox/trunk/ui/lightbox/demo/src/main/webapp/sample_1.xhtml
(rev 0)
+++ sandbox/trunk/ui/lightbox/demo/src/main/webapp/sample_1.xhtml 2011-05-31 09:44:53 UTC
(rev 22516)
@@ -0,0 +1,143 @@
+<!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:lightbox="http://richfaces.org/sandbox/lightbox">
+<h:head>
+ <title>Lightbox sample</title>
+ <style type="text/css">
+ #gallery ul {
+ list-style: none outside none;
+ }
+
+ #gallery ul li {
+ display: inline;
+ }
+
+ #gallery ul img {
+ border: 5px solid #3E3E3E;
+ border-bottom-width: 20px;
+ }
+
+ #gallery ul a:hover img {
+ border: 5px solid #000;
+ border-bottom-width: 20px;
+ color: #FFFFFF;
+ }
+
+ #gallery ul a:hover {
+ color: #FFFFFF;
+ }
+
+ </style>
+</h:head>
+
+<h:body>
+ <ui:include src="menu.xhtml"/>
+
+ <div id="gallery">
+ <ul>
+ <li>
+ <a href="photos/image1.jpg" title="Blue
flower">
+ <h:graphicImage value="photos/thumb_image1.jpg"/>
+ </a>
+ </li>
+ <li>
+ <a href="photos/image2.jpg" title="Red leafs">
+ <h:graphicImage value="photos/thumb_image2.jpg"/>
+ </a>
+ </li>
+ <li>
+ <a href="photos/image3.jpg" title="Rain
drops">
+ <h:graphicImage value="photos/thumb_image3.jpg"/>
+ </a>
+ </li>
+ <li>
+ <a href="photos/image4.jpg" title="Fresh
green">
+ <h:graphicImage value="photos/thumb_image4.jpg"/>
+ </a>
+ </li>
+ <li>
+ <a href="photos/image5.jpg" title="More fresh
green">
+ <h:graphicImage value="photos/thumb_image5.jpg"/>
+ </a>
+ </li>
+ </ul>
+ </div>
+
+
+ <lightbox:lightbox id="lightbox" selector="#gallery a"
containerBorderSize="#{config.containerBorderSize}"
+ containerResizeSpeed="#{config.containerResizeSpeed}"
keyToClose="#{config.keyToClose}" keyToNext="#{config.keyToNext}"
+ keyToPrev="#{config.keyToPrev}"
overlayBgColor="#{config.overlayBgColor}"
overlayOpacity="#{config.overlayOpacity}"
+ txtImage="#{config.txtImage}"
txtOf="#{config.txtOf}" imageBlank="#{config.imageBlank}"
imageBtnClose="#{config.imageBtnClose}"
+ imageBtnNext="#{config.imageBtnNext}"
imageBtnPrev="#{config.imageBtnPrev}"
imageLoading="#{config.imageLoading}"/>
+
+
+ <h:form id="lightboxForm">
+
+
+ <h:panelGrid columns="3">
+ <h:outputLabel value="containerBorderSize"
for="containerBorderSize"/>
+ <h:inputText id="containerBorderSize"
value="#{config.containerBorderSize}"/>
+ <h:message for="containerBorderSize"/>
+
+ <h:outputLabel value="containerResizeSpeed"
for="containerResizeSpeed"/>
+ <h:inputText id="containerResizeSpeed"
value="#{config.containerResizeSpeed}"/>
+ <h:message for="containerResizeSpeed"/>
+
+ <h:outputLabel value="keyToClose"
for="keyToClose"/>
+ <h:inputText id="keyToClose"
value="#{config.keyToClose}"/>
+ <h:message for="keyToClose"/>
+
+ <h:outputLabel value="keyToNext" for="keyToNext"/>
+ <h:inputText id="keyToNext"
value="#{config.keyToNext}"/>
+ <h:message for="keyToNext"/>
+
+ <h:outputLabel value="" for="keyToPrev"/>
+ <h:inputText id="keyToPrev"
value="#{config.keyToPrev}"/>
+ <h:message for="keyToPrev"/>
+
+ <h:outputLabel value="overlayBgColor"
for="overlayBgColor"/>
+ <h:inputText id="overlayBgColor"
value="#{config.overlayBgColor}"/>
+ <h:message for="overlayBgColor"/>
+
+ <h:outputLabel value="overlayOpacity"
for="overlayOpacity"/>
+ <h:inputText id="overlayOpacity"
value="#{config.overlayOpacity}"/>
+ <h:message for="overlayOpacity"/>
+
+ <h:outputLabel value="txtImage" for="txtImage"/>
+ <h:inputText id="txtImage"
value="#{config.txtImage}"/>
+ <h:message for="txtImage"/>
+
+ <h:outputLabel value="txtOf" for="txtOf"/>
+ <h:inputText id="txtOf" value="#{config.txtOf}"/>
+ <h:message for="txtOf"/>
+
+ <h:outputLabel value="imageBlank"
for="imageBlank"/>
+ <h:inputText id="imageBlank"
value="#{config.imageBlank}"/>
+ <h:message for="imageBlank"/>
+
+ <h:outputLabel value="imageBtnClose"
for="imageBtnClose"/>
+ <h:inputText id="imageBtnClose"
value="#{config.imageBtnClose}"/>
+ <h:message for="imageBtnClose"/>
+
+ <h:outputLabel value="imageBtnNext"
for="imageBtnNext"/>
+ <h:inputText id="imageBtnNext"
value="#{config.imageBtnNext}"/>
+ <h:message for="imageBtnNext"/>
+
+ <h:outputLabel value="imageBtnPrev"
for="imageBtnPrev"/>
+ <h:inputText id="imageBtnPrev"
value="#{config.imageBtnPrev}"/>
+ <h:message for="imageBtnPrev"/>
+
+ <h:outputLabel value="imageLoading"
for="imageLoading"/>
+ <h:inputText id="imageLoading"
value="#{config.imageLoading}"/>
+ <h:message for="imageLoading"/>
+
+ <a4j:commandButton value="Submit"
reRender="lightbox,lightboxForm"/>
+ </h:panelGrid>
+ </h:form>
+
+ <!--<rich:insert src="sample_1.xhtml"
highlight="html"/>-->
+
+</h:body>
+</html>
Property changes on: sandbox/trunk/ui/lightbox/parent
___________________________________________________________________
Added: svn:ignore
+ *.iml
Added: sandbox/trunk/ui/lightbox/parent/pom.xml
===================================================================
--- sandbox/trunk/ui/lightbox/parent/pom.xml (rev 0)
+++ sandbox/trunk/ui/lightbox/parent/pom.xml 2011-05-31 09:44:53 UTC (rev 22516)
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ JBoss, Home of Professional Open Source Copyright 2010, 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.lightbox</groupId>
+ <artifactId>lightbox-parent</artifactId>
+ <name>Richfaces UI Components: lightbox 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.lightbox</groupId>
+ <artifactId>lightbox-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/lightbox/pom.xml
===================================================================
--- sandbox/trunk/ui/lightbox/pom.xml (rev 0)
+++ sandbox/trunk/ui/lightbox/pom.xml 2011-05-31 09:44:53 UTC (rev 22516)
@@ -0,0 +1,81 @@
+<?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.lightbox</groupId>
+ <artifactId>lightbox-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <relativePath>parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>lightbox-aggregator</artifactId>
+ <packaging>pom</packaging>
+ <name>Richfaces UI Components: lightbox 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>lightbox-ui clean install</ui>
+ <demo>lightbox-demo clean package</demo>
+ </userAliases>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <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>
+
+ <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/lightbox/ui
___________________________________________________________________
Added: svn:ignore
+ *.iml
Added: sandbox/trunk/ui/lightbox/ui/pom.xml
===================================================================
--- sandbox/trunk/ui/lightbox/ui/pom.xml (rev 0)
+++ sandbox/trunk/ui/lightbox/ui/pom.xml 2011-05-31 09:44:53 UTC (rev 22516)
@@ -0,0 +1,57 @@
+<?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.lightbox</groupId>
+ <artifactId>lightbox-parent</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+ <artifactId>lightbox-ui</artifactId>
+ <name>Richfaces UI Components: lightbox 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.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>
+
+</project>
Added:
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/component/AbstractLightbox.java
===================================================================
---
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/component/AbstractLightbox.java
(rev 0)
+++
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/component/AbstractLightbox.java 2011-05-31
09:44:53 UTC (rev 22516)
@@ -0,0 +1,90 @@
+package org.richfaces.component;
+
+import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.cdk.annotations.JsfComponent;
+import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
+import org.richfaces.renderkit.html.LightboxRenderer;
+
+import javax.faces.component.UIComponentBase;
+
+@JsfComponent(tag = @Tag(name = "lightbox", type = TagType.Facelets),
+ renderer = @JsfRenderer(family = AbstractLightbox.COMPONENT_FAMILY, type =
LightboxRenderer.RENDERER_TYPE),
+ attributes = {"core-props.xml"}
+)
+public abstract class AbstractLightbox extends UIComponentBase {
+
+ public static final String COMPONENT_TYPE = "org.richfaces.Lightbox";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.Lightbox";
+
+ public static final int DEFAULT_CONTAINER_BORDER_SIZE = 10;
+
+ public static final int DEFAULT_CONTAINER_RESIZE_SPEED = 400;
+
+ public static final boolean DEFAULT_FIXED_NAVIGATION = false;
+
+ public static final String DEFAULT_KEY_TO_CLOSE = "c";
+
+ public static final String DEFAULT_KEY_TO_NEXT = "n";
+
+ public static final String DEFAULT_KEY_TO_PREV = "p";
+
+ public static final String DEFAULT_TXT_IMAGE = "Image";
+
+ public static final String DEFAULT_TXT_OF = "of";
+
+ public static final String DEFAULT_OVERLAY_BG_COLOR = "#000";
+
+ public static final double DEFAULT_OVERLAY_OPACITY = .8;
+
+ @Attribute(required = true)
+ public abstract String getSelector();
+
+ @Attribute
+ public abstract String getOverlayBgColor();
+
+ @Attribute
+ public abstract Double getOverlayOpacity();
+
+ @Attribute
+ public abstract Boolean isFixedNavigation();
+
+ @Attribute
+ public abstract Integer getContainerBorderSize();
+
+ @Attribute
+ public abstract Integer getContainerResizeSpeed();
+
+ @Attribute
+ public abstract String getTxtImage();
+
+ @Attribute
+ public abstract String getTxtOf();
+
+ @Attribute
+ public abstract String getKeyToClose();
+
+ @Attribute
+ public abstract String getKeyToPrev();
+
+ @Attribute
+ public abstract String getKeyToNext();
+
+ @Attribute
+ public abstract String getImageBlank();
+
+ @Attribute
+ public abstract String getImageLoading();
+
+ @Attribute
+ public abstract String getImageBtnNext();
+
+ @Attribute
+ public abstract String getImageBtnPrev();
+
+ @Attribute
+ public abstract String getImageBtnClose();
+
+}
Added:
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/component/package-info.java
===================================================================
--- sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/component/package-info.java
(rev 0)
+++
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/component/package-info.java 2011-05-31
09:44:53 UTC (rev 22516)
@@ -0,0 +1,4 @@
+@TagLibrary(uri = "http://richfaces.org/sandbox/lightbox", shortName =
"lightbox", prefix = "lightbox", displayName = "Lightbox
component") package org.richfaces.component;
+
+import org.richfaces.cdk.annotations.TagLibrary;
+
Added:
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/renderkit/html/LightboxRenderer.java
===================================================================
---
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/renderkit/html/LightboxRenderer.java
(rev 0)
+++
sandbox/trunk/ui/lightbox/ui/src/main/java/org/richfaces/renderkit/html/LightboxRenderer.java 2011-05-31
09:44:53 UTC (rev 22516)
@@ -0,0 +1,98 @@
+package org.richfaces.renderkit.html;
+
+import org.ajax4jsf.javascript.JSFunction;
+import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.component.AbstractLightbox;
+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.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+@JsfRenderer(family = AbstractLightbox.COMPONENT_FAMILY, type =
LightboxRenderer.RENDERER_TYPE)
+@ResourceDependencies({
+ @ResourceDependency(name = "base-component.reslib", library =
"org.richfaces", target = "head"),
+ @ResourceDependency(name = "jquery.lightbox.js", target =
"head"),
+ @ResourceDependency(name = "richfaces.lightbox.js", target =
"head"),
+ @ResourceDependency(name = "jquery.lightbox.css", target =
"head")
+})
+public class LightboxRenderer extends RendererBase {
+
+ public static final String RENDERER_TYPE = "org.richfaces.Lightbox";
+
+ private static final Map<String, Object> DEFAULTS;
+
+ /**
+ * Following defaults are be used by addOptionIfSetAndNotDefault
+ */
+ static {
+ Map<String, Object> defaults = new HashMap<String, Object>();
+ defaults.put("overlayBgColor",
AbstractLightbox.DEFAULT_OVERLAY_BG_COLOR);
+ defaults.put("overlayOpacity",
AbstractLightbox.DEFAULT_OVERLAY_OPACITY);
+ defaults.put("containerBorderSize",
AbstractLightbox.DEFAULT_CONTAINER_BORDER_SIZE);
+ defaults.put("containerResizeSpeed",
AbstractLightbox.DEFAULT_CONTAINER_RESIZE_SPEED);
+ defaults.put("fixedNavigation",
AbstractLightbox.DEFAULT_FIXED_NAVIGATION);
+ defaults.put("keyToClose", AbstractLightbox.DEFAULT_KEY_TO_CLOSE);
+ defaults.put("keyToNext", AbstractLightbox.DEFAULT_KEY_TO_NEXT);
+ defaults.put("keyToPrev", AbstractLightbox.DEFAULT_KEY_TO_PREV);
+ defaults.put("txtImage", AbstractLightbox.DEFAULT_TXT_IMAGE);
+ defaults.put("txtOf", AbstractLightbox.DEFAULT_TXT_OF);
+
+ DEFAULTS = Collections.unmodifiableMap(defaults);
+ }
+
+ @Override
+ protected Class<? extends UIComponent> getComponentClass() {
+ return AbstractLightbox.class;
+ }
+
+ @Override
+ protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent
component) throws IOException {
+ AbstractLightbox lightbox = (AbstractLightbox) component;
+ final HashMap<String, Object> options = new HashMap<String,
Object>();
+ addOptionIfSetAndOrDefault("imageBlank", lightbox.getImageBlank(),
getURL(context, "/lightbox-blank.gif"), options);
+ addOptionIfSetAndOrDefault("imageLoading", lightbox.getImageLoading(),
getURL(context, "/lightbox-ico-loading.gif"), options);
+ addOptionIfSetAndOrDefault("imageBtnNext", lightbox.getImageBtnNext(),
getURL(context, "/lightbox-btn-next.gif"), options);
+ addOptionIfSetAndOrDefault("imageBtnPrev", lightbox.getImageBtnPrev(),
getURL(context, "/lightbox-btn-prev.gif"), options);
+ addOptionIfSetAndOrDefault("imageBtnClose",
lightbox.getImageBtnClose(), getURL(context, "/lightbox-btn-close.gif"),
options);
+ addOptionIfSetAndNotDefault("containerBorderSize",
lightbox.getContainerBorderSize(), options);
+ addOptionIfSetAndNotDefault("containerResizeSpeed",
lightbox.getContainerResizeSpeed(), options);
+ addOptionIfSetAndNotDefault("fixedNavigation",
lightbox.isFixedNavigation(), options);
+ addOptionIfSetAndNotDefault("keyToClose", lightbox.getKeyToClose(),
options);
+ addOptionIfSetAndNotDefault("keyToNext", lightbox.getKeyToNext(),
options);
+ addOptionIfSetAndNotDefault("keyToPrev", lightbox.getKeyToPrev(),
options);
+ addOptionIfSetAndNotDefault("overlayBgColor",
lightbox.getOverlayBgColor(), options);
+ addOptionIfSetAndNotDefault("overlayOpacity",
lightbox.getOverlayOpacity(), options);
+ addOptionIfSetAndNotDefault("txtImage", lightbox.getTxtImage(),
options);
+ addOptionIfSetAndNotDefault("txtOf", lightbox.getTxtOf(), options);
+ writer.startElement(HtmlConstants.DIV_ELEM, component);
+ writer.writeAttribute(HtmlConstants.ID_ATTRIBUTE, getUtils().clientId(context,
component), "id");
+ getUtils().writeScript(context, component, new
JSFunction("RichFaces.Lightbox", lightbox.getSelector(), options));
+ writer.endElement(HtmlConstants.DIV_ELEM);
+ }
+
+ protected void addOptionIfSetAndNotDefault(String optionName, Object value,
Map<String, Object> options) {
+ if (value != null && !"".equals(value) &&
!value.equals(DEFAULTS.get(optionName))) {
+ options.put(optionName, value);
+ }
+ }
+
+ protected void addOptionIfSetAndOrDefault(String optionName, Object value, Object
defaultValue, Map<String, Object> options) {
+ if (value != null && !"".equals(value)) {
+ options.put(optionName, value);
+ } else {
+ options.put(optionName, defaultValue);
+ }
+ }
+
+ private String getURL(FacesContext context, String path) {
+ return
context.getApplication().getResourceHandler().createResource(path).getRequestPath();
+ }
+}
Added:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/jquery.lightbox.css
===================================================================
---
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/jquery.lightbox.css
(rev 0)
+++
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/jquery.lightbox.css 2011-05-31
09:44:53 UTC (rev 22516)
@@ -0,0 +1,128 @@
+/**
+ * jQuery lightBox plugin
+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar
(
http://www.huddletogether.com/projects/lightbox2/)
+ * and adapted to me for use like a plugin from jQuery.
+ * @name jquery-lightbox-0.5.css
+ * @author Leandro Vieira Pinho -
http://leandrovieira.com
+ * @version 0.5
+ * @date April 11, 2008
+ * @category jQuery plugin
+ * @copyright (c) 2008 Leandro Vieira Pinho (
leandrovieira.com)
+ * @license CCAttribution-ShareAlike 2.5 Brazil -
http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
+ * @example Visit
http://leandrovieira.com/projects/jquery/lightbox/ for more
informations about this jQuery plugin
+ */
+#jquery-overlay {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 90;
+ width: 100%;
+ height: 500px;
+}
+
+#jquery-lightbox {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ z-index: 100;
+ text-align: center;
+ line-height: 0;
+}
+
+#jquery-lightbox a img {
+ border: none;
+}
+
+#lightbox-container-image-box {
+ position: relative;
+ background-color: #fff;
+ width: 250px;
+ height: 250px;
+ margin: 0 auto;
+}
+
+#lightbox-container-image {
+ padding: 10px;
+}
+
+#lightbox-loading {
+ position: absolute;
+ top: 40%;
+ left: 0%;
+ height: 25%;
+ width: 100%;
+ text-align: center;
+ line-height: 0;
+}
+
+#lightbox-nav {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ width: 100%;
+ z-index: 10;
+}
+
+#lightbox-container-image-box > #lightbox-nav {
+ left: 0;
+}
+
+#lightbox-nav a {
+ outline: none;
+}
+
+#lightbox-nav-btnPrev, #lightbox-nav-btnNext {
+ width: 49%;
+ height: 100%;
+ zoom: 1;
+ display: block;
+}
+
+#lightbox-nav-btnPrev {
+ left: 0;
+ float: left;
+}
+
+#lightbox-nav-btnNext {
+ right: 0;
+ float: right;
+}
+
+#lightbox-container-image-data-box {
+ font: 10px Verdana, Helvetica, sans-serif;
+ background-color: #fff;
+ margin: 0 auto;
+ line-height: 1.4em;
+ overflow: auto;
+ width: 100%;
+ padding: 0 10px 0;
+}
+
+#lightbox-container-image-data {
+ padding: 0 10px;
+ color: #666;
+}
+
+#lightbox-container-image-data #lightbox-image-details {
+ width: 70%;
+ float: left;
+ text-align: left;
+}
+
+#lightbox-image-details-caption {
+ font-weight: bold;
+}
+
+#lightbox-image-details-currentNumber {
+ display: block;
+ clear: left;
+ padding-bottom: 1.0em;
+}
+
+#lightbox-secNav-btnClose {
+ width: 66px;
+ float: right;
+ padding-bottom: 0.7em;
+}
\ No newline at end of file
Added:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/jquery.lightbox.js
===================================================================
--- sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/jquery.lightbox.js
(rev 0)
+++
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/jquery.lightbox.js 2011-05-31
09:44:53 UTC (rev 22516)
@@ -0,0 +1,501 @@
+/**
+ * jQuery lightBox plugin
+ * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar
(
http://www.huddletogether.com/projects/lightbox2/)
+ * and adapted to me for use like a plugin from jQuery.
+ * @name jquery-lightbox-0.5.js
+ * @author Leandro Vieira Pinho -
http://leandrovieira.com
+ * @version 0.5
+ * @date April 11, 2008
+ * @category jQuery plugin
+ * @copyright (c) 2008 Leandro Vieira Pinho (
leandrovieira.com)
+ * @license CCAttribution-ShareAlike 2.5 Brazil -
http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
+ * @example Visit
http://leandrovieira.com/projects/jquery/lightbox/ for more
informations about this jQuery plugin
+ */
+
+// Offering a Custom Alias suport - More info:
http://docs.jquery.com/Plugins/Authoring#Custom_Alias
+(function($) {
+ /**
+ * $ is an alias to jQuery object
+ *
+ */
+ $.fn.lightBox = function(settings) {
+ // Settings to configure the jQuery lightBox plugin how you like
+ settings = jQuery.extend({
+ // Configuration related to overlay
+ overlayBgColor: '#000', // (string) Background color
to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the
hexadecimal values for the red, green, and blue values of the color.
+ overlayOpacity: 0.8, // (integer) Opacity value to overlay;
inform: 0.X. Where X are number from 0 to 9
+ // Configuration related to navigation
+ fixedNavigation: false, // (boolean) Boolean that informs if
the navigation (next and prev button) will be fixed or not in the interface.
+ // Configuration related to images
+ imageLoading: 'lightbox-ico-loading.gif', //
(string) Path and the name of the loading icon
+ imageBtnPrev: 'lightbox-btn-prev.gif', //
(string) Path and the name of the prev button image
+ imageBtnNext: 'lightbox-btn-next.gif', //
(string) Path and the name of the next button image
+ imageBtnClose: 'lightbox-btn-close.gif', //
(string) Path and the name of the close btn
+ imageBlank: 'lightbox-blank.gif', //
(string) Path and the name of a blank image (one pixel)
+ // Configuration related to container image box
+ containerBorderSize: 10, // (integer) If you adjust the padding
in the CSS for the container, #lightbox-container-image-box, you will need to update this
value
+ containerResizeSpeed: 400, // (integer) Specify the resize duration
of container image. These number are miliseconds. 400 is default.
+ // Configuration related to texts in caption. For example: Image 2 of 8. You
can alter either "Image" and "of" texts.
+ txtImage: 'Image', // (string) Specify text
"Image"
+ txtOf: 'of', // (string) Specify text
"of"
+ // Configuration related to keyboard navigation
+ keyToClose: 'c', // (string) (c = close) Letter
to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key
is used to.
+ keyToPrev: 'p', // (string) (p = previous)
Letter to show the previous image
+ keyToNext: 'n', // (string) (n = next) Letter
to show the next image.
+ // Don�t alter these variables in any way
+ imageArray: [],
+ activeImage: 0
+ }, settings);
+ // Caching the jQuery object with all elements matched
+ var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
+ /**
+ * Initializing the plugin calling the start function
+ *
+ * @return boolean false
+ */
+ function _initialize() {
+ _start(this, jQueryMatchedObj); // This, in this context, refer to object
(link) which the user have clicked
+ return false; // Avoid the browser following the link
+ }
+
+ /**
+ * Start the jQuery lightBox plugin
+ *
+ * @param object objClicked The object (link) whick the user have clicked
+ * @param object jQueryMatchedObj The jQuery object with all elements matched
+ */
+ function _start(objClicked, jQueryMatchedObj) {
+ // Hime some elements to avoid conflict with overlay in IE. These elements
appear above the overlay.
+ $('embed, object, select').css({ 'visibility' :
'hidden' });
+ // Call the function to create the markup structure; style some elements;
assign events in some elements.
+ _set_interface();
+ // Unset total images in imageArray
+ settings.imageArray.length = 0;
+ // Unset image active information
+ settings.activeImage = 0;
+ // We have an image set? Or just an image? Let�s see it.
+ if (jQueryMatchedObj.length == 1) {
+ settings.imageArray.push(new
Array(objClicked.getAttribute('href'),
objClicked.getAttribute('title')));
+ } else {
+ // Add an Array (as many as we have), with href and title atributes,
inside the Array that storage the images references
+ for (var i = 0; i < jQueryMatchedObj.length; i++) {
+ settings.imageArray.push(new
Array(jQueryMatchedObj[i].getAttribute('href'),
jQueryMatchedObj[i].getAttribute('title')));
+ }
+ }
+ while (settings.imageArray[settings.activeImage][0] !=
objClicked.getAttribute('href')) {
+ settings.activeImage++;
+ }
+ // Call the function that prepares image exibition
+ _set_image_to_view();
+ }
+
+ /**
+ * Create the jQuery lightBox plugin interface
+ *
+ * The HTML markup will be like that:
+ <div id="jquery-overlay"></div>
+ <div id="jquery-lightbox">
+ <div id="lightbox-container-image-box">
+ <div id="lightbox-container-image">
+ <img src="../fotos/XX.jpg" id="lightbox-image">
+ <div id="lightbox-nav">
+ <a href="#" id="lightbox-nav-btnPrev"></a>
+ <a href="#" id="lightbox-nav-btnNext"></a>
+ </div>
+ <div id="lightbox-loading">
+ <a href="#" id="lightbox-loading-link">
+ <img src="../images/lightbox-ico-loading.gif">
+ </a>
+ </div>
+ </div>
+ </div>
+ <div id="lightbox-container-image-data-box">
+ <div id="lightbox-container-image-data">
+ <div id="lightbox-image-details">
+ <span id="lightbox-image-details-caption"></span>
+ <span id="lightbox-image-details-currentNumber"></span>
+ </div>
+ <div id="lightbox-secNav">
+ <a href="#" id="lightbox-secNav-btnClose">
+ <img src="../images/lightbox-btn-close.gif">
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+ *
+ */
+ function _set_interface() {
+ // Apply the HTML markup into body tag
+ $('body').append('<div
id="jquery-overlay"></div><div
id="jquery-lightbox"><div
id="lightbox-container-image-box"><div
id="lightbox-container-image"><img
id="lightbox-image"><div style=""
id="lightbox-nav"><a href="#"
id="lightbox-nav-btnPrev"></a><a href="#"
id="lightbox-nav-btnNext"></a></div><div
id="lightbox-loading"><a href="#"
id="lightbox-loading-link"><img src="' + settings.imageLoading +
'"></a></div></div></div><div
id="lightbox-container-image-data-box"><div
id="lightbox-container-image-data"><div
id="lightbox-image-details"><span
id="lightbox-image-details-caption"></span><span
id="lightbox-image-details-currentNumber"></span></div><div
id="lightbox-secNav"><a href="#"
id="lightbox-secNav-btnClose"><img src="' +
settings.imageBtnClose +
'"></a></div></div></div></div>');
+ // Get page sizes
+ var arrPageSizes = ___getPageSize();
+ // Style overlay and show it
+ $('#jquery-overlay').css({
+ backgroundColor: settings.overlayBgColor,
+ opacity: settings.overlayOpacity,
+ width: arrPageSizes[0],
+ height: arrPageSizes[1]
+ }).fadeIn();
+ // Get page scroll
+ var arrPageScroll = ___getPageScroll();
+ // Calculate top and left offset for the jquery-lightbox div object and show
it
+ $('#jquery-lightbox').css({
+ top: arrPageScroll[1] + (arrPageSizes[3] / 10),
+ left: arrPageScroll[0]
+ }).show();
+ // Assigning click events in elements to close overlay
+ $('#jquery-overlay,#jquery-lightbox').click(function() {
+ _finish();
+ });
+ // Assign the _finish function to lightbox-loading-link and
lightbox-secNav-btnClose objects
+
$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
+ _finish();
+ return false;
+ });
+ // If window was resized, calculate the new overlay dimensions
+ $(window).resize(function() {
+ // Get page sizes
+ var arrPageSizes = ___getPageSize();
+ // Style overlay and show it
+ $('#jquery-overlay').css({
+ width: arrPageSizes[0],
+ height: arrPageSizes[1]
+ });
+ // Get page scroll
+ var arrPageScroll = ___getPageScroll();
+ // Calculate top and left offset for the jquery-lightbox div object and
show it
+ $('#jquery-lightbox').css({
+ top: arrPageScroll[1] + (arrPageSizes[3] / 10),
+ left: arrPageScroll[0]
+ });
+ });
+ }
+
+ /**
+ * Prepares image exibition; doing a image�s preloader to calculate it�s size
+ *
+ */
+ function _set_image_to_view() { // show the loading
+ // Show the loading
+ $('#lightbox-loading').show();
+ if (settings.fixedNavigation) {
+
$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
+ } else {
+ // Hide some elements
+
$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
+ }
+ // Image preload process
+ var objImagePreloader = new Image();
+ objImagePreloader.onload = function() {
+ $('#lightbox-image').attr('src',
settings.imageArray[settings.activeImage][0]);
+ // Perfomance an effect in the image container resizing it
+ _resize_container_image_box(objImagePreloader.width,
objImagePreloader.height);
+ // clear onLoad, IE behaves irratically with animated gifs otherwise
+ objImagePreloader.onload = function() {
+ };
+ };
+ objImagePreloader.src = settings.imageArray[settings.activeImage][0];
+ }
+
+ ;
+ /**
+ * Perfomance an effect in the image container resizing it
+ *
+ * @param integer intImageWidth The image�s width that will be showed
+ * @param integer intImageHeight The image�s height that will be showed
+ */
+ function _resize_container_image_box(intImageWidth, intImageHeight) {
+ // Get current width and height
+ var intCurrentWidth = $('#lightbox-container-image-box').width();
+ var intCurrentHeight = $('#lightbox-container-image-box').height();
+ // Get the width and height of the selected image plus the padding
+ var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus
the image�s width and the left and right padding value
+ var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); //
Plus the image�s height and the left and right padding value
+ // Diferences
+ var intDiffW = intCurrentWidth - intWidth;
+ var intDiffH = intCurrentHeight - intHeight;
+ // Perfomance the effect
+ $('#lightbox-container-image-box').animate({ width: intWidth, height:
intHeight }, settings.containerResizeSpeed, function() {
+ _show_image();
+ });
+ if (( intDiffW == 0 ) && ( intDiffH == 0 )) {
+ if ($.browser.msie) {
+ ___pause(250);
+ } else {
+ ___pause(100);
+ }
+ }
+ $('#lightbox-container-image-data-box').css({ width: intImageWidth
});
+ $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height:
intImageHeight + (settings.containerBorderSize * 2) });
+ }
+
+ ;
+ /**
+ * Show the prepared image
+ *
+ */
+ function _show_image() {
+ $('#lightbox-loading').hide();
+ $('#lightbox-image').fadeIn(function() {
+ _show_image_data();
+ _set_navigation();
+ });
+ _preload_neighbor_images();
+ }
+
+ ;
+ /**
+ * Show the image information
+ *
+ */
+ function _show_image_data() {
+ $('#lightbox-container-image-data-box').slideDown('fast');
+ $('#lightbox-image-details-caption').hide();
+ if (settings.imageArray[settings.activeImage][1]) {
+
$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
+ }
+ // If we have a image set, display 'Image X of X'
+ if (settings.imageArray.length > 1) {
+ $('#lightbox-image-details-currentNumber').html(settings.txtImage
+ ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' '
+ settings.imageArray.length).show();
+ }
+ }
+
+ /**
+ * Display the button navigations
+ *
+ */
+ function _set_navigation() {
+ $('#lightbox-nav').show();
+
+ // Instead to define this configuration in CSS file, we define here. And it�s
need to IE. Just.
+ $('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({
'background' : 'transparent url(' + settings.imageBlank + ')
no-repeat' });
+
+ // Show the prev button, if not the first image in set
+ if (settings.activeImage != 0) {
+ if (settings.fixedNavigation) {
+ $('#lightbox-nav-btnPrev').css({ 'background' :
'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
+ .unbind()
+ .bind('click', function() {
+ settings.activeImage = settings.activeImage - 1;
+ _set_image_to_view();
+ return false;
+ });
+ } else {
+ // Show the images button for Next buttons
+ $('#lightbox-nav-btnPrev').unbind().hover(function() {
+ $(this).css({ 'background' : 'url(' +
settings.imageBtnPrev + ') left 15% no-repeat' });
+ }, function() {
+ $(this).css({ 'background' : 'transparent url(' +
settings.imageBlank + ') no-repeat' });
+ }).show().bind('click', function() {
+ settings.activeImage = settings.activeImage - 1;
+ _set_image_to_view();
+ return false;
+ });
+ }
+ }
+
+ // Show the next button, if not the last image in set
+ if (settings.activeImage != ( settings.imageArray.length - 1 )) {
+ if (settings.fixedNavigation) {
+ $('#lightbox-nav-btnNext').css({ 'background' :
'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
+ .unbind()
+ .bind('click', function() {
+ settings.activeImage = settings.activeImage + 1;
+ _set_image_to_view();
+ return false;
+ });
+ } else {
+ // Show the images button for Next buttons
+ $('#lightbox-nav-btnNext').unbind().hover(function() {
+ $(this).css({ 'background' : 'url(' +
settings.imageBtnNext + ') right 15% no-repeat' });
+ }, function() {
+ $(this).css({ 'background' : 'transparent url(' +
settings.imageBlank + ') no-repeat' });
+ }).show().bind('click', function() {
+ settings.activeImage = settings.activeImage + 1;
+ _set_image_to_view();
+ return false;
+ });
+ }
+ }
+ // Enable keyboard navigation
+ _enable_keyboard_navigation();
+ }
+
+ /**
+ * Enable a support to keyboard navigation
+ *
+ */
+ function _enable_keyboard_navigation() {
+ $(document).keydown(function(objEvent) {
+ _keyboard_action(objEvent);
+ });
+ }
+
+ /**
+ * Disable the support to keyboard navigation
+ *
+ */
+ function _disable_keyboard_navigation() {
+ $(document).unbind();
+ }
+
+ /**
+ * Perform the keyboard actions
+ *
+ */
+ function _keyboard_action(objEvent) {
+ // To ie
+ if (objEvent == null) {
+ keycode = event.keyCode;
+ escapeKey = 27;
+ // To Mozilla
+ } else {
+ keycode = objEvent.keyCode;
+ escapeKey = objEvent.DOM_VK_ESCAPE;
+ }
+ // Get the key in lower case form
+ key = String.fromCharCode(keycode).toLowerCase();
+ // Verify the keys to close the ligthBox
+ if (( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode ==
escapeKey )) {
+ _finish();
+ }
+ // Verify the key to show the previous image
+ if (( key == settings.keyToPrev ) || ( keycode == 37 )) {
+ // If we�re not showing the first image, call the previous
+ if (settings.activeImage != 0) {
+ settings.activeImage = settings.activeImage - 1;
+ _set_image_to_view();
+ _disable_keyboard_navigation();
+ }
+ }
+ // Verify the key to show the next image
+ if (( key == settings.keyToNext ) || ( keycode == 39 )) {
+ // If we�re not showing the last image, call the next
+ if (settings.activeImage != ( settings.imageArray.length - 1 )) {
+ settings.activeImage = settings.activeImage + 1;
+ _set_image_to_view();
+ _disable_keyboard_navigation();
+ }
+ }
+ }
+
+ /**
+ * Preload prev and next images being showed
+ *
+ */
+ function _preload_neighbor_images() {
+ if ((settings.imageArray.length - 1) > settings.activeImage) {
+ objNext = new Image();
+ objNext.src = settings.imageArray[settings.activeImage + 1][0];
+ }
+ if (settings.activeImage > 0) {
+ objPrev = new Image();
+ objPrev.src = settings.imageArray[settings.activeImage - 1][0];
+ }
+ }
+
+ /**
+ * Remove jQuery lightBox plugin HTML markup
+ *
+ */
+ function _finish() {
+ $('#jquery-lightbox').remove();
+ $('#jquery-overlay').fadeOut(function() {
+ $('#jquery-overlay').remove();
+ });
+ // Show some elements to avoid conflict with overlay in IE. These elements
appear above the overlay.
+ $('embed, object, select').css({ 'visibility' :
'visible' });
+ }
+
+ /**
+ / THIRD FUNCTION
+ * getPageSize() by
quirksmode.com
+ *
+ * @return Array Return an array with page width, height and window width,
height
+ */
+ function ___getPageSize() {
+ var xScroll, yScroll;
+ if (window.innerHeight && window.scrollMaxY) {
+ xScroll = window.innerWidth + window.scrollMaxX;
+ yScroll = window.innerHeight + window.scrollMaxY;
+ } else if (document.body.scrollHeight > document.body.offsetHeight) { //
all but Explorer Mac
+ xScroll = document.body.scrollWidth;
+ yScroll = document.body.scrollHeight;
+ } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and
Safari
+ xScroll = document.body.offsetWidth;
+ yScroll = document.body.offsetHeight;
+ }
+ var windowWidth, windowHeight;
+ if (self.innerHeight) { // all except Explorer
+ if (document.documentElement.clientWidth) {
+ windowWidth = document.documentElement.clientWidth;
+ } else {
+ windowWidth = self.innerWidth;
+ }
+ windowHeight = self.innerHeight;
+ } else if (document.documentElement &&
document.documentElement.clientHeight) { // Explorer 6 Strict Mode
+ windowWidth = document.documentElement.clientWidth;
+ windowHeight = document.documentElement.clientHeight;
+ } else if (document.body) { // other Explorers
+ windowWidth = document.body.clientWidth;
+ windowHeight = document.body.clientHeight;
+ }
+ // for small pages with total height less then height of the viewport
+ if (yScroll < windowHeight) {
+ pageHeight = windowHeight;
+ } else {
+ pageHeight = yScroll;
+ }
+ // for small pages with total width less then width of the viewport
+ if (xScroll < windowWidth) {
+ pageWidth = xScroll;
+ } else {
+ pageWidth = windowWidth;
+ }
+ arrayPageSize = new Array(pageWidth, pageHeight, windowWidth, windowHeight);
+ return arrayPageSize;
+ }
+
+ ;
+ /**
+ / THIRD FUNCTION
+ * getPageScroll() by
quirksmode.com
+ *
+ * @return Array Return an array with x,y page scroll values.
+ */
+ function ___getPageScroll() {
+ var xScroll, yScroll;
+ if (self.pageYOffset) {
+ yScroll = self.pageYOffset;
+ xScroll = self.pageXOffset;
+ } else if (document.documentElement &&
document.documentElement.scrollTop) { // Explorer 6 Strict
+ yScroll = document.documentElement.scrollTop;
+ xScroll = document.documentElement.scrollLeft;
+ } else if (document.body) {// all other Explorers
+ yScroll = document.body.scrollTop;
+ xScroll = document.body.scrollLeft;
+ }
+ arrayPageScroll = new Array(xScroll, yScroll);
+ return arrayPageScroll;
+ }
+
+ ;
+ /**
+ * Stop the code execution from a escified time in milisecond
+ *
+ */
+ function ___pause(ms) {
+ var date = new Date();
+ curDate = null;
+ do {
+ var curDate = new Date();
+ }
+ while (curDate - date < ms);
+ }
+
+ ;
+ // Return the jQuery object for chaining. The unbind method is used to avoid
click conflict when the plugin is called more than once
+ return this.unbind('click').click(_initialize);
+ };
+})(jQuery); // Call and execute the function immediately passing the jQuery object
\ No newline at end of file
Added:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-blank.gif
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-blank.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-btn-close.gif
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-btn-close.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-btn-next.gif
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-btn-next.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-btn-prev.gif
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-btn-prev.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-ico-loading.gif
===================================================================
(Binary files differ)
Property changes on:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/lightbox-ico-loading.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added:
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/richfaces.lightbox.js
===================================================================
---
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/richfaces.lightbox.js
(rev 0)
+++
sandbox/trunk/ui/lightbox/ui/src/main/resources/META-INF/resources/richfaces.lightbox.js 2011-05-31
09:44:53 UTC (rev 22516)
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ */
+
+window.RichFaces = window.RichFaces || {};
+RichFaces.Lightbox = function(selector, options) {
+ jQuery(selector).lightBox(options);
+};
\ No newline at end of file