JBoss Rich Faces SVN: r3244 - in tags: 3.1.1-CR2 and 120 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-03 20:32:12 -0400 (Wed, 03 Oct 2007)
New Revision: 3244
Added:
tags/3.1.1-CR2/
Modified:
tags/3.1.1-CR2/cdk/generator/pom.xml
tags/3.1.1-CR2/cdk/maven-archetype-jsf-component/pom.xml
tags/3.1.1-CR2/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml
tags/3.1.1-CR2/cdk/maven-archetype-jsfwebapp/pom.xml
tags/3.1.1-CR2/cdk/maven-cdk-plugin/pom.xml
tags/3.1.1-CR2/cdk/pom.xml
tags/3.1.1-CR2/docs/pom.xml
tags/3.1.1-CR2/docs/userguide/en/pom.xml
tags/3.1.1-CR2/docs/userguide/pom.xml
tags/3.1.1-CR2/docs/xslt/en/pom.xml
tags/3.1.1-CR2/docs/xslt/pom.xml
tags/3.1.1-CR2/extensions/gwt/pom.xml
tags/3.1.1-CR2/extensions/pom.xml
tags/3.1.1-CR2/extensions/portlet/pom.xml
tags/3.1.1-CR2/extensions/seam/pom.xml
tags/3.1.1-CR2/extensions/trinidad/pom.xml
tags/3.1.1-CR2/framework/api-parent/pom.xml
tags/3.1.1-CR2/framework/api/pom.xml
tags/3.1.1-CR2/framework/impl-parent/pom.xml
tags/3.1.1-CR2/framework/impl/pom.xml
tags/3.1.1-CR2/framework/impl/src/main/java/org/richfaces/VersionBean.java
tags/3.1.1-CR2/framework/pom.xml
tags/3.1.1-CR2/framework/test/pom.xml
tags/3.1.1-CR2/pom.xml
tags/3.1.1-CR2/samples/ajaxPortlet/pom.xml
tags/3.1.1-CR2/samples/calendar-sample/pom.xml
tags/3.1.1-CR2/samples/dataFilterSliderDemo/pom.xml
tags/3.1.1-CR2/samples/dataTableDemo/pom.xml
tags/3.1.1-CR2/samples/datascroller-sample/pom.xml
tags/3.1.1-CR2/samples/dragDropDemo/pom.xml
tags/3.1.1-CR2/samples/dropdownmenu-sample/pom.xml
tags/3.1.1-CR2/samples/effect-sample/pom.xml
tags/3.1.1-CR2/samples/gmap-sample/pom.xml
tags/3.1.1-CR2/samples/inputNumberSliderDemo/pom.xml
tags/3.1.1-CR2/samples/inputNumberSpinnerDemo/pom.xml
tags/3.1.1-CR2/samples/local-value-demo/pom.xml
tags/3.1.1-CR2/samples/modalpanel-sample/pom.xml
tags/3.1.1-CR2/samples/panel-sample/pom.xml
tags/3.1.1-CR2/samples/panelbar-sample/pom.xml
tags/3.1.1-CR2/samples/panelmenu-sample/pom.xml
tags/3.1.1-CR2/samples/pom.xml
tags/3.1.1-CR2/samples/portal-echo/pom.xml
tags/3.1.1-CR2/samples/rich-message-demo/pom.xml
tags/3.1.1-CR2/samples/richfaces-art-datatable/pom.xml
tags/3.1.1-CR2/samples/richfaces-demo/pom.xml
tags/3.1.1-CR2/samples/richfaces-ear-demo/ejb/pom.xml
tags/3.1.1-CR2/samples/richfaces-ear-demo/pom.xml
tags/3.1.1-CR2/samples/richfaces-ear-demo/richfacesEAR/pom.xml
tags/3.1.1-CR2/samples/richfaces-ear-demo/webapp/pom.xml
tags/3.1.1-CR2/samples/scrollableDataTableDemo/pom.xml
tags/3.1.1-CR2/samples/seamEAR/ear/pom.xml
tags/3.1.1-CR2/samples/seamEAR/ejbs/pom.xml
tags/3.1.1-CR2/samples/seamEAR/pom.xml
tags/3.1.1-CR2/samples/seamEAR/primary-source/pom.xml
tags/3.1.1-CR2/samples/seamEAR/projects/logging/pom.xml
tags/3.1.1-CR2/samples/seamEAR/projects/pom.xml
tags/3.1.1-CR2/samples/seamEAR/wars/pom.xml
tags/3.1.1-CR2/samples/seamEAR/wars/seamWebapp/pom.xml
tags/3.1.1-CR2/samples/seamIntegration/pom.xml
tags/3.1.1-CR2/samples/separator-sample/pom.xml
tags/3.1.1-CR2/samples/simpleTogglePanel-sample/pom.xml
tags/3.1.1-CR2/samples/skins/pom.xml
tags/3.1.1-CR2/samples/suggestionbox-sample/pom.xml
tags/3.1.1-CR2/samples/tabPanelDemo/pom.xml
tags/3.1.1-CR2/samples/togglePanel-sample/pom.xml
tags/3.1.1-CR2/samples/tomahawkCompability/pom.xml
tags/3.1.1-CR2/samples/toolBarDemo/pom.xml
tags/3.1.1-CR2/samples/tooltip-sample/pom.xml
tags/3.1.1-CR2/samples/tree-demo/pom.xml
tags/3.1.1-CR2/samples/treeModelDemo/pom.xml
tags/3.1.1-CR2/samples/useCases/pom.xml
tags/3.1.1-CR2/samples/virtualEarth-sample/pom.xml
tags/3.1.1-CR2/sandbox/api/pom.xml
tags/3.1.1-CR2/sandbox/impl/pom.xml
tags/3.1.1-CR2/sandbox/pom.xml
tags/3.1.1-CR2/sandbox/samples/dialog-window-sample/pom.xml
tags/3.1.1-CR2/sandbox/samples/panel2-sample/pom.xml
tags/3.1.1-CR2/sandbox/samples/pom.xml
tags/3.1.1-CR2/sandbox/samples/rich-message-demo/pom.xml
tags/3.1.1-CR2/sandbox/samples/simpleTogglePanel2-sample/pom.xml
tags/3.1.1-CR2/sandbox/ui/dialog-window/pom.xml
tags/3.1.1-CR2/sandbox/ui/panel2/pom.xml
tags/3.1.1-CR2/sandbox/ui/pom.xml
tags/3.1.1-CR2/sandbox/ui/simpleTogglePanel2/pom.xml
tags/3.1.1-CR2/sandbox/ui/state/pom.xml
tags/3.1.1-CR2/test-applications/facelets/pom.xml
tags/3.1.1-CR2/test-applications/jsp/pom.xml
tags/3.1.1-CR2/test-applications/pom.xml
tags/3.1.1-CR2/ui/assembly/pom.xml
tags/3.1.1-CR2/ui/calendar/pom.xml
tags/3.1.1-CR2/ui/core/pom.xml
tags/3.1.1-CR2/ui/create.bat
tags/3.1.1-CR2/ui/create.sh
tags/3.1.1-CR2/ui/dataFilterSlider/pom.xml
tags/3.1.1-CR2/ui/dataTable/pom.xml
tags/3.1.1-CR2/ui/datascroller/pom.xml
tags/3.1.1-CR2/ui/drag-drop/pom.xml
tags/3.1.1-CR2/ui/dropdown-menu/pom.xml
tags/3.1.1-CR2/ui/effect/pom.xml
tags/3.1.1-CR2/ui/gmap/pom.xml
tags/3.1.1-CR2/ui/inputnumber-slider/pom.xml
tags/3.1.1-CR2/ui/inputnumber-spinner/pom.xml
tags/3.1.1-CR2/ui/insert/pom.xml
tags/3.1.1-CR2/ui/menu-components/pom.xml
tags/3.1.1-CR2/ui/message/pom.xml
tags/3.1.1-CR2/ui/modal-panel/pom.xml
tags/3.1.1-CR2/ui/paint2D/pom.xml
tags/3.1.1-CR2/ui/panel/pom.xml
tags/3.1.1-CR2/ui/panelbar/pom.xml
tags/3.1.1-CR2/ui/panelmenu/pom.xml
tags/3.1.1-CR2/ui/pom.xml
tags/3.1.1-CR2/ui/scrollableDataTable/pom.xml
tags/3.1.1-CR2/ui/separator/pom.xml
tags/3.1.1-CR2/ui/simpleTogglePanel/pom.xml
tags/3.1.1-CR2/ui/spacer/pom.xml
tags/3.1.1-CR2/ui/suggestionbox/pom.xml
tags/3.1.1-CR2/ui/tabPanel/pom.xml
tags/3.1.1-CR2/ui/togglePanel/pom.xml
tags/3.1.1-CR2/ui/toolBar/pom.xml
tags/3.1.1-CR2/ui/tooltip/pom.xml
tags/3.1.1-CR2/ui/tree/pom.xml
tags/3.1.1-CR2/ui/treeModel/pom.xml
tags/3.1.1-CR2/ui/virtualEarth/pom.xml
Log:
Tag RF 3.1.1 release candidate 2
Copied: tags/3.1.1-CR2 (from rev 3243, branches/3.1.x)
Modified: tags/3.1.1-CR2/cdk/generator/pom.xml
===================================================================
--- branches/3.1.x/cdk/generator/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/cdk/generator/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>cdk</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.cdk</groupId>
<artifactId>generator</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>Java Server Faces component generator</name>
<build>
<plugins>
Modified: tags/3.1.1-CR2/cdk/maven-archetype-jsf-component/pom.xml
===================================================================
--- branches/3.1.x/cdk/maven-archetype-jsf-component/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/cdk/maven-archetype-jsf-component/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,11 +2,11 @@
<parent>
<artifactId>cdk</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-archetype-jsf-component</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>Archetype - maven-archetype-jsf-component</name>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml
===================================================================
--- branches/3.1.x/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/cdk/maven-archetype-jsf-component/src/main/resources/archetype-resources/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -10,7 +10,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<configuration>
<library>
<prefix>${groupId}</prefix>
Modified: tags/3.1.1-CR2/cdk/maven-archetype-jsfwebapp/pom.xml
===================================================================
--- branches/3.1.x/cdk/maven-archetype-jsfwebapp/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/cdk/maven-archetype-jsfwebapp/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,11 +2,11 @@
<parent>
<artifactId>cdk</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-archetype-jsfwebapp</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>Archetype for jsf webapp project</name>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/cdk/maven-cdk-plugin/pom.xml
===================================================================
--- branches/3.1.x/cdk/maven-cdk-plugin/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/cdk/maven-cdk-plugin/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>cdk</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>maven-plugin</packaging>
<name>Maven plugin for JSF components code generation</name>
<dependencies>
@@ -50,7 +50,7 @@
<dependency>
<groupId>org.richfaces.cdk</groupId>
<artifactId>generator</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/cdk/pom.xml
===================================================================
--- branches/3.1.x/cdk/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/cdk/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>root</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>cdk</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>pom</packaging>
<name>JSF Components Development kit</name>
<dependencies />
Modified: tags/3.1.1-CR2/docs/pom.xml
===================================================================
--- branches/3.1.x/docs/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/docs/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,12 +3,12 @@
<parent>
<artifactId>root</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>docs</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>Project documentation</name>
<packaging>pom</packaging>
<!-- setup repositories, to build documentation separate from Java projects -->
Modified: tags/3.1.1-CR2/docs/userguide/en/pom.xml
===================================================================
--- branches/3.1.x/docs/userguide/en/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/docs/userguide/en/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -5,12 +5,12 @@
<parent>
<groupId>org.richfaces.docs</groupId>
<artifactId>userguide</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.richfaces.docs.userguide</groupId>
<artifactId>${translation}</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>jdocbook</packaging>
<name>Richfaces Manual (${translation})</name>
Modified: tags/3.1.1-CR2/docs/userguide/pom.xml
===================================================================
--- branches/3.1.x/docs/userguide/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/docs/userguide/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,13 +2,13 @@
<parent>
<artifactId>docs</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.docs</groupId>
<artifactId>userguide</artifactId>
<packaging>pom</packaging>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>User guide</name>
<description>RichFaces user guide</description>
<pluginRepositories>
Modified: tags/3.1.1-CR2/docs/xslt/en/pom.xml
===================================================================
--- branches/3.1.x/docs/xslt/en/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/docs/xslt/en/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>xslt</artifactId>
<groupId>org.richfaces.docs</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.docs.xslt</groupId>
<artifactId>en</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>jar</packaging>
<name>Documentation stylesheets (English translation)</name>
<description>
Modified: tags/3.1.1-CR2/docs/xslt/pom.xml
===================================================================
--- branches/3.1.x/docs/xslt/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/docs/xslt/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>docs</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.docs</groupId>
<artifactId>xslt</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>pom</packaging>
<name>Documentation stylesheets</name>
<description>Docbook documentation stylesheets</description>
Modified: tags/3.1.1-CR2/extensions/gwt/pom.xml
===================================================================
--- branches/3.1.x/extensions/gwt/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/extensions/gwt/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,7 +3,7 @@
<parent>
<artifactId>master</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
@@ -99,7 +99,7 @@
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>ajax4jsf</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>com.sun.facelets</groupId>
Modified: tags/3.1.1-CR2/extensions/pom.xml
===================================================================
--- branches/3.1.x/extensions/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/extensions/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>root</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>extensions</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>Richfaces extensions for a different environments</name>
<packaging>pom</packaging>
<modules>
Modified: tags/3.1.1-CR2/extensions/portlet/pom.xml
===================================================================
--- branches/3.1.x/extensions/portlet/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/extensions/portlet/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>extensions</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.extensions</groupId>
<artifactId>portlet</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>ajax4jsf portlet brige</name>
<url>http://labs.jboss.com/wiki/Ajax4jsf/a4j-portlet</url>
<dependencies>
@@ -56,12 +56,12 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-test</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/extensions/seam/pom.xml
===================================================================
--- branches/3.1.x/extensions/seam/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/extensions/seam/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -35,7 +35,7 @@
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>ajax4jsf</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>jboss</groupId>
Modified: tags/3.1.1-CR2/extensions/trinidad/pom.xml
===================================================================
--- branches/3.1.x/extensions/trinidad/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/extensions/trinidad/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -35,7 +35,7 @@
<dependency>
<groupId>org.richfaces</groupId>
<artifactId>ajax4jsf</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.trinidad</groupId>
Modified: tags/3.1.1-CR2/framework/api/pom.xml
===================================================================
--- branches/3.1.x/framework/api/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/framework/api/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,13 +2,13 @@
<parent>
<artifactId>framework</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
<name>Java Server Faces AJAX framework API</name>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<build>
<plugins>
<plugin>
Modified: tags/3.1.1-CR2/framework/api-parent/pom.xml
===================================================================
--- branches/3.1.x/framework/api-parent/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/framework/api-parent/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -4,13 +4,13 @@
<parent>
<artifactId>framework</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.framework</groupId>
<packaging>pom</packaging>
<artifactId>api-parent</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>Java Server Faces AJAX framework API Dependencies</name>
<properties>
<jsfVersion>1.1</jsfVersion>
Modified: tags/3.1.1-CR2/framework/impl/pom.xml
===================================================================
--- branches/3.1.x/framework/impl/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/framework/impl/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,19 +3,19 @@
<parent>
<artifactId>impl-parent</artifactId>
<groupId>org.richfaces.framework</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<relativePath>../impl-parent/pom.xml</relativePath>
</parent>
-->
<parent>
<artifactId>framework</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>Java Server Faces AJAX framework implementation</name>
<build>
<resources>
@@ -285,7 +285,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<properties>
Modified: tags/3.1.1-CR2/framework/impl/src/main/java/org/richfaces/VersionBean.java
===================================================================
--- branches/3.1.x/framework/impl/src/main/java/org/richfaces/VersionBean.java 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/framework/impl/src/main/java/org/richfaces/VersionBean.java 2007-10-04 00:32:12 UTC (rev 3244)
@@ -37,7 +37,7 @@
* Revision version, must be auto modified by CVS
*/
- public static final String REVISION = "1-SNAPSHOT" ;
+ public static final String REVISION = "1-CR2" ;
public static final String SCM_REVISION = " SVN $Revision$ $Date$";//$Revision$ $Date$";
public static final Version _version = new Version();
Modified: tags/3.1.1-CR2/framework/impl-parent/pom.xml
===================================================================
--- branches/3.1.x/framework/impl-parent/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/framework/impl-parent/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -5,12 +5,12 @@
<parent>
<artifactId>framework</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.framework</groupId>
<artifactId>impl-parent</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>pom</packaging>
<name>
Java Server Faces AJAX framework implementation parent file
@@ -203,7 +203,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<properties>
Modified: tags/3.1.1-CR2/framework/pom.xml
===================================================================
--- branches/3.1.x/framework/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/framework/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>root</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>framework</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>pom</packaging>
<name>Java Server Faces AJAX framework</name>
<dependencies />
Modified: tags/3.1.1-CR2/framework/test/pom.xml
===================================================================
--- branches/3.1.x/framework/test/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/framework/test/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>framework</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-test</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>Ajax4Jsf test framework</name>
<url>https://ajax4jsf.dev.java.net</url>
<dependencies>
@@ -42,7 +42,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>htmlunit</groupId>
Modified: tags/3.1.1-CR2/pom.xml
===================================================================
--- branches/3.1.x/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -1,12 +1,10 @@
-<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/maven-v4_0_0.xsd">
+<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>root</artifactId>
<packaging>pom</packaging>
<name>Jboss RichFaces project</name>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<url>http://labs.jboss.com/jbossrichfaces</url>
<properties>
<snapshotRepository>
@@ -131,13 +129,9 @@
</license>
</licenses>
<scm>
- <connection>
- scm:svn:http://anonsvn.jboss.org/repos/richfaces/branches/3.1.x
- </connection>
- <developerConnection>
- scm:svn:https://svn.jboss.org/repos/richfaces/branches/3.1.x
- </developerConnection>
- <url>https://svn.jboss.org/repos/richfaces/branches/3.1.x</url>
+ <connection>scm:svn:https://svn.jboss.org/repos/richfaces/tags/3.1.1-CR2</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/branches/3.1.1-CR2</developerConnection>
+ <url>https://svn.jboss.org/repos/richfaces/branches/3.1.1-CR2</url>
</scm>
<profiles>
<profile>
Modified: tags/3.1.1-CR2/samples/ajaxPortlet/pom.xml
===================================================================
--- branches/3.1.x/samples/ajaxPortlet/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/ajaxPortlet/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -5,12 +5,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>portalAjaxSample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<description>Ajax JSF sample portlet</description>
<build>
@@ -27,7 +27,7 @@
<dependency>
<groupId>org.richfaces.extensions</groupId>
<artifactId>portlet</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<exclusions>
<exclusion>
<groupId>javax.faces</groupId>
@@ -42,7 +42,7 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
Modified: tags/3.1.1-CR2/samples/calendar-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/calendar-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/calendar-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,29 +3,29 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>calendar-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>calendar-sample Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>calendar</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>core</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<build>
Modified: tags/3.1.1-CR2/samples/dataFilterSliderDemo/pom.xml
===================================================================
--- branches/3.1.x/samples/dataFilterSliderDemo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/dataFilterSliderDemo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,29 +2,29 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>dataFilterSliderDemo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>dataFilterSliderDemo Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>dataFilterSlider</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<build>
Modified: tags/3.1.1-CR2/samples/dataTableDemo/pom.xml
===================================================================
--- branches/3.1.x/samples/dataTableDemo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/dataTableDemo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>dataTableDemo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<url>http://maven.apache.org</url>
@@ -18,12 +18,12 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>dataTable</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/datascroller-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/datascroller-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/datascroller-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>datascroller-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<build>
@@ -17,12 +17,12 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>datascroller</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/dragDropDemo/pom.xml
===================================================================
--- branches/3.1.x/samples/dragDropDemo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/dragDropDemo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>dragDropDemo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>Drag/Drop demo app</name>
<build>
@@ -17,12 +17,12 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>drag-drop</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/dropdownmenu-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/dropdownmenu-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/dropdownmenu-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>dropdownmenu-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<build>
@@ -17,17 +17,17 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>dropdown-menu</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>menu-components</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/effect-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/effect-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/effect-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,19 +2,19 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>effect-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>effect Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>effect</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<build>
Modified: tags/3.1.1-CR2/samples/gmap-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/gmap-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/gmap-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,19 +2,19 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>gmap-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>gmap-sample Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>gmap</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<build>
Modified: tags/3.1.1-CR2/samples/inputNumberSliderDemo/pom.xml
===================================================================
--- branches/3.1.x/samples/inputNumberSliderDemo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/inputNumberSliderDemo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>inputNumberSliderDemo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<build>
@@ -17,12 +17,12 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>inputnumber-slider</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/inputNumberSpinnerDemo/pom.xml
===================================================================
--- branches/3.1.x/samples/inputNumberSpinnerDemo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/inputNumberSpinnerDemo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>inputNumberSpinnerDemo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<build>
@@ -17,12 +17,12 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>inputnumber-spinner</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/local-value-demo/pom.xml
===================================================================
--- branches/3.1.x/samples/local-value-demo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/local-value-demo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,24 +2,24 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>local-value-demo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>richfaces-local-value-demo Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>core</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<scope>provided</scope>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/samples/modalpanel-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/modalpanel-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/modalpanel-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,24 +2,24 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>modalpanel-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>modalpanel-sample Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>modal-panel</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<build>
Modified: tags/3.1.1-CR2/samples/panel-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/panel-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/panel-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,24 +2,24 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>panel-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>panel-sample Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>panel</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<build>
Modified: tags/3.1.1-CR2/samples/panelbar-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/panelbar-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/panelbar-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>panelbar-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<build>
@@ -17,12 +17,12 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>panelbar</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/panelmenu-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/panelmenu-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/panelmenu-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,24 +3,24 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>panelmenu-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>panelmenu-sample Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>panelmenu</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/samples/pom.xml
===================================================================
--- branches/3.1.x/samples/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,14 +3,14 @@
<parent>
<artifactId>root</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
<artifactId>samples</artifactId>
<packaging>pom</packaging>
<name>RichFaces Components Examples</name>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<url>http://labs.jboss.com/jbossrichfaces/samples</url>
<properties>
<!-- -->
@@ -67,12 +67,12 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>core</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>com.sun.facelets</groupId>
@@ -361,7 +361,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<exclusions>
<exclusion>
<groupId>javax.faces</groupId>
Modified: tags/3.1.1-CR2/samples/portal-echo/pom.xml
===================================================================
--- branches/3.1.x/samples/portal-echo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/portal-echo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -5,13 +5,13 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>portal-echo</artifactId>
<packaging>war</packaging>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<description>Ajax JSF sample portlet</description>
<build>
<defaultGoal>package</defaultGoal>
Modified: tags/3.1.1-CR2/samples/rich-message-demo/pom.xml
===================================================================
--- branches/3.1.x/samples/rich-message-demo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/rich-message-demo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,29 +3,29 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>rich-message-demo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>rich-message-demo</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>message</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/samples/richfaces-art-datatable/pom.xml
===================================================================
--- branches/3.1.x/samples/richfaces-art-datatable/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/richfaces-art-datatable/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,19 +3,19 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>richfaces-art-datatable</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>richfaces-art-datatableDemo Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<build>
Modified: tags/3.1.1-CR2/samples/richfaces-demo/pom.xml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/richfaces-demo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,19 +2,19 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>richfaces-demo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>richfaces-demo Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>com.uwyn</groupId>
@@ -24,7 +24,7 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>core</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<scope>provided</scope>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/samples/richfaces-ear-demo/ejb/pom.xml
===================================================================
--- branches/3.1.x/samples/richfaces-ear-demo/ejb/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/richfaces-ear-demo/ejb/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -4,14 +4,14 @@
<parent>
<artifactId>richfaces-ear-demo</artifactId>
<groupId>org.richfaces.samples</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples.richfaces-ear-demo</groupId>
<artifactId>ejb</artifactId>
<packaging>ejb</packaging>
<name>ejb</name>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
@@ -23,7 +23,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<exclusions>
<exclusion>
<groupId>javax.faces</groupId>
Modified: tags/3.1.1-CR2/samples/richfaces-ear-demo/pom.xml
===================================================================
--- branches/3.1.x/samples/richfaces-ear-demo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/richfaces-ear-demo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -4,14 +4,14 @@
<parent>
<artifactId>root</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>richfaces-ear-demo</artifactId>
<name>JSF 1.2/Jee5 enterprise application demo</name>
<packaging>pom</packaging>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<build>
<pluginManagement>
<plugins>
Modified: tags/3.1.1-CR2/samples/richfaces-ear-demo/richfacesEAR/pom.xml
===================================================================
--- branches/3.1.x/samples/richfaces-ear-demo/richfacesEAR/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/richfaces-ear-demo/richfacesEAR/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -4,32 +4,32 @@
<parent>
<artifactId>richfaces-ear-demo</artifactId>
<groupId>org.richfaces.samples</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples.richfaces-ear-demo</groupId>
<artifactId>richfacesEAR</artifactId>
<name>richfacesEAR</name>
<packaging>ear</packaging>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.richfaces.samples.richfaces-ear-demo</groupId>
<artifactId>ejb</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>org.richfaces.samples.richfaces-ear-demo</groupId>
<artifactId>ejb</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<type>ejb-client</type>
</dependency>
<dependency>
<groupId>org.richfaces.samples.richfaces-ear-demo</groupId>
<artifactId>webapp</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<type>war</type>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/samples/richfaces-ear-demo/webapp/pom.xml
===================================================================
--- branches/3.1.x/samples/richfaces-ear-demo/webapp/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/richfaces-ear-demo/webapp/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -4,14 +4,14 @@
<parent>
<artifactId>richfaces-ear-demo</artifactId>
<groupId>org.richfaces.samples</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples.richfaces-ear-demo</groupId>
<artifactId>webapp</artifactId>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<url>http://maven.apache.org</url>
<build>
<finalName>webapp</finalName>
@@ -48,17 +48,17 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<optional>true</optional>
</dependency>
<dependency>
@@ -71,7 +71,7 @@
<dependency>
<groupId>org.richfaces.samples.richfaces-ear-demo</groupId>
<artifactId>ejb</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<type>ejb-client</type>
<scope>provided</scope>
<optional>true</optional>
Modified: tags/3.1.1-CR2/samples/scrollableDataTableDemo/pom.xml
===================================================================
--- branches/3.1.x/samples/scrollableDataTableDemo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/scrollableDataTableDemo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -4,34 +4,34 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>scrollableDataTableDemo</artifactId>
<groupId>org.richfaces.samples</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>scrollableDataTable Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>scrollableDataTable</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>core</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>dataTable</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/samples/seamEAR/ear/pom.xml
===================================================================
--- branches/3.1.x/samples/seamEAR/ear/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/seamEAR/ear/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -6,18 +6,18 @@
<groupId>org.richfaces.samples.seamEAR</groupId>
<artifactId>ear</artifactId>
<packaging>ear</packaging>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>ear assembly</name>
<parent>
<groupId>org.richfaces.samples</groupId>
<artifactId>seamEAR</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<dependencies>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<exclusions>
<exclusion>
<groupId>javax.faces</groupId>
Modified: tags/3.1.1-CR2/samples/seamEAR/ejbs/pom.xml
===================================================================
--- branches/3.1.x/samples/seamEAR/ejbs/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/seamEAR/ejbs/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -6,12 +6,12 @@
<groupId>org.richfaces.samples.seamEAR</groupId>
<artifactId>ejbs</artifactId>
<packaging>ejb</packaging>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>enterprise java beans</name>
<parent>
<groupId>org.richfaces.samples</groupId>
<artifactId>seamEAR</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<dependencies>
<dependency>
@@ -32,7 +32,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<exclusions>
<exclusion>
<groupId>javax.faces</groupId>
Modified: tags/3.1.1-CR2/samples/seamEAR/pom.xml
===================================================================
--- branches/3.1.x/samples/seamEAR/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/seamEAR/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -6,12 +6,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<artifactId>seamEAR</artifactId>
<packaging>pom</packaging>
<name>seam EAR project</name>
@@ -58,23 +58,23 @@
org.richfaces.samples.seamEAR.projects
</groupId>
<artifactId>logging</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples.seamEAR</groupId>
<artifactId>primary-source</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples.seamEAR.wars</groupId>
<artifactId>seamWebapp</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.richfaces.samples.seamEAR</groupId>
<artifactId>ejbs</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<type>ejb</type>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/samples/seamEAR/primary-source/pom.xml
===================================================================
--- branches/3.1.x/samples/seamEAR/primary-source/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/seamEAR/primary-source/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -7,7 +7,7 @@
<parent>
<groupId>org.richfaces.samples</groupId>
<artifactId>seamEAR</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<dependencies>
<dependency>
Modified: tags/3.1.1-CR2/samples/seamEAR/projects/logging/pom.xml
===================================================================
--- branches/3.1.x/samples/seamEAR/projects/logging/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/seamEAR/projects/logging/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -7,6 +7,6 @@
<parent>
<groupId>org.richfaces.samples.seamEAR</groupId>
<artifactId>projects</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
</project>
Modified: tags/3.1.1-CR2/samples/seamEAR/projects/pom.xml
===================================================================
--- branches/3.1.x/samples/seamEAR/projects/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/seamEAR/projects/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -1,14 +1,14 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples.seamEAR</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<artifactId>projects</artifactId>
<packaging>pom</packaging>
<name>sub projects</name>
<parent>
<groupId>org.richfaces.samples</groupId>
<artifactId>seamEAR</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modules>
<module>logging</module>
Modified: tags/3.1.1-CR2/samples/seamEAR/wars/pom.xml
===================================================================
--- branches/3.1.x/samples/seamEAR/wars/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/seamEAR/wars/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -4,11 +4,11 @@
<artifactId>wars</artifactId>
<packaging>pom</packaging>
<name>wars</name>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<parent>
<groupId>org.richfaces.samples</groupId>
<artifactId>seamEAR</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modules>
<module>seamWebapp</module>
Modified: tags/3.1.1-CR2/samples/seamEAR/wars/seamWebapp/pom.xml
===================================================================
--- branches/3.1.x/samples/seamEAR/wars/seamWebapp/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/seamEAR/wars/seamWebapp/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -10,7 +10,7 @@
<parent>
<groupId>org.richfaces.samples.seamEAR</groupId>
<artifactId>wars</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<build>
<finalName>seamWebapp</finalName>
@@ -42,17 +42,17 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: tags/3.1.1-CR2/samples/seamIntegration/pom.xml
===================================================================
--- branches/3.1.x/samples/seamIntegration/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/seamIntegration/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -5,14 +5,14 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>seamIntegration</artifactId>
<packaging>war</packaging>
<name>seamIntegration Maven Webapp</name>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<build>
<finalName>seamIntegration</finalName>
<plugins>
Modified: tags/3.1.1-CR2/samples/separator-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/separator-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/separator-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>separator-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<build>
@@ -17,12 +17,12 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>separator</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/simpleTogglePanel-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/simpleTogglePanel-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/simpleTogglePanel-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>simpleTogglePanel-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<build>
@@ -17,12 +17,12 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>simpleTogglePanel</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/skins/pom.xml
===================================================================
--- branches/3.1.x/samples/skins/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/skins/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
Modified: tags/3.1.1-CR2/samples/suggestionbox-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/suggestionbox-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/suggestionbox-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>suggestionbox-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>suggestionbox-sample Maven Webapp</name>
<build>
@@ -17,17 +17,17 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>suggestionbox</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/tabPanelDemo/pom.xml
===================================================================
--- branches/3.1.x/samples/tabPanelDemo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/tabPanelDemo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>tabPanelDemo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<build>
@@ -17,22 +17,22 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>tabPanel</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>core</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>panel</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/togglePanel-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/togglePanel-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/togglePanel-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>togglePanel-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<build>
@@ -17,17 +17,17 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>togglePanel</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>panel</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/tomahawkCompability/pom.xml
===================================================================
--- branches/3.1.x/samples/tomahawkCompability/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/tomahawkCompability/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>tomahawkCompability</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>tomahawkCompability Maven Webapp</name>
<properties>
Modified: tags/3.1.1-CR2/samples/toolBarDemo/pom.xml
===================================================================
--- branches/3.1.x/samples/toolBarDemo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/toolBarDemo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,12 +2,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>toolBarDemo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>webapp Maven Webapp</name>
<build>
@@ -17,12 +17,12 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>toolBar</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/samples/tooltip-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/tooltip-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/tooltip-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,24 +3,24 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>tooltip-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>tooltip-sample Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>tooltip</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/samples/tree-demo/pom.xml
===================================================================
--- branches/3.1.x/samples/tree-demo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/tree-demo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,29 +2,29 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>tree-demo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>tree-demo Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>tree</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>drag-drop</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<build>
Modified: tags/3.1.1-CR2/samples/treeModelDemo/pom.xml
===================================================================
--- branches/3.1.x/samples/treeModelDemo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/treeModelDemo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,24 +3,24 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>treeModelDemo</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>Tree Model Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>treeModel</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>tree</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<build>
Modified: tags/3.1.1-CR2/samples/useCases/pom.xml
===================================================================
--- branches/3.1.x/samples/useCases/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/useCases/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -5,12 +5,12 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>useCases</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>useCases Maven Webapp</name>
<build>
Modified: tags/3.1.1-CR2/samples/virtualEarth-sample/pom.xml
===================================================================
--- branches/3.1.x/samples/virtualEarth-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/samples/virtualEarth-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -4,19 +4,19 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.samples</groupId>
<artifactId>virtualEarth-sample</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<packaging>war</packaging>
<name>gmap-sample Maven Webapp</name>
<dependencies>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>virtualEarth</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
<build>
Modified: tags/3.1.1-CR2/sandbox/api/pom.xml
===================================================================
--- branches/3.1.x/sandbox/api/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/api/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,18 +2,18 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.sandbox</groupId>
<artifactId>richfaces-sandbox-api</artifactId>
<name>Richfaces Sandbox API</name>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<dependencies>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-api</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
Modified: tags/3.1.1-CR2/sandbox/impl/pom.xml
===================================================================
--- branches/3.1.x/sandbox/impl/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/impl/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,28 +2,28 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.sandbox</groupId>
<artifactId>richfaces-sandbox-impl</artifactId>
<name>Richfaces Sandbox Implementation</name>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<dependencies>
<dependency>
<groupId>org.richfaces.sandbox</groupId>
<artifactId>richfaces-sandbox-api</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-test</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
Modified: tags/3.1.1-CR2/sandbox/pom.xml
===================================================================
--- branches/3.1.x/sandbox/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>root</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
Modified: tags/3.1.1-CR2/sandbox/samples/dialog-window-sample/pom.xml
===================================================================
--- branches/3.1.x/sandbox/samples/dialog-window-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/samples/dialog-window-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces.sandbox</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -15,12 +15,12 @@
<dependency>
<groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>dialog-window</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/sandbox/samples/panel2-sample/pom.xml
===================================================================
--- branches/3.1.x/sandbox/samples/panel2-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/samples/panel2-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces.sandbox</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -15,12 +15,12 @@
<dependency>
<groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>panel2</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/sandbox/samples/pom.xml
===================================================================
--- branches/3.1.x/sandbox/samples/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/samples/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.richfaces</groupId>
<artifactId>samples</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: tags/3.1.1-CR2/sandbox/samples/rich-message-demo/pom.xml
===================================================================
--- branches/3.1.x/sandbox/samples/rich-message-demo/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/samples/rich-message-demo/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces.sandbox</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.demo</groupId>
@@ -13,17 +13,17 @@
<dependency>
<groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>message</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/sandbox/samples/simpleTogglePanel2-sample/pom.xml
===================================================================
--- branches/3.1.x/sandbox/samples/simpleTogglePanel2-sample/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/samples/simpleTogglePanel2-sample/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces.sandbox</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
@@ -16,12 +16,12 @@
<dependency>
<groupId>org.richfaces.sandbox.ui</groupId>
<artifactId>simpleTogglePanel2</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/sandbox/ui/dialog-window/pom.xml
===================================================================
--- branches/3.1.x/sandbox/ui/dialog-window/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/ui/dialog-window/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces.sandbox</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.sandbox.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -39,12 +39,12 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>core</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<scope>provided</scope>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/sandbox/ui/panel2/pom.xml
===================================================================
--- branches/3.1.x/sandbox/ui/panel2/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/ui/panel2/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces.sandbox</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.sandbox.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<id>generate-sources</id>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/sandbox/ui/pom.xml
===================================================================
--- branches/3.1.x/sandbox/ui/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/ui/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -3,7 +3,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.sandbox</groupId>
Modified: tags/3.1.1-CR2/sandbox/ui/simpleTogglePanel2/pom.xml
===================================================================
--- branches/3.1.x/sandbox/ui/simpleTogglePanel2/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/ui/simpleTogglePanel2/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces.sandbox</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.sandbox.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/sandbox/ui/state/pom.xml
===================================================================
--- branches/3.1.x/sandbox/ui/state/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/sandbox/ui/state/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces.sandbox</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -37,7 +37,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/test-applications/facelets/pom.xml
===================================================================
--- branches/3.1.x/test-applications/facelets/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/test-applications/facelets/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>test-applications</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: tags/3.1.1-CR2/test-applications/jsp/pom.xml
===================================================================
--- branches/3.1.x/test-applications/jsp/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/test-applications/jsp/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>test-applications</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: tags/3.1.1-CR2/test-applications/pom.xml
===================================================================
--- branches/3.1.x/test-applications/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/test-applications/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>samples</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<relativePath>../samples</relativePath>
</parent>
@@ -43,11 +43,11 @@
<groupId>org.richfaces</groupId>
<artifactId>test-applications</artifactId>
<packaging>pom</packaging>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>RichFaces Test Applications</name>
<properties>
- <rfVersion>3.1.1-SNAPSHOT</rfVersion>
+ <rfVersion>3.1.1-CR2</rfVersion>
</properties>
<modules>
Modified: tags/3.1.1-CR2/ui/assembly/pom.xml
===================================================================
--- branches/3.1.x/ui/assembly/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/assembly/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -14,7 +14,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<configuration>
<library>
<prefix>org.richfaces</prefix>
Modified: tags/3.1.1-CR2/ui/calendar/pom.xml
===================================================================
--- branches/3.1.x/ui/calendar/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/calendar/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<id>generate-sources</id>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/core/pom.xml
===================================================================
--- branches/3.1.x/ui/core/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/core/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
Modified: tags/3.1.1-CR2/ui/create.bat
===================================================================
--- branches/3.1.x/ui/create.bat 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/create.bat 2007-10-04 00:32:12 UTC (rev 3244)
@@ -1 +1 @@
-mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsf-component -DarchetypeVersion=3.1.1-SNAPSHOT -DgroupId=org.richfaces -DartifactId=%1
\ No newline at end of file
+mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsf-component -DarchetypeVersion=3.1.1-CR2 -DgroupId=org.richfaces -DartifactId=%1
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/create.sh
===================================================================
--- branches/3.1.x/ui/create.sh 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/create.sh 2007-10-04 00:32:12 UTC (rev 3244)
@@ -1,3 +1,3 @@
#!/bin/sh
mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsf-component \
- -DarchetypeVersion=3.1.1-SNAPSHOT -DgroupId=org.richfaces.ui -DartifactId=$1
+ -DarchetypeVersion=3.1.1-CR2 -DgroupId=org.richfaces.ui -DartifactId=$1
Modified: tags/3.1.1-CR2/ui/dataFilterSlider/pom.xml
===================================================================
--- branches/3.1.x/ui/dataFilterSlider/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/dataFilterSlider/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -14,7 +14,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/dataTable/pom.xml
===================================================================
--- branches/3.1.x/ui/dataTable/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/dataTable/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui-core</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
-->
</dependencies>
Modified: tags/3.1.1-CR2/ui/datascroller/pom.xml
===================================================================
--- branches/3.1.x/ui/datascroller/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/datascroller/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/drag-drop/pom.xml
===================================================================
--- branches/3.1.x/ui/drag-drop/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/drag-drop/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-ui-core</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
-->
</dependencies>
Modified: tags/3.1.1-CR2/ui/dropdown-menu/pom.xml
===================================================================
--- branches/3.1.x/ui/dropdown-menu/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/dropdown-menu/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,12 +44,12 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>menu-components</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/effect/pom.xml
===================================================================
--- branches/3.1.x/ui/effect/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/effect/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
Modified: tags/3.1.1-CR2/ui/gmap/pom.xml
===================================================================
--- branches/3.1.x/ui/gmap/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/gmap/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
Modified: tags/3.1.1-CR2/ui/inputnumber-slider/pom.xml
===================================================================
--- branches/3.1.x/ui/inputnumber-slider/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/inputnumber-slider/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
Modified: tags/3.1.1-CR2/ui/inputnumber-spinner/pom.xml
===================================================================
--- branches/3.1.x/ui/inputnumber-spinner/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/inputnumber-spinner/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<id>generate-sources</id>
Modified: tags/3.1.1-CR2/ui/insert/pom.xml
===================================================================
--- branches/3.1.x/ui/insert/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/insert/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
Modified: tags/3.1.1-CR2/ui/menu-components/pom.xml
===================================================================
--- branches/3.1.x/ui/menu-components/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/menu-components/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/message/pom.xml
===================================================================
--- branches/3.1.x/ui/message/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/message/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,19 +2,19 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
<artifactId>message</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>Message</name>
<build>
<plugins>
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/modal-panel/pom.xml
===================================================================
--- branches/3.1.x/ui/modal-panel/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/modal-panel/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
Modified: tags/3.1.1-CR2/ui/paint2D/pom.xml
===================================================================
--- branches/3.1.x/ui/paint2D/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/paint2D/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
Modified: tags/3.1.1-CR2/ui/panel/pom.xml
===================================================================
--- branches/3.1.x/ui/panel/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/panel/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<id>generate-sources</id>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/panelbar/pom.xml
===================================================================
--- branches/3.1.x/ui/panelbar/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/panelbar/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
Modified: tags/3.1.1-CR2/ui/panelmenu/pom.xml
===================================================================
--- branches/3.1.x/ui/panelmenu/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/panelmenu/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/pom.xml
===================================================================
--- branches/3.1.x/ui/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>root</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces</groupId>
@@ -129,12 +129,12 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-test</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<scope>test</scope>
</dependency>
<dependency>
Modified: tags/3.1.1-CR2/ui/scrollableDataTable/pom.xml
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/scrollableDataTable/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,19 +2,19 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
<artifactId>scrollableDataTable</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<name>Scrollable Data Table</name>
<build>
<plugins>
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -71,12 +71,12 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>dataTable</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified: tags/3.1.1-CR2/ui/separator/pom.xml
===================================================================
--- branches/3.1.x/ui/separator/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/separator/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<id>generate-sources</id>
Modified: tags/3.1.1-CR2/ui/simpleTogglePanel/pom.xml
===================================================================
--- branches/3.1.x/ui/simpleTogglePanel/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/simpleTogglePanel/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/spacer/pom.xml
===================================================================
--- branches/3.1.x/ui/spacer/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/spacer/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/suggestionbox/pom.xml
===================================================================
--- branches/3.1.x/ui/suggestionbox/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/suggestionbox/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/tabPanel/pom.xml
===================================================================
--- branches/3.1.x/ui/tabPanel/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/tabPanel/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/togglePanel/pom.xml
===================================================================
--- branches/3.1.x/ui/togglePanel/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/togglePanel/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/toolBar/pom.xml
===================================================================
--- branches/3.1.x/ui/toolBar/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/toolBar/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/tooltip/pom.xml
===================================================================
--- branches/3.1.x/ui/tooltip/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/tooltip/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -44,7 +44,7 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/tree/pom.xml
===================================================================
--- branches/3.1.x/ui/tree/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/tree/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>drag-drop</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/treeModel/pom.xml
===================================================================
--- branches/3.1.x/ui/treeModel/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/treeModel/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<id>generate-sources</id>
@@ -45,12 +45,12 @@
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>tree</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: tags/3.1.1-CR2/ui/virtualEarth/pom.xml
===================================================================
--- branches/3.1.x/ui/virtualEarth/pom.xml 2007-10-03 23:32:12 UTC (rev 3243)
+++ tags/3.1.1-CR2/ui/virtualEarth/pom.xml 2007-10-04 00:32:12 UTC (rev 3244)
@@ -2,7 +2,7 @@
<parent>
<artifactId>ui</artifactId>
<groupId>org.richfaces</groupId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.richfaces.ui</groupId>
@@ -13,7 +13,7 @@
<plugin>
<groupId>org.richfaces.cdk</groupId>
<artifactId>maven-cdk-plugin</artifactId>
- <version>3.1.1-SNAPSHOT</version>
+ <version>3.1.1-CR2</version>
<executions>
<execution>
<phase>generate-sources</phase>
17 years, 2 months
JBoss Rich Faces SVN: r3243 - in branches/3.1.x/samples/richfaces-demo/src/main: webapp/richfaces/effect and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-03 19:32:12 -0400 (Wed, 03 Oct 2007)
New Revision: 3243
Modified:
branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/attributes.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/snippets/usecases.html
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/usage.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/finalStep.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml
Log:
Merge demo from branch.
Modified: branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-10-03 23:01:14 UTC (rev 3242)
+++ branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-10-03 23:32:12 UTC (rev 3243)
@@ -26,7 +26,7 @@
panelBar= richOutputs, Panel Bar, /images/ico_PanelBar.gif, /images/cn_PanelBar.gif, RichFacesComponentsLibrary.html#panelBar, jbossrichfaces/freezone/docs/tlddoc/rich/panelBar.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIPanelBar.html, /richfaces/panelBar.jsf
modalPanel= richOutputs, Modal Panel, /images/ico_ModalPanel.gif, /images/cn_ModalPanel.gif, RichFacesComponentsLibrary.html#modalPanel, jbossrichfaces/freezone/docs/tlddoc/rich/modalPanel.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIModalPanel.html, /richfaces/modalPanel.jsf
togglePanel= richOutputs, Toggle Panel, /images/ico_TogglePanel.gif, /images/cn_TogglePanel.gif, RichFacesComponentsLibrary.html#togglePanel, jbossrichfaces/freezone/docs/tlddoc/rich/togglePanel.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UITogglePanel.html, /richfaces/togglePanel.jsf
-panelMenu= richOutputs, Panel Menu, /images/ico_panelMenu.gif, /images/cn_PanelMenu.gif, RichFacesComponentsLibrary.html#panelMenu, jbossrichfaces/freezone/docs/tlddoc/rich/panelMenu.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIPanelMenu.html, /richfaces/panelMenu.jsf
+panelMenu= richOutputs, Panel Menu, /images/ico_panelMenu.gif, /images/cn_PanelMenu.gif, RichFacesComponentsLibrary.html#panelMenu, jbossrichfaces/freezone/docs/tlddoc/rich/panelMenu.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIPanelMenu.html, /richfaces/panelMenu.jsf
suggestionBox= richInputs, Suggestion Box, /images/ico_SuggestionBox.gif, /images/cn_SuggestionBox.gif, RichFacesComponentsLibrary.html#suggestionbox, jbossrichfaces/freezone/docs/tlddoc/rich/suggestionbox.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UISuggestionBox.html, /richfaces/suggestionBox.jsf
dataTableScroller= richDataIterators, Data Table Scroller, /images/ico_DataTableScroller.gif, /images/cn_DataTableScroller.gif, RichFacesComponentsLibrary.html#datascroller, jbossrichfaces/freezone/docs/tlddoc/rich/datascroller.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDatascroller.html, /richfaces/dataTableScroller.jsf
dropDownMenu= richMenu, Drop Down Menu, /images/ico_dropDownMenu.gif, /images/cn_DropDownMenu.gif, RichFacesComponentsLibrary.html#dropDownMenu, jbossrichfaces/freezone/docs/tlddoc/rich/dropDownMenu.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIDropDownMenu.html, /richfaces/dropDownMenu.jsf
@@ -34,14 +34,14 @@
menuItem= richMenu, Menu Item, /images/ico_dropDownMenu.gif, /images/cn_MenuItem.gif, RichFacesComponentsLibrary.html#menuItem, jbossrichfaces/freezone/docs/tlddoc/rich/menuItem.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIMenuItem.html, /richfaces/dropDownMenu.jsf
menuSeparator= richMenu, Menu Separator, /images/ico_dropDownMenu.gif, /images/cn_MenuSeparator.gif, RichFacesComponentsLibrary.html#menuSeparator, jbossrichfaces/freezone/docs/tlddoc/rich/menuSeparator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIMenuSeparator.html, /richfaces/dropDownMenu.jsf
calendar= richInputs, Calendar, /images/ico_common.gif, /images/cn_Calendar.gif, RichFacesComponentsLibrary.html#calendar, jbossrichfaces/freezone/docs/tlddoc/rich/calendar.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UICalendar.html, /richfaces/calendar.jsf
-message= richMisc, Message, /images/ico_common.gif, /images/cn_Message.gif, RichFacesComponentsLibrary.html#message, jbossrichfaces/freezone/docs/tlddoc/rich/message.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIMessage.html, /richfaces/message.jsf
-messages= richMisc, Messages, /images/ico_common.gif, /images/cn_Messages.gif, RichFacesComponentsLibrary.html#messages, jbossrichfaces/freezone/docs/tlddoc/rich/messages.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIMessages.html, /richfaces/messages.jsf
+message= richMisc, Message, /images/ico_common.gif, /images/cn_Message.gif, RichFacesComponentsLibrary.html#message, jbossrichfaces/freezone/docs/tlddoc/rich/message.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIRichMessage.html, /richfaces/message.jsf
+messages= richMisc, Messages, /images/ico_common.gif, /images/cn_Messages.gif, RichFacesComponentsLibrary.html#messages, jbossrichfaces/freezone/docs/tlddoc/rich/messages.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIRichMessages.html, /richfaces/messages.jsf
virtualEarth= richMisc, Virtual Earth, /images/ico_VirtualEarth.gif, /images/cn_VirtualEarth.gif, RichFacesComponentsLibrary.html#virtualEarth, jbossrichfaces/freezone/docs/tlddoc/rich/virtualEarth.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIVirtualEarth.html, /richfaces/virtualEarth.jsf
-insert= richMisc, Insert, /images/ico_common.gif, /images/cn_insert.gif, RichFacesComponentsLibrary.html#insert, jbossrichfaces/freezone/docs/tlddoc/rich/insert.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIInsert.html, /richfaces/insert.jsf
-scrollableDataTable= richDataIterators, Scrollable Data Table, /images/ico_common.gif, /images/cn_ScrollableDataTable.gif, RichFacesComponentsLibrary.html#scrollableDataTable, jbossrichfaces/freezone/docs/tlddoc/rich/scrollableDataTable.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIScrollableDataTable.html, /richfaces/scrollableDataTable.jsf
-tree= richTree, Tree, /images/ico_Tree.gif, /images/cn_tree.gif, RichFacesComponentsLibrary.html#tree, jbossrichfaces/freezone/docs/tlddoc/rich/tree.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UITree.html, /richfaces/tree.jsf
-treeNodesAdaptor= richTree, Tree Adaptor, /images/ico_Tree.gif, /images/cn_treeNodesAdaptor.gif, RichFacesComponentsLibrary.html#treeNodesAdaptor, jbossrichfaces/freezone/docs/tlddoc/rich/treeNodesAdaptor.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UITreeNodesAdaptor.html, /richfaces/treeNodesAdaptor.jsf
-recursiveTreeNodesAdaptor= richTree, Recursive Tree Adaptor, /images/ico_Tree.gif, /images/cn_recursiveTreeNodesAdaptor.gif, RichFacesComponentsLibrary.html#recursiveTreeNodesAdaptor, jbossrichfaces/freezone/docs/tlddoc/rich/recursiveTreeNodesAdaptor.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIRecursiveTreeNodesAdaptor.html, /richfaces/treeNodesAdaptor.jsf
+insert= richMisc, Insert, /images/ico_common.gif, /images/cn_insert.gif, RichFacesComponentsLibrary.html#insert, jbossrichfaces/freezone/docs/tlddoc/rich/insert.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIInsert.html, /richfaces/insert.jsf
+scrollableDataTable= richDataIterators, Scrollable Data Table,/images/ico_common.gif, /images/cn_ScrollableDataTable.gif, RichFacesComponentsLibrary.html#scrollableDataTable, jbossrichfaces/freezone/docs/tlddoc/rich/scrollableDataTable.html,jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIScrollableDataTable.html, /richfaces/scrollableDataTable.jsf
+tree= richTree, Tree, /images/ico_Tree.gif, /images/cn_tree.gif, RichFacesComponentsLibrary.html#tree, jbossrichfaces/freezone/docs/tlddoc/rich/tree.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UITree.html, /richfaces/tree.jsf
+treeNodesAdaptor= richTree, Tree Adaptor, /images/ico_Tree.gif, /images/cn_treeNodesAdaptor.gif, RichFacesComponentsLibrary.html#treeNodesAdaptor, jbossrichfaces/freezone/docs/tlddoc/rich/treeNodesAdaptor.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UITreeNodesAdaptor.html, /richfaces/treeNodesAdaptor.jsf
+recursiveTreeNodesAdaptor= richTree, Recursive Tree Adaptor,/images/ico_Tree.gif, /images/cn_recursiveTreeNodesAdaptor.gif,RichFacesComponentsLibrary.html#recursiveTreeNodesAdaptor, jbossrichfaces/freezone/docs/tlddoc/rich/recursiveTreeNodesAdaptor.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIRecursiveTreeNodesAdaptor.html, /richfaces/treeNodesAdaptor.jsf
ajaxattributes= ajaxSupport, Ajax Attributes, /images/ico_common.gif, /images/cn_ajaxAttributes.gif, ArchitectureOverview.html, jbossajax4jsf/freezone/docs/tlddoc/overview-summary.html, jbossajax4jsf/freezone/docs/apidoc/overview-summary.html, /richfaces/ajaxAttributes.jsf
actionparam= ajaxSupport, Action Parameter, /images/ico_common.gif, /images/cn_actionParameter.gif, RichFacesComponentsLibrary.html#actionparam, jbossajax4jsf/freezone/docs/tlddoc/a4j/actionparam.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIActionParameter.html, /richfaces/actionparam.jsf
commandButton= ajaxSupport, Command Button, /images/ico_common.gif, /images/cn_commandButton.gif, RichFacesComponentsLibrary.html#commandButton, jbossajax4jsf/freezone/docs/tlddoc/a4j/commandButton.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxCommandButton.html, /richfaces/commandButton.jsf
@@ -66,4 +66,4 @@
log= ajaxMisc, Log, /images/ico_common.gif, /images/cn_Log.gif, RichFacesComponentsLibrary.html#log, jbossajax4jsf/freezone/docs/tlddoc/a4j/log.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxLog.html, /richfaces/log.jsf
page= ajaxMisc, Ajax Page, /images/ico_common.gif, /images/cn_AjaxPage.gif, RichFacesComponentsLibrary.html#page, jbossajax4jsf/freezone/docs/tlddoc/a4j/page.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxRegion.html, /richfaces/page.jsf
portlet= ajaxMisc, Ajax Portlet, /images/ico_common.gif, /images/cn_AjaxPortlet.gif, RichFacesComponentsLibrary.html#portlet, jbossajax4jsf/freezone/docs/tlddoc/a4j/portlet.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPortlet.html, /richfaces/portlet.jsf
-effect= richMisc, Effect, /images/ico_common.gif, /images/cn_Effect.gif, RichFacesComponentsLibrary.html#effect, jbossrichfaces/freezone/docs/tlddoc/effect.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIeffect.html, /richfaces/effect.jsf
+effect= richMisc, Effect, /images/ico_common.gif, /images/cn_Effect.gif, RichFacesComponentsLibrary.html#effect, jbossrichfaces/freezone/docs/tlddoc/rich/effect.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEffect.html, /richfaces/effect.jsf
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/attributes.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/attributes.xhtml 2007-10-03 23:01:14 UTC (rev 3242)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/attributes.xhtml 2007-10-03 23:32:12 UTC (rev 3243)
@@ -26,7 +26,7 @@
of the component if such component is found. If not, the value is left as is for
possible wiring with on the DOM element's id on the client side.<br/>
By default, the target of the effect is the same element that effect pointed to.
- However, the target element is might be overridden with 'effectId' option passed
+ However, the target element is might be overridden with 'targetId' option passed
with 'params' attribute of with function paramenter.
</p>
<p>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/snippets/usecases.html
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/snippets/usecases.html 2007-10-03 23:01:14 UTC (rev 3242)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/snippets/usecases.html 2007-10-03 23:32:12 UTC (rev 3243)
@@ -18,4 +18,4 @@
<!-- attaching to window on load and applying on particular page element -->
<rich:effect for="window" event="onload"
- type="Appear" params="id:'contentDiv',duration:0.8,from:0.3,to:1.0" />
\ No newline at end of file
+ type="Appear" params="targetId:'contentDiv',duration:0.8,from:0.3,to:1.0" />
\ No newline at end of file
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/usage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/usage.xhtml 2007-10-03 23:01:14 UTC (rev 3242)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/effect/usage.xhtml 2007-10-03 23:32:12 UTC (rev 3243)
@@ -11,7 +11,7 @@
<p>rich:effect utilizes the set of effects provided by scriptaculous javascript library. It
allows to attach effects to JSF components and html tags. For the reference of the available
effects and their parameters see the scriptaculous documentation and wiki. There are
- some of many possible effects available out-of-the-box:
+ <b>some of many</b> possible effects available out-of-the-box:
</p>
<div class="sample-container">
<ui:include src="/richfaces/effect/examples/diffTypes.xhtml" />
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/finalStep.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/finalStep.xhtml 2007-10-03 23:01:14 UTC (rev 3242)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/finalStep.xhtml 2007-10-03 23:32:12 UTC (rev 3243)
@@ -1,22 +1,26 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
-
- <h:panelGrid columns="2" columnClasses="wfcol1">
- <h:outputText value="First Name:" />
- <h:outputText value="#{profile.firstName}"/>
- <h:outputText value="Last Name:" />
- <h:outputText value="#{profile.lastName}"/>
- <h:outputText value="Company:" />
- <h:outputText value="#{profile.company}"/>
- <h:outputText value="Notes:" />
- <h:outputText value="#{profile.notes}"/>
-
-
- </h:panelGrid>
- <a4j:commandButton value="<<Previous" immediate="true" action="previous"/>
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
-</ui:composition>
\ No newline at end of file
+ <div style="position:relative;height:140px">
+ <h:panelGrid
+ columns="2" columnClasses="wfcol1">
+ <h:outputText value="First Name:" />
+ <h:outputText value="#{profile.firstName}" />
+ <h:outputText value="Last Name:" />
+ <h:outputText value="#{profile.lastName}" />
+ <h:outputText value="Company:" />
+ <h:outputText value="#{profile.company}" />
+ <h:outputText value="Notes:" />
+ <h:outputText value="#{profile.notes}" />
+ </h:panelGrid>
+ <div class="navPanel">
+ <a4j:commandButton value="<<Previous" style="float:left" immediate="true"
+ action="previous" />
+ </div>
+ </div>
+
+</ui:composition>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml 2007-10-03 23:01:14 UTC (rev 3242)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wizard.xhtml 2007-10-03 23:32:12 UTC (rev 3243)
@@ -15,6 +15,19 @@
.wfcol3 { vertical-align:top; }
.s1row td { height:30px; }
.rich-message { color:red; }
+
+ .navPanel {
+ position:absolute;
+ bottom:0;
+ height:23px;
+ margin:0;
+ padding:2px;
+ }
+
+ .navPanel input[type="button"] {
+ background-color: #{richSkin.additionalBackgroundColor};
+ }
+
</style>
<rich:separator height="1" style="padding:10px"/>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml 2007-10-03 23:01:14 UTC (rev 3242)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml 2007-10-03 23:32:12 UTC (rev 3243)
@@ -5,6 +5,7 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
+ <div style="position:relative;height:140px">
<h:panelGrid rowClasses="s1row" columns="3" columnClasses="wfcol1,wfcol2,wfcol3">
<h:outputText value="First Name:" />
<h:inputText id="fn" value="#{profile.firstName}" label="First Name" required="true" />
@@ -21,6 +22,8 @@
</h:panelGrid>
- <a4j:commandButton value="Next >>" action="next"/>
-
+ <div class="navPanel">
+ <a4j:commandButton value="Next >>" style="float:right" action="next"/>
+ </div>
+ </div>
</ui:composition>
\ No newline at end of file
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml 2007-10-03 23:01:14 UTC (rev 3242)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml 2007-10-03 23:32:12 UTC (rev 3243)
@@ -4,7 +4,8 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
-
+
+ <div style="position:relative;height:140px">
<h:panelGrid columns="3" columnClasses="wfcol1,wfcol2,wfcol3">
<h:outputText value="Notes:" />
<h:inputTextarea cols="20" rows="4" id="notes" value="#{profile.notes}" label="Notes" required="true" />
@@ -12,7 +13,11 @@
</h:panelGrid>
- <a4j:commandButton value="<<Previous" immediate="true" action="previous"/>
- <a4j:commandButton value="Next >>" action="next"/>
+ <div class="navPanel">
+ <a4j:commandButton value="<<Previous" style="float:left" immediate="true" action="previous"/>
+ <a4j:commandButton value="Next >>" style="float:right" action="next"/>
+ </div>
+
+ </div>
</ui:composition>
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3242 - trunk/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-03 19:01:14 -0400 (Wed, 03 Oct 2007)
New Revision: 3242
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
fix RF-1061
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-10-03 22:56:18 UTC (rev 3241)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-10-03 23:01:14 UTC (rev 3242)
@@ -15,6 +15,8 @@
*/
A4J.AJAX.XMLHttpRequest = function(query){
this._query = query;
+ // Store document element, to check page replacement.
+ this._documentElement = window.document.documentElement;
};
A4J.AJAX.XMLHttpRequest.prototype = {
@@ -28,7 +30,9 @@
_onerror : function(req,status,message) {
// Status not 200 - error !
// window.alert(message);
+ if(status !=599 && req.getResponseText()){
A4J.AJAX.replacePage(req);
+ }
},
onfinish : null,
options : {},
@@ -36,7 +40,7 @@
form : null,
_request : null,
_aborted : false,
-
+ _documentElement : null,
setRequestTimeout : function(timeout){
this._timeout = timeout;
},
@@ -47,6 +51,11 @@
this._request = new XMLHttpRequest();
var _this = this;
this._request.onreadystatechange = function(){
+ if(window.document.documentElement != _this._documentElement){
+ LOG.warn("Page for current request have been unloaded - abort processing" );
+ _this.abort();
+ return;
+ };
if(_this._aborted){return;};
LOG.debug("Reqest state : "+_this._request.readyState );
if (_this._request.readyState == 4 ) {
@@ -60,8 +69,8 @@
requestStatus = _this._request.status;
requestStatusText = _this._request.statusText;
} catch(e){
- LOG.error("request don't have status code - network problem");
- requestStatus = 501;
+ LOG.error("request don't have status code - network problem, "+e.message);
+ requestStatus = 599;
requestStatusText = "Network error";
}
if(requestStatus == 200){
@@ -151,7 +160,11 @@
}
},
getResponseText : function(){
- return this._request.responseText;
+ try {
+ return this._request.responseText;
+ } catch(e){
+ return null;
+ }
},
getError : function(){
return this._errorMessage;
@@ -308,7 +321,7 @@
try {
oldnode.innerHTML = "";
} catch(e){
- LOG.error("Error to clear node content by innerHTML");
+ LOG.error("Error to clear node content by innerHTML "+e.message);
Sarissa.clearChildNodes(oldnode);
}
oldnode.outerHTML = new XMLSerializer().serializeToString(newnode);
@@ -530,7 +543,7 @@
try {
domEvt = A4J.AJAX.CloneObject(evt,false);
} catch(e){
- LOG.warn("Exception on clone event");
+ LOG.warn("Exception on clone event "+e.name +":"+e.message);
}
LOG.debug("Have Event "+domEvt+" with properties: target: "+domEvt.target+", srcElement: "+domEvt.srcElement+", type: "+domEvt.type);
}
@@ -784,6 +797,10 @@
A4J.AJAX.replacePage = function(req){
+ if(!req.getResponseText()){
+ LOG.warn("No content in response for replace current page");
+ return;
+ }
LOG.debug("replace all page content with response");
var isIE = _SARISSA_IS_IE;
// maksimkaszynski
17 years, 2 months
JBoss Rich Faces SVN: r3241 - in branches/3.1.x/framework/impl: src/main/javascript and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-10-03 18:56:18 -0400 (Wed, 03 Oct 2007)
New Revision: 3241
Added:
branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/
branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/builder.js
branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/controls.js
branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/dragdrop.js
branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/effects.js
branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/slider.js
branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/sound.js
branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/unittest.js
Removed:
branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous/
Modified:
branches/3.1.x/framework/impl/generatescript.xml
branches/3.1.x/framework/impl/src/main/resources/META-INF/resources-config.xml
Log:
resources-config.xml for scriptaculous
Modified: branches/3.1.x/framework/impl/generatescript.xml
===================================================================
--- branches/3.1.x/framework/impl/generatescript.xml 2007-10-03 22:44:27 UTC (rev 3240)
+++ branches/3.1.x/framework/impl/generatescript.xml 2007-10-03 22:56:18 UTC (rev 3241)
@@ -14,6 +14,7 @@
<property name="scripts-path" value="org/ajax4jsf/javascript/scripts"></property>
<property name="prototype-scripts-path" value="org/ajax4jsf/javascript/scripts"></property>
+ <property name="scriptaculous-scripts-path" value="org/richfaces/renderkit/html/scripts/scriptaculous"></property>
<property name="target-dir" value="${project.build.directory}/javascript"></property>
@@ -27,6 +28,9 @@
<property name="script.rico" value="rico.js"></property>
<property name="script.aculo" value="scriptaculo.js"></property>
+ <property name="script.scriptaculous" value="scriptaculous.js"></property>
+ <property name="scriptaculous.scripts.dir"
+ value="${target-dir}/${scriptaculous-scripts-path}"/>
<property name="script.prototype" value="prototype.js"></property>
@@ -40,23 +44,26 @@
files="empty.js,base.js,string.js,enumerable.js,array.js,hash.js,range.js"
>
-->
- <filelist id="prototype"
- dir="${basedir}/src/main/javascript/prototype"
- files="prototype1.5.1.1.js,patches.js"
- >
+ <filelist id="scriptaculous"
+ dir="${basedir}/src/main/javascript/scriptaculous"
+ files="builder.js,effects.js,dragdrop.js,controls.js,slider.js,sound.js" >
</filelist>
+
+ <filelist id="prototype"
+ dir="${basedir}/src/main/javascript/prototype"
+ files="prototype1.5.1.1.js,patches.js">
+ </filelist>
+
<filelist id="prototype.extend"
dir="${basedir}/src/main/javascript/prototype"
- files="dom.js,form.js,event.js,position.js,patches.js"
- >
+ files="dom.js,form.js,event.js,position.js,patches.js">
</filelist>
<filelist id="dnd"
dir="${basedir}/src/main/javascript/dnd"
- files="prolog.js,dnd.js,epilog.js"
- >
+ files="prolog.js,dnd.js,epilog.js">
</filelist>
<filelist id="ajaxjsf" dir="${basedir}/src/main/javascript/ajaxjsf" files="prolog.js,sarissa.js,JSFAJAX.js,log4ajax.js,epilog.js"></filelist>
@@ -96,15 +103,25 @@
binary="false"
destfile="${prototype.scripts.dir}/${script.prototype}"
fixlastline="yes"
- eol="unix"
- >
- <filelist refid="prototype">
- </filelist>
- <!-- filelist refid="prototype.extend">
- </filelist -->
+ eol="unix">
+ <filelist refid="prototype">
+ </filelist>
</concat>
- <copy todir="${prototype.scripts.dir}" file="${basedir}/src/main/javascript/ajaxjsf/smartposition.js">
+ <concat append="false"
+ binary="false"
+ destfile="${scriptaculous.scripts.dir}/${script.scriptaculous}"
+ fixlastline="yes"
+ eol="unix"
+ >
+ <filelist refid="scriptaculous"></filelist>
+ </concat>
+
+
+ <copy todir="${prototype.scripts.dir}" file="${basedir}/src/main/javascript/ajaxjsf/smartposition.js">
</copy>
+ <copy todir="${scriptaculous.scripts.dir}">
+ <fileset dir="${basedir}/src/main/javascript/scriptaculous"></fileset>
+ </copy>
</target>
Added: branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/builder.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/builder.js (rev 0)
+++ branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/builder.js 2007-10-03 22:56:18 UTC (rev 3241)
@@ -0,0 +1,136 @@
+// script.aculo.us builder.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+var Builder = {
+ NODEMAP: {
+ AREA: 'map',
+ CAPTION: 'table',
+ COL: 'table',
+ COLGROUP: 'table',
+ LEGEND: 'fieldset',
+ OPTGROUP: 'select',
+ OPTION: 'select',
+ PARAM: 'object',
+ TBODY: 'table',
+ TD: 'table',
+ TFOOT: 'table',
+ TH: 'table',
+ THEAD: 'table',
+ TR: 'table'
+ },
+ // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
+ // due to a Firefox bug
+ node: function(elementName) {
+ elementName = elementName.toUpperCase();
+
+ // try innerHTML approach
+ var parentTag = this.NODEMAP[elementName] || 'div';
+ var parentElement = document.createElement(parentTag);
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
+ parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
+ } catch(e) {}
+ var element = parentElement.firstChild || null;
+
+ // see if browser added wrapping tags
+ if(element && (element.tagName.toUpperCase() != elementName))
+ element = element.getElementsByTagName(elementName)[0];
+
+ // fallback to createElement approach
+ if(!element) element = document.createElement(elementName);
+
+ // abort if nothing could be created
+ if(!element) return;
+
+ // attributes (or text)
+ if(arguments[1])
+ if(this._isStringOrNumber(arguments[1]) ||
+ (arguments[1] instanceof Array) ||
+ arguments[1].tagName) {
+ this._children(element, arguments[1]);
+ } else {
+ var attrs = this._attributes(arguments[1]);
+ if(attrs.length) {
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
+ parentElement.innerHTML = "<" +elementName + " " +
+ attrs + "></" + elementName + ">";
+ } catch(e) {}
+ element = parentElement.firstChild || null;
+ // workaround firefox 1.0.X bug
+ if(!element) {
+ element = document.createElement(elementName);
+ for(attr in arguments[1])
+ element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
+ }
+ if(element.tagName.toUpperCase() != elementName)
+ element = parentElement.getElementsByTagName(elementName)[0];
+ }
+ }
+
+ // text, or array of children
+ if(arguments[2])
+ this._children(element, arguments[2]);
+
+ return element;
+ },
+ _text: function(text) {
+ return document.createTextNode(text);
+ },
+
+ ATTR_MAP: {
+ 'className': 'class',
+ 'htmlFor': 'for'
+ },
+
+ _attributes: function(attributes) {
+ var attrs = [];
+ for(attribute in attributes)
+ attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
+ '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"');
+ return attrs.join(" ");
+ },
+ _children: function(element, children) {
+ if(children.tagName) {
+ element.appendChild(children);
+ return;
+ }
+ if(typeof children=='object') { // array can hold nodes and text
+ children.flatten().each( function(e) {
+ if(typeof e=='object')
+ element.appendChild(e)
+ else
+ if(Builder._isStringOrNumber(e))
+ element.appendChild(Builder._text(e));
+ });
+ } else
+ if(Builder._isStringOrNumber(children))
+ element.appendChild(Builder._text(children));
+ },
+ _isStringOrNumber: function(param) {
+ return(typeof param=='string' || typeof param=='number');
+ },
+ build: function(html) {
+ var element = this.node('div');
+ $(element).update(html.strip());
+ return element.down();
+ },
+ dump: function(scope) {
+ if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
+
+ var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
+ "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
+ "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
+ "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
+ "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
+ "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
+
+ tags.each( function(tag){
+ scope[tag] = function() {
+ return Builder.node.apply(Builder, [tag].concat($A(arguments)));
+ }
+ });
+ }
+}
Added: branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/controls.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/controls.js (rev 0)
+++ branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/controls.js 2007-10-03 22:56:18 UTC (rev 3241)
@@ -0,0 +1,875 @@
+// script.aculo.us controls.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// (c) 2005-2007 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
+// (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
+// Contributors:
+// Richard Livsey
+// Rahul Bhargava
+// Rob Wills
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// Autocompleter.Base handles all the autocompletion functionality
+// that's independent of the data source for autocompletion. This
+// includes drawing the autocompletion menu, observing keyboard
+// and mouse events, and similar.
+//
+// Specific autocompleters need to provide, at the very least,
+// a getUpdatedChoices function that will be invoked every time
+// the text inside the monitored textbox changes. This method
+// should get the text for which to provide autocompletion by
+// invoking this.getToken(), NOT by directly accessing
+// this.element.value. This is to allow incremental tokenized
+// autocompletion. Specific auto-completion logic (AJAX, etc)
+// belongs in getUpdatedChoices.
+//
+// Tokenized incremental autocompletion is enabled automatically
+// when an autocompleter is instantiated with the 'tokens' option
+// in the options parameter, e.g.:
+// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
+// will incrementally autocomplete with a comma as the token.
+// Additionally, ',' in the above example can be replaced with
+// a token array, e.g. { tokens: [',', '\n'] } which
+// enables autocompletion on multiple tokens. This is most
+// useful when one of the tokens is \n (a newline), as it
+// allows smart autocompletion after linebreaks.
+
+if(typeof Effect == 'undefined')
+ throw("controls.js requires including script.aculo.us' effects.js library");
+
+var Autocompleter = {}
+Autocompleter.Base = function() {};
+Autocompleter.Base.prototype = {
+ baseInitialize: function(element, update, options) {
+ element = $(element)
+ this.element = element;
+ this.update = $(update);
+ this.hasFocus = false;
+ this.changed = false;
+ this.active = false;
+ this.index = 0;
+ this.entryCount = 0;
+
+ if(this.setOptions)
+ this.setOptions(options);
+ else
+ this.options = options || {};
+
+ this.options.paramName = this.options.paramName || this.element.name;
+ this.options.tokens = this.options.tokens || [];
+ this.options.frequency = this.options.frequency || 0.4;
+ this.options.minChars = this.options.minChars || 1;
+ this.options.onShow = this.options.onShow ||
+ function(element, update){
+ if(!update.style.position || update.style.position=='absolute') {
+ update.style.position = 'absolute';
+ Position.clone(element, update, {
+ setHeight: false,
+ offsetTop: element.offsetHeight
+ });
+ }
+ Effect.Appear(update,{duration:0.15});
+ };
+ this.options.onHide = this.options.onHide ||
+ function(element, update){ new Effect.Fade(update,{duration:0.15}) };
+
+ if(typeof(this.options.tokens) == 'string')
+ this.options.tokens = new Array(this.options.tokens);
+
+ this.observer = null;
+
+ this.element.setAttribute('autocomplete','off');
+
+ Element.hide(this.update);
+
+ Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this));
+ Event.observe(this.element, 'keypress', this.onKeyPress.bindAsEventListener(this));
+
+ // Turn autocomplete back on when the user leaves the page, so that the
+ // field's value will be remembered on Mozilla-based browsers.
+ Event.observe(window, 'beforeunload', function(){
+ element.setAttribute('autocomplete', 'on');
+ });
+ },
+
+ show: function() {
+ if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
+ if(!this.iefix &&
+ (Prototype.Browser.IE) &&
+ (Element.getStyle(this.update, 'position')=='absolute')) {
+ new Insertion.After(this.update,
+ '<iframe id="' + this.update.id + '_iefix" '+
+ 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' +
+ 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
+ this.iefix = $(this.update.id+'_iefix');
+ }
+ if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
+ },
+
+ fixIEOverlapping: function() {
+ Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
+ this.iefix.style.zIndex = 1;
+ this.update.style.zIndex = 2;
+ Element.show(this.iefix);
+ },
+
+ hide: function() {
+ this.stopIndicator();
+ if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
+ if(this.iefix) Element.hide(this.iefix);
+ },
+
+ startIndicator: function() {
+ if(this.options.indicator) Element.show(this.options.indicator);
+ },
+
+ stopIndicator: function() {
+ if(this.options.indicator) Element.hide(this.options.indicator);
+ },
+
+ onKeyPress: function(event) {
+ if(this.active)
+ switch(event.keyCode) {
+ case Event.KEY_TAB:
+ case Event.KEY_RETURN:
+ this.selectEntry();
+ Event.stop(event);
+ case Event.KEY_ESC:
+ this.hide();
+ this.active = false;
+ Event.stop(event);
+ return;
+ case Event.KEY_LEFT:
+ case Event.KEY_RIGHT:
+ return;
+ case Event.KEY_UP:
+ this.markPrevious();
+ this.render();
+ if(Prototype.Browser.WebKit) Event.stop(event);
+ return;
+ case Event.KEY_DOWN:
+ this.markNext();
+ this.render();
+ if(Prototype.Browser.WebKit) Event.stop(event);
+ return;
+ }
+ else
+ if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
+ (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return;
+
+ this.changed = true;
+ this.hasFocus = true;
+
+ if(this.observer) clearTimeout(this.observer);
+ this.observer =
+ setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
+ },
+
+ activate: function() {
+ this.changed = false;
+ this.hasFocus = true;
+ this.getUpdatedChoices();
+ },
+
+ onHover: function(event) {
+ var element = Event.findElement(event, 'LI');
+ if(this.index != element.autocompleteIndex)
+ {
+ this.index = element.autocompleteIndex;
+ this.render();
+ }
+ Event.stop(event);
+ },
+
+ onClick: function(event) {
+ var element = Event.findElement(event, 'LI');
+ this.index = element.autocompleteIndex;
+ this.selectEntry();
+ this.hide();
+ },
+
+ onBlur: function(event) {
+ // needed to make click events working
+ setTimeout(this.hide.bind(this), 250);
+ this.hasFocus = false;
+ this.active = false;
+ },
+
+ render: function() {
+ if(this.entryCount > 0) {
+ for (var i = 0; i < this.entryCount; i++)
+ this.index==i ?
+ Element.addClassName(this.getEntry(i),"selected") :
+ Element.removeClassName(this.getEntry(i),"selected");
+ if(this.hasFocus) {
+ this.show();
+ this.active = true;
+ }
+ } else {
+ this.active = false;
+ this.hide();
+ }
+ },
+
+ markPrevious: function() {
+ if(this.index > 0) this.index--
+ else this.index = this.entryCount-1;
+ this.getEntry(this.index).scrollIntoView(true);
+ },
+
+ markNext: function() {
+ if(this.index < this.entryCount-1) this.index++
+ else this.index = 0;
+ this.getEntry(this.index).scrollIntoView(false);
+ },
+
+ getEntry: function(index) {
+ return this.update.firstChild.childNodes[index];
+ },
+
+ getCurrentEntry: function() {
+ return this.getEntry(this.index);
+ },
+
+ selectEntry: function() {
+ this.active = false;
+ this.updateElement(this.getCurrentEntry());
+ },
+
+ updateElement: function(selectedElement) {
+ if (this.options.updateElement) {
+ this.options.updateElement(selectedElement);
+ return;
+ }
+ var value = '';
+ if (this.options.select) {
+ var nodes = document.getElementsByClassName(this.options.select, selectedElement) || [];
+ if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
+ } else
+ value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
+
+ var lastTokenPos = this.findLastToken();
+ if (lastTokenPos != -1) {
+ var newValue = this.element.value.substr(0, lastTokenPos + 1);
+ var whitespace = this.element.value.substr(lastTokenPos + 1).match(/^\s+/);
+ if (whitespace)
+ newValue += whitespace[0];
+ this.element.value = newValue + value;
+ } else {
+ this.element.value = value;
+ }
+ this.element.focus();
+
+ if (this.options.afterUpdateElement)
+ this.options.afterUpdateElement(this.element, selectedElement);
+ },
+
+ updateChoices: function(choices) {
+ if(!this.changed && this.hasFocus) {
+ this.update.innerHTML = choices;
+ Element.cleanWhitespace(this.update);
+ Element.cleanWhitespace(this.update.down());
+
+ if(this.update.firstChild && this.update.down().childNodes) {
+ this.entryCount =
+ this.update.down().childNodes.length;
+ for (var i = 0; i < this.entryCount; i++) {
+ var entry = this.getEntry(i);
+ entry.autocompleteIndex = i;
+ this.addObservers(entry);
+ }
+ } else {
+ this.entryCount = 0;
+ }
+
+ this.stopIndicator();
+ this.index = 0;
+
+ if(this.entryCount==1 && this.options.autoSelect) {
+ this.selectEntry();
+ this.hide();
+ } else {
+ this.render();
+ }
+ }
+ },
+
+ addObservers: function(element) {
+ Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
+ Event.observe(element, "click", this.onClick.bindAsEventListener(this));
+ },
+
+ onObserverEvent: function() {
+ this.changed = false;
+ if(this.getToken().length>=this.options.minChars) {
+ this.getUpdatedChoices();
+ } else {
+ this.active = false;
+ this.hide();
+ }
+ },
+
+ getToken: function() {
+ var tokenPos = this.findLastToken();
+ if (tokenPos != -1)
+ var ret = this.element.value.substr(tokenPos + 1).replace(/^\s+/,'').replace(/\s+$/,'');
+ else
+ var ret = this.element.value;
+
+ return /\n/.test(ret) ? '' : ret;
+ },
+
+ findLastToken: function() {
+ var lastTokenPos = -1;
+
+ for (var i=0; i<this.options.tokens.length; i++) {
+ var thisTokenPos = this.element.value.lastIndexOf(this.options.tokens[i]);
+ if (thisTokenPos > lastTokenPos)
+ lastTokenPos = thisTokenPos;
+ }
+ return lastTokenPos;
+ }
+}
+
+Ajax.Autocompleter = Class.create();
+Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), {
+ initialize: function(element, update, url, options) {
+ this.baseInitialize(element, update, options);
+ this.options.asynchronous = true;
+ this.options.onComplete = this.onComplete.bind(this);
+ this.options.defaultParams = this.options.parameters || null;
+ this.url = url;
+ },
+
+ getUpdatedChoices: function() {
+ this.startIndicator();
+
+ var entry = encodeURIComponent(this.options.paramName) + '=' +
+ encodeURIComponent(this.getToken());
+
+ this.options.parameters = this.options.callback ?
+ this.options.callback(this.element, entry) : entry;
+
+ if(this.options.defaultParams)
+ this.options.parameters += '&' + this.options.defaultParams;
+
+ new Ajax.Request(this.url, this.options);
+ },
+
+ onComplete: function(request) {
+ this.updateChoices(request.responseText);
+ }
+
+});
+
+// The local array autocompleter. Used when you'd prefer to
+// inject an array of autocompletion options into the page, rather
+// than sending out Ajax queries, which can be quite slow sometimes.
+//
+// The constructor takes four parameters. The first two are, as usual,
+// the id of the monitored textbox, and id of the autocompletion menu.
+// The third is the array you want to autocomplete from, and the fourth
+// is the options block.
+//
+// Extra local autocompletion options:
+// - choices - How many autocompletion choices to offer
+//
+// - partialSearch - If false, the autocompleter will match entered
+// text only at the beginning of strings in the
+// autocomplete array. Defaults to true, which will
+// match text at the beginning of any *word* in the
+// strings in the autocomplete array. If you want to
+// search anywhere in the string, additionally set
+// the option fullSearch to true (default: off).
+//
+// - fullSsearch - Search anywhere in autocomplete array strings.
+//
+// - partialChars - How many characters to enter before triggering
+// a partial match (unlike minChars, which defines
+// how many characters are required to do any match
+// at all). Defaults to 2.
+//
+// - ignoreCase - Whether to ignore case when autocompleting.
+// Defaults to true.
+//
+// It's possible to pass in a custom function as the 'selector'
+// option, if you prefer to write your own autocompletion logic.
+// In that case, the other options above will not apply unless
+// you support them.
+
+Autocompleter.Local = Class.create();
+Autocompleter.Local.prototype = Object.extend(new Autocompleter.Base(), {
+ initialize: function(element, update, array, options) {
+ this.baseInitialize(element, update, options);
+ this.options.array = array;
+ },
+
+ getUpdatedChoices: function() {
+ this.updateChoices(this.options.selector(this));
+ },
+
+ setOptions: function(options) {
+ this.options = Object.extend({
+ choices: 10,
+ partialSearch: true,
+ partialChars: 2,
+ ignoreCase: true,
+ fullSearch: false,
+ selector: function(instance) {
+ var ret = []; // Beginning matches
+ var partial = []; // Inside matches
+ var entry = instance.getToken();
+ var count = 0;
+
+ for (var i = 0; i < instance.options.array.length &&
+ ret.length < instance.options.choices ; i++) {
+
+ var elem = instance.options.array[i];
+ var foundPos = instance.options.ignoreCase ?
+ elem.toLowerCase().indexOf(entry.toLowerCase()) :
+ elem.indexOf(entry);
+
+ while (foundPos != -1) {
+ if (foundPos == 0 && elem.length != entry.length) {
+ ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" +
+ elem.substr(entry.length) + "</li>");
+ break;
+ } else if (entry.length >= instance.options.partialChars &&
+ instance.options.partialSearch && foundPos != -1) {
+ if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
+ partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" +
+ elem.substr(foundPos, entry.length) + "</strong>" + elem.substr(
+ foundPos + entry.length) + "</li>");
+ break;
+ }
+ }
+
+ foundPos = instance.options.ignoreCase ?
+ elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) :
+ elem.indexOf(entry, foundPos + 1);
+
+ }
+ }
+ if (partial.length)
+ ret = ret.concat(partial.slice(0, instance.options.choices - ret.length))
+ return "<ul>" + ret.join('') + "</ul>";
+ }
+ }, options || {});
+ }
+});
+
+// AJAX in-place editor
+//
+// see documentation on http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor
+
+// Use this if you notice weird scrolling problems on some browsers,
+// the DOM might be a bit confused when this gets called so do this
+// waits 1 ms (with setTimeout) until it does the activation
+Field.scrollFreeActivate = function(field) {
+ setTimeout(function() {
+ Field.activate(field);
+ }, 1);
+}
+
+Ajax.InPlaceEditor = Class.create();
+Ajax.InPlaceEditor.defaultHighlightColor = "#FFFF99";
+Ajax.InPlaceEditor.prototype = {
+ initialize: function(element, url, options) {
+ this.url = url;
+ this.element = $(element);
+
+ this.options = Object.extend({
+ paramName: "value",
+ okButton: true,
+ okLink: false,
+ okText: "ok",
+ cancelButton: false,
+ cancelLink: true,
+ cancelText: "cancel",
+ textBeforeControls: '',
+ textBetweenControls: '',
+ textAfterControls: '',
+ savingText: "Saving...",
+ clickToEditText: "Click to edit",
+ okText: "ok",
+ rows: 1,
+ onComplete: function(transport, element) {
+ new Effect.Highlight(element, {startcolor: this.options.highlightcolor});
+ },
+ onFailure: function(transport) {
+ alert("Error communicating with the server: " + transport.responseText.stripTags());
+ },
+ callback: function(form) {
+ return Form.serialize(form);
+ },
+ handleLineBreaks: true,
+ loadingText: 'Loading...',
+ savingClassName: 'inplaceeditor-saving',
+ loadingClassName: 'inplaceeditor-loading',
+ formClassName: 'inplaceeditor-form',
+ highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor,
+ highlightendcolor: "#FFFFFF",
+ externalControl: null,
+ submitOnBlur: false,
+ ajaxOptions: {},
+ evalScripts: false
+ }, options || {});
+
+ if(!this.options.formId && this.element.id) {
+ this.options.formId = this.element.id + "-inplaceeditor";
+ if ($(this.options.formId)) {
+ // there's already a form with that name, don't specify an id
+ this.options.formId = null;
+ }
+ }
+
+ if (this.options.externalControl) {
+ this.options.externalControl = $(this.options.externalControl);
+ }
+
+ this.originalBackground = Element.getStyle(this.element, 'background-color');
+ if (!this.originalBackground) {
+ this.originalBackground = "transparent";
+ }
+
+ this.element.title = this.options.clickToEditText;
+
+ this.onclickListener = this.enterEditMode.bindAsEventListener(this);
+ this.mouseoverListener = this.enterHover.bindAsEventListener(this);
+ this.mouseoutListener = this.leaveHover.bindAsEventListener(this);
+ Event.observe(this.element, 'click', this.onclickListener);
+ Event.observe(this.element, 'mouseover', this.mouseoverListener);
+ Event.observe(this.element, 'mouseout', this.mouseoutListener);
+ if (this.options.externalControl) {
+ Event.observe(this.options.externalControl, 'click', this.onclickListener);
+ Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener);
+ Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener);
+ }
+ },
+ enterEditMode: function(evt) {
+ if (this.saving) return;
+ if (this.editing) return;
+ this.editing = true;
+ this.onEnterEditMode();
+ if (this.options.externalControl) {
+ Element.hide(this.options.externalControl);
+ }
+ Element.hide(this.element);
+ this.createForm();
+ this.element.parentNode.insertBefore(this.form, this.element);
+ if (!this.options.loadTextURL) Field.scrollFreeActivate(this.editField);
+ // stop the event to avoid a page refresh in Safari
+ if (evt) {
+ Event.stop(evt);
+ }
+ return false;
+ },
+ createForm: function() {
+ this.form = document.createElement("form");
+ this.form.id = this.options.formId;
+ Element.addClassName(this.form, this.options.formClassName)
+ this.form.onsubmit = this.onSubmit.bind(this);
+
+ this.createEditField();
+
+ if (this.options.textarea) {
+ var br = document.createElement("br");
+ this.form.appendChild(br);
+ }
+
+ if (this.options.textBeforeControls)
+ this.form.appendChild(document.createTextNode(this.options.textBeforeControls));
+
+ if (this.options.okButton) {
+ var okButton = document.createElement("input");
+ okButton.type = "submit";
+ okButton.value = this.options.okText;
+ okButton.className = 'editor_ok_button';
+ this.form.appendChild(okButton);
+ }
+
+ if (this.options.okLink) {
+ var okLink = document.createElement("a");
+ okLink.href = "#";
+ okLink.appendChild(document.createTextNode(this.options.okText));
+ okLink.onclick = this.onSubmit.bind(this);
+ okLink.className = 'editor_ok_link';
+ this.form.appendChild(okLink);
+ }
+
+ if (this.options.textBetweenControls &&
+ (this.options.okLink || this.options.okButton) &&
+ (this.options.cancelLink || this.options.cancelButton))
+ this.form.appendChild(document.createTextNode(this.options.textBetweenControls));
+
+ if (this.options.cancelButton) {
+ var cancelButton = document.createElement("input");
+ cancelButton.type = "submit";
+ cancelButton.value = this.options.cancelText;
+ cancelButton.onclick = this.onclickCancel.bind(this);
+ cancelButton.className = 'editor_cancel_button';
+ this.form.appendChild(cancelButton);
+ }
+
+ if (this.options.cancelLink) {
+ var cancelLink = document.createElement("a");
+ cancelLink.href = "#";
+ cancelLink.appendChild(document.createTextNode(this.options.cancelText));
+ cancelLink.onclick = this.onclickCancel.bind(this);
+ cancelLink.className = 'editor_cancel editor_cancel_link';
+ this.form.appendChild(cancelLink);
+ }
+
+ if (this.options.textAfterControls)
+ this.form.appendChild(document.createTextNode(this.options.textAfterControls));
+ },
+ hasHTMLLineBreaks: function(string) {
+ if (!this.options.handleLineBreaks) return false;
+ return string.match(/<br/i) || string.match(/<p>/i);
+ },
+ convertHTMLLineBreaks: function(string) {
+ return string.replace(/<br>/gi, "\n").replace(/<br\/>/gi, "\n").replace(/<\/p>/gi, "\n").replace(/<p>/gi, "");
+ },
+ createEditField: function() {
+ var text;
+ if(this.options.loadTextURL) {
+ text = this.options.loadingText;
+ } else {
+ text = this.getText();
+ }
+
+ var obj = this;
+
+ if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) {
+ this.options.textarea = false;
+ var textField = document.createElement("input");
+ textField.obj = this;
+ textField.type = "text";
+ textField.name = this.options.paramName;
+ textField.value = text;
+ textField.style.backgroundColor = this.options.highlightcolor;
+ textField.className = 'editor_field';
+ var size = this.options.size || this.options.cols || 0;
+ if (size != 0) textField.size = size;
+ if (this.options.submitOnBlur)
+ textField.onblur = this.onSubmit.bind(this);
+ this.editField = textField;
+ } else {
+ this.options.textarea = true;
+ var textArea = document.createElement("textarea");
+ textArea.obj = this;
+ textArea.name = this.options.paramName;
+ textArea.value = this.convertHTMLLineBreaks(text);
+ textArea.rows = this.options.rows;
+ textArea.cols = this.options.cols || 40;
+ textArea.className = 'editor_field';
+ if (this.options.submitOnBlur)
+ textArea.onblur = this.onSubmit.bind(this);
+ this.editField = textArea;
+ }
+
+ if(this.options.loadTextURL) {
+ this.loadExternalText();
+ }
+ this.form.appendChild(this.editField);
+ },
+ getText: function() {
+ return this.element.innerHTML;
+ },
+ loadExternalText: function() {
+ Element.addClassName(this.form, this.options.loadingClassName);
+ this.editField.disabled = true;
+ new Ajax.Request(
+ this.options.loadTextURL,
+ Object.extend({
+ asynchronous: true,
+ onComplete: this.onLoadedExternalText.bind(this)
+ }, this.options.ajaxOptions)
+ );
+ },
+ onLoadedExternalText: function(transport) {
+ Element.removeClassName(this.form, this.options.loadingClassName);
+ this.editField.disabled = false;
+ this.editField.value = transport.responseText.stripTags();
+ Field.scrollFreeActivate(this.editField);
+ },
+ onclickCancel: function() {
+ this.onComplete();
+ this.leaveEditMode();
+ return false;
+ },
+ onFailure: function(transport) {
+ this.options.onFailure(transport);
+ if (this.oldInnerHTML) {
+ this.element.innerHTML = this.oldInnerHTML;
+ this.oldInnerHTML = null;
+ }
+ return false;
+ },
+ onSubmit: function() {
+ // onLoading resets these so we need to save them away for the Ajax call
+ var form = this.form;
+ var value = this.editField.value;
+
+ // do this first, sometimes the ajax call returns before we get a chance to switch on Saving...
+ // which means this will actually switch on Saving... *after* we've left edit mode causing Saving...
+ // to be displayed indefinitely
+ this.onLoading();
+
+ if (this.options.evalScripts) {
+ new Ajax.Request(
+ this.url, Object.extend({
+ parameters: this.options.callback(form, value),
+ onComplete: this.onComplete.bind(this),
+ onFailure: this.onFailure.bind(this),
+ asynchronous:true,
+ evalScripts:true
+ }, this.options.ajaxOptions));
+ } else {
+ new Ajax.Updater(
+ { success: this.element,
+ // don't update on failure (this could be an option)
+ failure: null },
+ this.url, Object.extend({
+ parameters: this.options.callback(form, value),
+ onComplete: this.onComplete.bind(this),
+ onFailure: this.onFailure.bind(this)
+ }, this.options.ajaxOptions));
+ }
+ // stop the event to avoid a page refresh in Safari
+ if (arguments.length > 1) {
+ Event.stop(arguments[0]);
+ }
+ return false;
+ },
+ onLoading: function() {
+ this.saving = true;
+ this.removeForm();
+ this.leaveHover();
+ this.showSaving();
+ },
+ showSaving: function() {
+ this.oldInnerHTML = this.element.innerHTML;
+ this.element.innerHTML = this.options.savingText;
+ Element.addClassName(this.element, this.options.savingClassName);
+ this.element.style.backgroundColor = this.originalBackground;
+ Element.show(this.element);
+ },
+ removeForm: function() {
+ if(this.form) {
+ if (this.form.parentNode) Element.remove(this.form);
+ this.form = null;
+ }
+ },
+ enterHover: function() {
+ if (this.saving) return;
+ this.element.style.backgroundColor = this.options.highlightcolor;
+ if (this.effect) {
+ this.effect.cancel();
+ }
+ Element.addClassName(this.element, this.options.hoverClassName)
+ },
+ leaveHover: function() {
+ if (this.options.backgroundColor) {
+ this.element.style.backgroundColor = this.oldBackground;
+ }
+ Element.removeClassName(this.element, this.options.hoverClassName)
+ if (this.saving) return;
+ this.effect = new Effect.Highlight(this.element, {
+ startcolor: this.options.highlightcolor,
+ endcolor: this.options.highlightendcolor,
+ restorecolor: this.originalBackground
+ });
+ },
+ leaveEditMode: function() {
+ Element.removeClassName(this.element, this.options.savingClassName);
+ this.removeForm();
+ this.leaveHover();
+ this.element.style.backgroundColor = this.originalBackground;
+ Element.show(this.element);
+ if (this.options.externalControl) {
+ Element.show(this.options.externalControl);
+ }
+ this.editing = false;
+ this.saving = false;
+ this.oldInnerHTML = null;
+ this.onLeaveEditMode();
+ },
+ onComplete: function(transport) {
+ this.leaveEditMode();
+ this.options.onComplete.bind(this)(transport, this.element);
+ },
+ onEnterEditMode: function() {},
+ onLeaveEditMode: function() {},
+ dispose: function() {
+ if (this.oldInnerHTML) {
+ this.element.innerHTML = this.oldInnerHTML;
+ }
+ this.leaveEditMode();
+ Event.stopObserving(this.element, 'click', this.onclickListener);
+ Event.stopObserving(this.element, 'mouseover', this.mouseoverListener);
+ Event.stopObserving(this.element, 'mouseout', this.mouseoutListener);
+ if (this.options.externalControl) {
+ Event.stopObserving(this.options.externalControl, 'click', this.onclickListener);
+ Event.stopObserving(this.options.externalControl, 'mouseover', this.mouseoverListener);
+ Event.stopObserving(this.options.externalControl, 'mouseout', this.mouseoutListener);
+ }
+ }
+};
+
+Ajax.InPlaceCollectionEditor = Class.create();
+Object.extend(Ajax.InPlaceCollectionEditor.prototype, Ajax.InPlaceEditor.prototype);
+Object.extend(Ajax.InPlaceCollectionEditor.prototype, {
+ createEditField: function() {
+ if (!this.cached_selectTag) {
+ var selectTag = document.createElement("select");
+ var collection = this.options.collection || [];
+ var optionTag;
+ collection.each(function(e,i) {
+ optionTag = document.createElement("option");
+ optionTag.value = (e instanceof Array) ? e[0] : e;
+ if((typeof this.options.value == 'undefined') &&
+ ((e instanceof Array) ? this.element.innerHTML == e[1] : e == optionTag.value)) optionTag.selected = true;
+ if(this.options.value==optionTag.value) optionTag.selected = true;
+ optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e));
+ selectTag.appendChild(optionTag);
+ }.bind(this));
+ this.cached_selectTag = selectTag;
+ }
+
+ this.editField = this.cached_selectTag;
+ if(this.options.loadTextURL) this.loadExternalText();
+ this.form.appendChild(this.editField);
+ this.options.callback = function(form, value) {
+ return "value=" + encodeURIComponent(value);
+ }
+ }
+});
+
+// Delayed observer, like Form.Element.Observer,
+// but waits for delay after last key input
+// Ideal for live-search fields
+
+Form.Element.DelayedObserver = Class.create();
+Form.Element.DelayedObserver.prototype = {
+ initialize: function(element, delay, callback) {
+ this.delay = delay || 0.5;
+ this.element = $(element);
+ this.callback = callback;
+ this.timer = null;
+ this.lastValue = $F(this.element);
+ Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this));
+ },
+ delayedListener: function(event) {
+ if(this.lastValue == $F(this.element)) return;
+ if(this.timer) clearTimeout(this.timer);
+ this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);
+ this.lastValue = $F(this.element);
+ },
+ onTimerEvent: function() {
+ this.timer = null;
+ this.callback(this.element, $F(this.element));
+ }
+};
Added: branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/dragdrop.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/dragdrop.js (rev 0)
+++ branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/dragdrop.js 2007-10-03 22:56:18 UTC (rev 3241)
@@ -0,0 +1,970 @@
+// script.aculo.us dragdrop.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi(a)oriontransfer.co.nz)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+if(typeof Effect == 'undefined')
+ throw("dragdrop.js requires including script.aculo.us' effects.js library");
+
+var Droppables = {
+ drops: [],
+
+ remove: function(element) {
+ this.drops = this.drops.reject(function(d) { return d.element==$(element) });
+ },
+
+ add: function(element) {
+ element = $(element);
+ var options = Object.extend({
+ greedy: true,
+ hoverclass: null,
+ tree: false
+ }, arguments[1] || {});
+
+ // cache containers
+ if(options.containment) {
+ options._containers = [];
+ var containment = options.containment;
+ if((typeof containment == 'object') &&
+ (containment.constructor == Array)) {
+ containment.each( function(c) { options._containers.push($(c)) });
+ } else {
+ options._containers.push($(containment));
+ }
+ }
+
+ if(options.accept) options.accept = [options.accept].flatten();
+
+ Element.makePositioned(element); // fix IE
+ options.element = element;
+
+ this.drops.push(options);
+ },
+
+ findDeepestChild: function(drops) {
+ deepest = drops[0];
+
+ for (i = 1; i < drops.length; ++i)
+ if (Element.isParent(drops[i].element, deepest.element))
+ deepest = drops[i];
+
+ return deepest;
+ },
+
+ isContained: function(element, drop) {
+ var containmentNode;
+ if(drop.tree) {
+ containmentNode = element.treeNode;
+ } else {
+ containmentNode = element.parentNode;
+ }
+ return drop._containers.detect(function(c) { return containmentNode == c });
+ },
+
+ isAffected: function(point, element, drop) {
+ return (
+ (drop.element!=element) &&
+ ((!drop._containers) ||
+ this.isContained(element, drop)) &&
+ ((!drop.accept) ||
+ (Element.classNames(element).detect(
+ function(v) { return drop.accept.include(v) } ) )) &&
+ Position.within(drop.element, point[0], point[1]) );
+ },
+
+ deactivate: function(drop) {
+ if(drop.hoverclass)
+ Element.removeClassName(drop.element, drop.hoverclass);
+ this.last_active = null;
+ },
+
+ activate: function(drop) {
+ if(drop.hoverclass)
+ Element.addClassName(drop.element, drop.hoverclass);
+ this.last_active = drop;
+ },
+
+ show: function(point, element) {
+ if(!this.drops.length) return;
+ var affected = [];
+
+ if(this.last_active) this.deactivate(this.last_active);
+ this.drops.each( function(drop) {
+ if(Droppables.isAffected(point, element, drop))
+ affected.push(drop);
+ });
+
+ if(affected.length>0) {
+ drop = Droppables.findDeepestChild(affected);
+ Position.within(drop.element, point[0], point[1]);
+ if(drop.onHover)
+ drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
+
+ Droppables.activate(drop);
+ }
+ },
+
+ fire: function(event, element) {
+ if(!this.last_active) return;
+ Position.prepare();
+
+ if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
+ if (this.last_active.onDrop) {
+ this.last_active.onDrop(element, this.last_active.element, event);
+ return true;
+ }
+ },
+
+ reset: function() {
+ if(this.last_active)
+ this.deactivate(this.last_active);
+ }
+}
+
+var Draggables = {
+ drags: [],
+ observers: [],
+
+ register: function(draggable) {
+ if(this.drags.length == 0) {
+ this.eventMouseUp = this.endDrag.bindAsEventListener(this);
+ this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
+ this.eventKeypress = this.keyPress.bindAsEventListener(this);
+
+ Event.observe(document, "mouseup", this.eventMouseUp);
+ Event.observe(document, "mousemove", this.eventMouseMove);
+ Event.observe(document, "keypress", this.eventKeypress);
+ }
+ this.drags.push(draggable);
+ },
+
+ unregister: function(draggable) {
+ this.drags = this.drags.reject(function(d) { return d==draggable });
+ if(this.drags.length == 0) {
+ Event.stopObserving(document, "mouseup", this.eventMouseUp);
+ Event.stopObserving(document, "mousemove", this.eventMouseMove);
+ Event.stopObserving(document, "keypress", this.eventKeypress);
+ }
+ },
+
+ activate: function(draggable) {
+ if(draggable.options.delay) {
+ this._timeout = setTimeout(function() {
+ Draggables._timeout = null;
+ window.focus();
+ Draggables.activeDraggable = draggable;
+ }.bind(this), draggable.options.delay);
+ } else {
+ window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
+ this.activeDraggable = draggable;
+ }
+ },
+
+ deactivate: function() {
+ this.activeDraggable = null;
+ },
+
+ updateDrag: function(event) {
+ if(!this.activeDraggable) return;
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ // Mozilla-based browsers fire successive mousemove events with
+ // the same coordinates, prevent needless redrawing (moz bug?)
+ if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
+ this._lastPointer = pointer;
+
+ this.activeDraggable.updateDrag(event, pointer);
+ },
+
+ endDrag: function(event) {
+ if(this._timeout) {
+ clearTimeout(this._timeout);
+ this._timeout = null;
+ }
+ if(!this.activeDraggable) return;
+ this._lastPointer = null;
+ this.activeDraggable.endDrag(event);
+ this.activeDraggable = null;
+ },
+
+ keyPress: function(event) {
+ if(this.activeDraggable)
+ this.activeDraggable.keyPress(event);
+ },
+
+ addObserver: function(observer) {
+ this.observers.push(observer);
+ this._cacheObserverCallbacks();
+ },
+
+ removeObserver: function(element) { // element instead of observer fixes mem leaks
+ this.observers = this.observers.reject( function(o) { return o.element==element });
+ this._cacheObserverCallbacks();
+ },
+
+ notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag'
+ if(this[eventName+'Count'] > 0)
+ this.observers.each( function(o) {
+ if(o[eventName]) o[eventName](eventName, draggable, event);
+ });
+ if(draggable.options[eventName]) draggable.options[eventName](draggable, event);
+ },
+
+ _cacheObserverCallbacks: function() {
+ ['onStart','onEnd','onDrag'].each( function(eventName) {
+ Draggables[eventName+'Count'] = Draggables.observers.select(
+ function(o) { return o[eventName]; }
+ ).length;
+ });
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Draggable = Class.create();
+Draggable._dragging = {};
+
+Draggable.prototype = {
+ initialize: function(element) {
+ var defaults = {
+ handle: false,
+ reverteffect: function(element, top_offset, left_offset) {
+ var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
+ new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur,
+ queue: {scope:'_draggable', position:'end'}
+ });
+ },
+ endeffect: function(element) {
+ var toOpacity = typeof element._opacity == 'number' ? element._opacity : 1.0;
+ new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity,
+ queue: {scope:'_draggable', position:'end'},
+ afterFinish: function(){
+ Draggable._dragging[element] = false
+ }
+ });
+ },
+ zindex: 1000,
+ revert: false,
+ quiet: false,
+ scroll: false,
+ scrollSensitivity: 20,
+ scrollSpeed: 15,
+ snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] }
+ delay: 0
+ };
+
+ if(!arguments[1] || typeof arguments[1].endeffect == 'undefined')
+ Object.extend(defaults, {
+ starteffect: function(element) {
+ element._opacity = Element.getOpacity(element);
+ Draggable._dragging[element] = true;
+ new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7});
+ }
+ });
+
+ var options = Object.extend(defaults, arguments[1] || {});
+
+ this.element = $(element);
+
+ if(options.handle && (typeof options.handle == 'string'))
+ this.handle = this.element.down('.'+options.handle, 0);
+
+ if(!this.handle) this.handle = $(options.handle);
+ if(!this.handle) this.handle = this.element;
+
+ if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {
+ options.scroll = $(options.scroll);
+ this._isScrollChild = Element.childOf(this.element, options.scroll);
+ }
+
+ Element.makePositioned(this.element); // fix IE
+
+ this.delta = this.currentDelta();
+ this.options = options;
+ this.dragging = false;
+
+ this.eventMouseDown = this.initDrag.bindAsEventListener(this);
+ Event.observe(this.handle, "mousedown", this.eventMouseDown);
+
+ Draggables.register(this);
+ },
+
+ destroy: function() {
+ Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
+ Draggables.unregister(this);
+ },
+
+ currentDelta: function() {
+ return([
+ parseInt(Element.getStyle(this.element,'left') || '0'),
+ parseInt(Element.getStyle(this.element,'top') || '0')]);
+ },
+
+ initDrag: function(event) {
+ if(typeof Draggable._dragging[this.element] != 'undefined' &&
+ Draggable._dragging[this.element]) return;
+ if(Event.isLeftClick(event)) {
+ // abort on form elements, fixes a Firefox issue
+ var src = Event.element(event);
+ if((tag_name = src.tagName.toUpperCase()) && (
+ tag_name=='INPUT' ||
+ tag_name=='SELECT' ||
+ tag_name=='OPTION' ||
+ tag_name=='BUTTON' ||
+ tag_name=='TEXTAREA')) return;
+
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ var pos = Position.cumulativeOffset(this.element);
+ this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
+
+ Draggables.activate(this);
+ Event.stop(event);
+ }
+ },
+
+ startDrag: function(event) {
+ this.dragging = true;
+
+ if(this.options.zindex) {
+ this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
+ this.element.style.zIndex = this.options.zindex;
+ }
+
+ if(this.options.ghosting) {
+ this._clone = this.element.cloneNode(true);
+ Position.absolutize(this.element);
+ this.element.parentNode.insertBefore(this._clone, this.element);
+ }
+
+ if(this.options.scroll) {
+ if (this.options.scroll == window) {
+ var where = this._getWindowScroll(this.options.scroll);
+ this.originalScrollLeft = where.left;
+ this.originalScrollTop = where.top;
+ } else {
+ this.originalScrollLeft = this.options.scroll.scrollLeft;
+ this.originalScrollTop = this.options.scroll.scrollTop;
+ }
+ }
+
+ Draggables.notify('onStart', this, event);
+
+ if(this.options.starteffect) this.options.starteffect(this.element);
+ },
+
+ updateDrag: function(event, pointer) {
+ if(!this.dragging) this.startDrag(event);
+
+ if(!this.options.quiet){
+ Position.prepare();
+ Droppables.show(pointer, this.element);
+ }
+
+ Draggables.notify('onDrag', this, event);
+
+ this.draw(pointer);
+ if(this.options.change) this.options.change(this);
+
+ if(this.options.scroll) {
+ this.stopScrolling();
+
+ var p;
+ if (this.options.scroll == window) {
+ with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
+ } else {
+ p = Position.page(this.options.scroll);
+ p[0] += this.options.scroll.scrollLeft + Position.deltaX;
+ p[1] += this.options.scroll.scrollTop + Position.deltaY;
+ p.push(p[0]+this.options.scroll.offsetWidth);
+ p.push(p[1]+this.options.scroll.offsetHeight);
+ }
+ var speed = [0,0];
+ if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity);
+ if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity);
+ if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity);
+ if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity);
+ this.startScrolling(speed);
+ }
+
+ // fix AppleWebKit rendering
+ if(Prototype.Browser.WebKit) window.scrollBy(0,0);
+
+ Event.stop(event);
+ },
+
+ finishDrag: function(event, success) {
+ this.dragging = false;
+
+ if(this.options.quiet){
+ Position.prepare();
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ Droppables.show(pointer, this.element);
+ }
+
+ if(this.options.ghosting) {
+ Position.relativize(this.element);
+ Element.remove(this._clone);
+ this._clone = null;
+ }
+
+ var dropped = false;
+ if(success) {
+ dropped = Droppables.fire(event, this.element);
+ if (!dropped) dropped = false;
+ }
+ if(dropped && this.options.onDropped) this.options.onDropped(this.element);
+ Draggables.notify('onEnd', this, event);
+
+ var revert = this.options.revert;
+ if(revert && typeof revert == 'function') revert = revert(this.element);
+
+ var d = this.currentDelta();
+ if(revert && this.options.reverteffect) {
+ if (dropped == 0 || revert != 'failure')
+ this.options.reverteffect(this.element,
+ d[1]-this.delta[1], d[0]-this.delta[0]);
+ } else {
+ this.delta = d;
+ }
+
+ if(this.options.zindex)
+ this.element.style.zIndex = this.originalZ;
+
+ if(this.options.endeffect)
+ this.options.endeffect(this.element);
+
+ Draggables.deactivate(this);
+ Droppables.reset();
+ },
+
+ keyPress: function(event) {
+ if(event.keyCode!=Event.KEY_ESC) return;
+ this.finishDrag(event, false);
+ Event.stop(event);
+ },
+
+ endDrag: function(event) {
+ if(!this.dragging) return;
+ this.stopScrolling();
+ this.finishDrag(event, true);
+ Event.stop(event);
+ },
+
+ draw: function(point) {
+ var pos = Position.cumulativeOffset(this.element);
+ if(this.options.ghosting) {
+ var r = Position.realOffset(this.element);
+ pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
+ }
+
+ var d = this.currentDelta();
+ pos[0] -= d[0]; pos[1] -= d[1];
+
+ if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
+ pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
+ pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
+ }
+
+ var p = [0,1].map(function(i){
+ return (point[i]-pos[i]-this.offset[i])
+ }.bind(this));
+
+ if(this.options.snap) {
+ if(typeof this.options.snap == 'function') {
+ p = this.options.snap(p[0],p[1],this);
+ } else {
+ if(this.options.snap instanceof Array) {
+ p = p.map( function(v, i) {
+ return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this))
+ } else {
+ p = p.map( function(v) {
+ return Math.round(v/this.options.snap)*this.options.snap }.bind(this))
+ }
+ }}
+
+ var style = this.element.style;
+ if((!this.options.constraint) || (this.options.constraint=='horizontal'))
+ style.left = p[0] + "px";
+ if((!this.options.constraint) || (this.options.constraint=='vertical'))
+ style.top = p[1] + "px";
+
+ if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
+ },
+
+ stopScrolling: function() {
+ if(this.scrollInterval) {
+ clearInterval(this.scrollInterval);
+ this.scrollInterval = null;
+ Draggables._lastScrollPointer = null;
+ }
+ },
+
+ startScrolling: function(speed) {
+ if(!(speed[0] || speed[1])) return;
+ this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];
+ this.lastScrolled = new Date();
+ this.scrollInterval = setInterval(this.scroll.bind(this), 10);
+ },
+
+ scroll: function() {
+ var current = new Date();
+ var delta = current - this.lastScrolled;
+ this.lastScrolled = current;
+ if(this.options.scroll == window) {
+ with (this._getWindowScroll(this.options.scroll)) {
+ if (this.scrollSpeed[0] || this.scrollSpeed[1]) {
+ var d = delta / 1000;
+ this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] );
+ }
+ }
+ } else {
+ this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;
+ this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000;
+ }
+
+ Position.prepare();
+ Droppables.show(Draggables._lastPointer, this.element);
+ Draggables.notify('onDrag', this);
+ if (this._isScrollChild) {
+ Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer);
+ Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000;
+ Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000;
+ if (Draggables._lastScrollPointer[0] < 0)
+ Draggables._lastScrollPointer[0] = 0;
+ if (Draggables._lastScrollPointer[1] < 0)
+ Draggables._lastScrollPointer[1] = 0;
+ this.draw(Draggables._lastScrollPointer);
+ }
+
+ if(this.options.change) this.options.change(this);
+ },
+
+ _getWindowScroll: function(w) {
+ var T, L, W, H;
+ with (w.document) {
+ if (w.document.documentElement && documentElement.scrollTop) {
+ T = documentElement.scrollTop;
+ L = documentElement.scrollLeft;
+ } else if (w.document.body) {
+ T = body.scrollTop;
+ L = body.scrollLeft;
+ }
+ if (w.innerWidth) {
+ W = w.innerWidth;
+ H = w.innerHeight;
+ } else if (w.document.documentElement && documentElement.clientWidth) {
+ W = documentElement.clientWidth;
+ H = documentElement.clientHeight;
+ } else {
+ W = body.offsetWidth;
+ H = body.offsetHeight
+ }
+ }
+ return { top: T, left: L, width: W, height: H };
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var SortableObserver = Class.create();
+SortableObserver.prototype = {
+ initialize: function(element, observer) {
+ this.element = $(element);
+ this.observer = observer;
+ this.lastValue = Sortable.serialize(this.element);
+ },
+
+ onStart: function() {
+ this.lastValue = Sortable.serialize(this.element);
+ },
+
+ onEnd: function() {
+ Sortable.unmark();
+ if(this.lastValue != Sortable.serialize(this.element))
+ this.observer(this.element)
+ }
+}
+
+var Sortable = {
+ SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,
+
+ sortables: {},
+
+ _findRootElement: function(element) {
+ while (element.tagName.toUpperCase() != "BODY") {
+ if(element.id && Sortable.sortables[element.id]) return element;
+ element = element.parentNode;
+ }
+ },
+
+ options: function(element) {
+ element = Sortable._findRootElement($(element));
+ if(!element) return;
+ return Sortable.sortables[element.id];
+ },
+
+ destroy: function(element){
+ var s = Sortable.options(element);
+
+ if(s) {
+ Draggables.removeObserver(s.element);
+ s.droppables.each(function(d){ Droppables.remove(d) });
+ s.draggables.invoke('destroy');
+
+ delete Sortable.sortables[s.element.id];
+ }
+ },
+
+ create: function(element) {
+ element = $(element);
+ var options = Object.extend({
+ element: element,
+ tag: 'li', // assumes li children, override with tag: 'tagname'
+ dropOnEmpty: false,
+ tree: false,
+ treeTag: 'ul',
+ overlap: 'vertical', // one of 'vertical', 'horizontal'
+ constraint: 'vertical', // one of 'vertical', 'horizontal', false
+ containment: element, // also takes array of elements (or id's); or false
+ handle: false, // or a CSS class
+ only: false,
+ delay: 0,
+ hoverclass: null,
+ ghosting: false,
+ quiet: false,
+ scroll: false,
+ scrollSensitivity: 20,
+ scrollSpeed: 15,
+ format: this.SERIALIZE_RULE,
+
+ // these take arrays of elements or ids and can be
+ // used for better initialization performance
+ elements: false,
+ handles: false,
+
+ onChange: Prototype.emptyFunction,
+ onUpdate: Prototype.emptyFunction
+ }, arguments[1] || {});
+
+ // clear any old sortable with same element
+ this.destroy(element);
+
+ // build options for the draggables
+ var options_for_draggable = {
+ revert: true,
+ quiet: options.quiet,
+ scroll: options.scroll,
+ scrollSpeed: options.scrollSpeed,
+ scrollSensitivity: options.scrollSensitivity,
+ delay: options.delay,
+ ghosting: options.ghosting,
+ constraint: options.constraint,
+ handle: options.handle };
+
+ if(options.starteffect)
+ options_for_draggable.starteffect = options.starteffect;
+
+ if(options.reverteffect)
+ options_for_draggable.reverteffect = options.reverteffect;
+ else
+ if(options.ghosting) options_for_draggable.reverteffect = function(element) {
+ element.style.top = 0;
+ element.style.left = 0;
+ };
+
+ if(options.endeffect)
+ options_for_draggable.endeffect = options.endeffect;
+
+ if(options.zindex)
+ options_for_draggable.zindex = options.zindex;
+
+ // build options for the droppables
+ var options_for_droppable = {
+ overlap: options.overlap,
+ containment: options.containment,
+ tree: options.tree,
+ hoverclass: options.hoverclass,
+ onHover: Sortable.onHover
+ }
+
+ var options_for_tree = {
+ onHover: Sortable.onEmptyHover,
+ overlap: options.overlap,
+ containment: options.containment,
+ hoverclass: options.hoverclass
+ }
+
+ // fix for gecko engine
+ Element.cleanWhitespace(element);
+
+ options.draggables = [];
+ options.droppables = [];
+
+ // drop on empty handling
+ if(options.dropOnEmpty || options.tree) {
+ Droppables.add(element, options_for_tree);
+ options.droppables.push(element);
+ }
+
+ (options.elements || this.findElements(element, options) || []).each( function(e,i) {
+ var handle = options.handles ? $(options.handles[i]) :
+ (options.handle ? $(e).getElementsByClassName(options.handle)[0] : e);
+ options.draggables.push(
+ new Draggable(e, Object.extend(options_for_draggable, { handle: handle })));
+ Droppables.add(e, options_for_droppable);
+ if(options.tree) e.treeNode = element;
+ options.droppables.push(e);
+ });
+
+ if(options.tree) {
+ (Sortable.findTreeElements(element, options) || []).each( function(e) {
+ Droppables.add(e, options_for_tree);
+ e.treeNode = element;
+ options.droppables.push(e);
+ });
+ }
+
+ // keep reference
+ this.sortables[element.id] = options;
+
+ // for onupdate
+ Draggables.addObserver(new SortableObserver(element, options.onUpdate));
+
+ },
+
+ // return all suitable-for-sortable elements in a guaranteed order
+ findElements: function(element, options) {
+ return Element.findChildren(
+ element, options.only, options.tree ? true : false, options.tag);
+ },
+
+ findTreeElements: function(element, options) {
+ return Element.findChildren(
+ element, options.only, options.tree ? true : false, options.treeTag);
+ },
+
+ onHover: function(element, dropon, overlap) {
+ if(Element.isParent(dropon, element)) return;
+
+ if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) {
+ return;
+ } else if(overlap>0.5) {
+ Sortable.mark(dropon, 'before');
+ if(dropon.previousSibling != element) {
+ var oldParentNode = element.parentNode;
+ element.style.visibility = "hidden"; // fix gecko rendering
+ dropon.parentNode.insertBefore(element, dropon);
+ if(dropon.parentNode!=oldParentNode)
+ Sortable.options(oldParentNode).onChange(element);
+ Sortable.options(dropon.parentNode).onChange(element);
+ }
+ } else {
+ Sortable.mark(dropon, 'after');
+ var nextElement = dropon.nextSibling || null;
+ if(nextElement != element) {
+ var oldParentNode = element.parentNode;
+ element.style.visibility = "hidden"; // fix gecko rendering
+ dropon.parentNode.insertBefore(element, nextElement);
+ if(dropon.parentNode!=oldParentNode)
+ Sortable.options(oldParentNode).onChange(element);
+ Sortable.options(dropon.parentNode).onChange(element);
+ }
+ }
+ },
+
+ onEmptyHover: function(element, dropon, overlap) {
+ var oldParentNode = element.parentNode;
+ var droponOptions = Sortable.options(dropon);
+
+ if(!Element.isParent(dropon, element)) {
+ var index;
+
+ var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only});
+ var child = null;
+
+ if(children) {
+ var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap);
+
+ for (index = 0; index < children.length; index += 1) {
+ if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) {
+ offset -= Element.offsetSize (children[index], droponOptions.overlap);
+ } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) {
+ child = index + 1 < children.length ? children[index + 1] : null;
+ break;
+ } else {
+ child = children[index];
+ break;
+ }
+ }
+ }
+
+ dropon.insertBefore(element, child);
+
+ Sortable.options(oldParentNode).onChange(element);
+ droponOptions.onChange(element);
+ }
+ },
+
+ unmark: function() {
+ if(Sortable._marker) Sortable._marker.hide();
+ },
+
+ mark: function(dropon, position) {
+ // mark on ghosting only
+ var sortable = Sortable.options(dropon.parentNode);
+ if(sortable && !sortable.ghosting) return;
+
+ if(!Sortable._marker) {
+ Sortable._marker =
+ ($('dropmarker') || Element.extend(document.createElement('DIV'))).
+ hide().addClassName('dropmarker').setStyle({position:'absolute'});
+ document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
+ }
+ var offsets = Position.cumulativeOffset(dropon);
+ Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
+
+ if(position=='after')
+ if(sortable.overlap == 'horizontal')
+ Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'});
+ else
+ Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'});
+
+ Sortable._marker.show();
+ },
+
+ _tree: function(element, options, parent) {
+ var children = Sortable.findElements(element, options) || [];
+
+ for (var i = 0; i < children.length; ++i) {
+ var match = children[i].id.match(options.format);
+
+ if (!match) continue;
+
+ var child = {
+ id: encodeURIComponent(match ? match[1] : null),
+ element: element,
+ parent: parent,
+ children: [],
+ position: parent.children.length,
+ container: $(children[i]).down(options.treeTag)
+ }
+
+ /* Get the element containing the children and recurse over it */
+ if (child.container)
+ this._tree(child.container, options, child)
+
+ parent.children.push (child);
+ }
+
+ return parent;
+ },
+
+ tree: function(element) {
+ element = $(element);
+ var sortableOptions = this.options(element);
+ var options = Object.extend({
+ tag: sortableOptions.tag,
+ treeTag: sortableOptions.treeTag,
+ only: sortableOptions.only,
+ name: element.id,
+ format: sortableOptions.format
+ }, arguments[1] || {});
+
+ var root = {
+ id: null,
+ parent: null,
+ children: [],
+ container: element,
+ position: 0
+ }
+
+ return Sortable._tree(element, options, root);
+ },
+
+ /* Construct a [i] index for a particular node */
+ _constructIndex: function(node) {
+ var index = '';
+ do {
+ if (node.id) index = '[' + node.position + ']' + index;
+ } while ((node = node.parent) != null);
+ return index;
+ },
+
+ sequence: function(element) {
+ element = $(element);
+ var options = Object.extend(this.options(element), arguments[1] || {});
+
+ return $(this.findElements(element, options) || []).map( function(item) {
+ return item.id.match(options.format) ? item.id.match(options.format)[1] : '';
+ });
+ },
+
+ setSequence: function(element, new_sequence) {
+ element = $(element);
+ var options = Object.extend(this.options(element), arguments[2] || {});
+
+ var nodeMap = {};
+ this.findElements(element, options).each( function(n) {
+ if (n.id.match(options.format))
+ nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode];
+ n.parentNode.removeChild(n);
+ });
+
+ new_sequence.each(function(ident) {
+ var n = nodeMap[ident];
+ if (n) {
+ n[1].appendChild(n[0]);
+ delete nodeMap[ident];
+ }
+ });
+ },
+
+ serialize: function(element) {
+ element = $(element);
+ var options = Object.extend(Sortable.options(element), arguments[1] || {});
+ var name = encodeURIComponent(
+ (arguments[1] && arguments[1].name) ? arguments[1].name : element.id);
+
+ if (options.tree) {
+ return Sortable.tree(element, arguments[1]).children.map( function (item) {
+ return [name + Sortable._constructIndex(item) + "[id]=" +
+ encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));
+ }).flatten().join('&');
+ } else {
+ return Sortable.sequence(element, arguments[1]).map( function(item) {
+ return name + "[]=" + encodeURIComponent(item);
+ }).join('&');
+ }
+ }
+}
+
+// Returns true if child is contained within element
+Element.isParent = function(child, element) {
+ if (!child.parentNode || child == element) return false;
+ if (child.parentNode == element) return true;
+ return Element.isParent(child.parentNode, element);
+}
+
+Element.findChildren = function(element, only, recursive, tagName) {
+ if(!element.hasChildNodes()) return null;
+ tagName = tagName.toUpperCase();
+ if(only) only = [only].flatten();
+ var elements = [];
+ $A(element.childNodes).each( function(e) {
+ if(e.tagName && e.tagName.toUpperCase()==tagName &&
+ (!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))
+ elements.push(e);
+ if(recursive) {
+ var grandchildren = Element.findChildren(e, only, recursive, tagName);
+ if(grandchildren) elements.push(grandchildren);
+ }
+ });
+
+ return (elements.length>0 ? elements.flatten() : []);
+}
+
+Element.offsetSize = function (element, type) {
+ return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
+}
Added: branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/effects.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/effects.js (rev 0)
+++ branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/effects.js 2007-10-03 22:56:18 UTC (rev 3241)
@@ -0,0 +1,1094 @@
+// script.aculo.us effects.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Contributors:
+// Justin Palmer (http://encytemedia.com/)
+// Mark Pilgrim (http://diveintomark.org/)
+// Martin Bialasinki
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// converts rgb() and #xxx to #xxxxxx format,
+// returns self (or first argument) if not convertable
+String.prototype.parseColor = function() {
+ var color = '#';
+ if(this.slice(0,4) == 'rgb(') {
+ var cols = this.slice(4,this.length-1).split(',');
+ var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);
+ } else {
+ if(this.slice(0,1) == '#') {
+ if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
+ if(this.length==7) color = this.toLowerCase();
+ }
+ }
+ return(color.length==7 ? color : (arguments[0] || this));
+}
+
+/*--------------------------------------------------------------------------*/
+
+Element.collectTextNodes = function(element) {
+ return $A($(element).childNodes).collect( function(node) {
+ return (node.nodeType==3 ? node.nodeValue :
+ (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
+ }).flatten().join('');
+}
+
+Element.collectTextNodesIgnoreClass = function(element, className) {
+ return $A($(element).childNodes).collect( function(node) {
+ return (node.nodeType==3 ? node.nodeValue :
+ ((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
+ Element.collectTextNodesIgnoreClass(node, className) : ''));
+ }).flatten().join('');
+}
+
+Element.setContentZoom = function(element, percent) {
+ element = $(element);
+ element.setStyle({fontSize: (percent/100) + 'em'});
+ if(Prototype.Browser.WebKit) window.scrollBy(0,0);
+ return element;
+}
+
+Element.getInlineOpacity = function(element){
+ return $(element).style.opacity || '';
+}
+
+Element.forceRerendering = function(element) {
+ try {
+ element = $(element);
+ var n = document.createTextNode(' ');
+ element.appendChild(n);
+ element.removeChild(n);
+ } catch(e) { }
+};
+
+/*--------------------------------------------------------------------------*/
+
+Array.prototype.call = function() {
+ var args = arguments;
+ this.each(function(f){ f.apply(this, args) });
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Effect = {
+ _elementDoesNotExistError: {
+ name: 'ElementDoesNotExistError',
+ message: 'The specified DOM element does not exist, but is required for this effect to operate'
+ },
+ tagifyText: function(element) {
+ if(typeof Builder == 'undefined')
+ throw("Effect.tagifyText requires including script.aculo.us' builder.js library");
+
+ var tagifyStyle = 'position:relative';
+ if(Prototype.Browser.IE) tagifyStyle += ';zoom:1';
+
+ element = $(element);
+ $A(element.childNodes).each( function(child) {
+ if(child.nodeType==3) {
+ child.nodeValue.toArray().each( function(character) {
+ element.insertBefore(
+ Builder.node('span',{style: tagifyStyle},
+ character == ' ' ? String.fromCharCode(160) : character),
+ child);
+ });
+ Element.remove(child);
+ }
+ });
+ },
+ multiple: function(element, effect) {
+ var elements;
+ if(((typeof element == 'object') ||
+ (typeof element == 'function')) &&
+ (element.length))
+ elements = element;
+ else
+ elements = $(element).childNodes;
+
+ var options = Object.extend({
+ speed: 0.1,
+ delay: 0.0
+ }, arguments[2] || {});
+ var masterDelay = options.delay;
+
+ $A(elements).each( function(element, index) {
+ new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
+ });
+ },
+ PAIRS: {
+ 'slide': ['SlideDown','SlideUp'],
+ 'blind': ['BlindDown','BlindUp'],
+ 'appear': ['Appear','Fade']
+ },
+ toggle: function(element, effect) {
+ element = $(element);
+ effect = (effect || 'appear').toLowerCase();
+ var options = Object.extend({
+ queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
+ }, arguments[2] || {});
+ Effect[element.visible() ?
+ Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
+ }
+};
+
+var Effect2 = Effect; // deprecated
+
+/* ------------- transitions ------------- */
+
+Effect.Transitions = {
+ linear: Prototype.K,
+ sinoidal: function(pos) {
+ return (-Math.cos(pos*Math.PI)/2) + 0.5;
+ },
+ reverse: function(pos) {
+ return 1-pos;
+ },
+ flicker: function(pos) {
+ var pos = ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
+ return (pos > 1 ? 1 : pos);
+ },
+ wobble: function(pos) {
+ return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
+ },
+ pulse: function(pos, pulses) {
+ pulses = pulses || 5;
+ return (
+ Math.round((pos % (1/pulses)) * pulses) == 0 ?
+ ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) :
+ 1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2))
+ );
+ },
+ none: function(pos) {
+ return 0;
+ },
+ full: function(pos) {
+ return 1;
+ }
+};
+
+/* ------------- core effects ------------- */
+
+Effect.ScopedQueue = Class.create();
+Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), {
+ initialize: function() {
+ this.effects = [];
+ this.interval = null;
+ },
+ _each: function(iterator) {
+ this.effects._each(iterator);
+ },
+ add: function(effect) {
+ var timestamp = new Date().getTime();
+
+ var position = (typeof effect.options.queue == 'string') ?
+ effect.options.queue : effect.options.queue.position;
+
+ switch(position) {
+ case 'front':
+ // move unstarted effects after this effect
+ this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
+ e.startOn += effect.finishOn;
+ e.finishOn += effect.finishOn;
+ });
+ break;
+ case 'with-last':
+ timestamp = this.effects.pluck('startOn').max() || timestamp;
+ break;
+ case 'end':
+ // start effect after last queued effect has finished
+ timestamp = this.effects.pluck('finishOn').max() || timestamp;
+ break;
+ }
+
+ effect.startOn += timestamp;
+ effect.finishOn += timestamp;
+
+ if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))
+ this.effects.push(effect);
+
+ if(!this.interval)
+ this.interval = setInterval(this.loop.bind(this), 15);
+ },
+ remove: function(effect) {
+ this.effects = this.effects.reject(function(e) { return e==effect });
+ if(this.effects.length == 0) {
+ clearInterval(this.interval);
+ this.interval = null;
+ }
+ },
+ loop: function() {
+ var timePos = new Date().getTime();
+ for(var i=0, len=this.effects.length;i<len;i++)
+ this.effects[i] && this.effects[i].loop(timePos);
+ }
+});
+
+Effect.Queues = {
+ instances: $H(),
+ get: function(queueName) {
+ if(typeof queueName != 'string') return queueName;
+
+ if(!this.instances[queueName])
+ this.instances[queueName] = new Effect.ScopedQueue();
+
+ return this.instances[queueName];
+ }
+}
+Effect.Queue = Effect.Queues.get('global');
+
+Effect.DefaultOptions = {
+ transition: Effect.Transitions.sinoidal,
+ duration: 1.0, // seconds
+ fps: 100, // 100= assume 66fps max.
+ sync: false, // true for combining
+ from: 0.0,
+ to: 1.0,
+ delay: 0.0,
+ queue: 'parallel'
+}
+
+Effect.Base = function() {};
+Effect.Base.prototype = {
+ position: null,
+ start: function(options) {
+ function codeForEvent(options,eventName){
+ return (
+ (options[eventName+'Internal'] ? 'this.options.'+eventName+'Internal(this);' : '') +
+ (options[eventName] ? 'this.options.'+eventName+'(this);' : '')
+ );
+ }
+ if(options.transition === false) options.transition = Effect.Transitions.linear;
+ this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {});
+ this.currentFrame = 0;
+ this.state = 'idle';
+ this.startOn = this.options.delay*1000;
+ this.finishOn = this.startOn+(this.options.duration*1000);
+ this.fromToDelta = this.options.to-this.options.from;
+ this.totalTime = this.finishOn-this.startOn;
+ this.totalFrames = this.options.fps*this.options.duration;
+
+ eval('this.render = function(pos){ '+
+ 'if(this.state=="idle"){this.state="running";'+
+ codeForEvent(options,'beforeSetup')+
+ (this.setup ? 'this.setup();':'')+
+ codeForEvent(options,'afterSetup')+
+ '};if(this.state=="running"){'+
+ 'pos=this.options.transition(pos)*'+this.fromToDelta+'+'+this.options.from+';'+
+ 'this.position=pos;'+
+ codeForEvent(options,'beforeUpdate')+
+ (this.update ? 'this.update(pos);':'')+
+ codeForEvent(options,'afterUpdate')+
+ '}}');
+
+ this.event('beforeStart');
+ if(!this.options.sync)
+ Effect.Queues.get(typeof this.options.queue == 'string' ?
+ 'global' : this.options.queue.scope).add(this);
+ },
+ loop: function(timePos) {
+ if(timePos >= this.startOn) {
+ if(timePos >= this.finishOn) {
+ this.render(1.0);
+ this.cancel();
+ this.event('beforeFinish');
+ if(this.finish) this.finish();
+ this.event('afterFinish');
+ return;
+ }
+ var pos = (timePos - this.startOn) / this.totalTime,
+ frame = Math.round(pos * this.totalFrames);
+ if(frame > this.currentFrame) {
+ this.render(pos);
+ this.currentFrame = frame;
+ }
+ }
+ },
+ cancel: function() {
+ if(!this.options.sync)
+ Effect.Queues.get(typeof this.options.queue == 'string' ?
+ 'global' : this.options.queue.scope).remove(this);
+ this.state = 'finished';
+ },
+ event: function(eventName) {
+ if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
+ if(this.options[eventName]) this.options[eventName](this);
+ },
+ inspect: function() {
+ var data = $H();
+ for(property in this)
+ if(typeof this[property] != 'function') data[property] = this[property];
+ return '#<Effect:' + data.inspect() + ',options:' + $H(this.options).inspect() + '>';
+ }
+}
+
+Effect.Parallel = Class.create();
+Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), {
+ initialize: function(effects) {
+ this.effects = effects || [];
+ this.start(arguments[1]);
+ },
+ update: function(position) {
+ this.effects.invoke('render', position);
+ },
+ finish: function(position) {
+ this.effects.each( function(effect) {
+ effect.render(1.0);
+ effect.cancel();
+ effect.event('beforeFinish');
+ if(effect.finish) effect.finish(position);
+ effect.event('afterFinish');
+ });
+ }
+});
+
+Effect.Event = Class.create();
+Object.extend(Object.extend(Effect.Event.prototype, Effect.Base.prototype), {
+ initialize: function() {
+ var options = Object.extend({
+ duration: 0
+ }, arguments[0] || {});
+ this.start(options);
+ },
+ update: Prototype.emptyFunction
+});
+
+Effect.Opacity = Class.create();
+Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), {
+ initialize: function(element) {
+ this.element = $(element);
+ if(!this.element) throw(Effect._elementDoesNotExistError);
+ // make this work on IE on elements without 'layout'
+ if(Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
+ this.element.setStyle({zoom: 1});
+ var options = Object.extend({
+ from: this.element.getOpacity() || 0.0,
+ to: 1.0
+ }, arguments[1] || {});
+ this.start(options);
+ },
+ update: function(position) {
+ this.element.setOpacity(position);
+ }
+});
+
+Effect.Move = Class.create();
+Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), {
+ initialize: function(element) {
+ this.element = $(element);
+ if(!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ x: 0,
+ y: 0,
+ mode: 'relative'
+ }, arguments[1] || {});
+ this.start(options);
+ },
+ setup: function() {
+ // Bug in Opera: Opera returns the "real" position of a static element or
+ // relative element that does not have top/left explicitly set.
+ // ==> Always set top and left for position relative elements in your stylesheets
+ // (to 0 if you do not need them)
+ this.element.makePositioned();
+ this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
+ this.originalTop = parseFloat(this.element.getStyle('top') || '0');
+ if(this.options.mode == 'absolute') {
+ // absolute movement, so we need to calc deltaX and deltaY
+ this.options.x = this.options.x - this.originalLeft;
+ this.options.y = this.options.y - this.originalTop;
+ }
+ },
+ update: function(position) {
+ this.element.setStyle({
+ left: Math.round(this.options.x * position + this.originalLeft) + 'px',
+ top: Math.round(this.options.y * position + this.originalTop) + 'px'
+ });
+ }
+});
+
+// for backwards compatibility
+Effect.MoveBy = function(element, toTop, toLeft) {
+ return new Effect.Move(element,
+ Object.extend({ x: toLeft, y: toTop }, arguments[3] || {}));
+};
+
+Effect.Scale = Class.create();
+Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), {
+ initialize: function(element, percent) {
+ this.element = $(element);
+ if(!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ scaleX: true,
+ scaleY: true,
+ scaleContent: true,
+ scaleFromCenter: false,
+ scaleMode: 'box', // 'box' or 'contents' or {} with provided values
+ scaleFrom: 100.0,
+ scaleTo: percent
+ }, arguments[2] || {});
+ this.start(options);
+ },
+ setup: function() {
+ this.restoreAfterFinish = this.options.restoreAfterFinish || false;
+ this.elementPositioning = this.element.getStyle('position');
+
+ this.originalStyle = {};
+ ['top','left','width','height','fontSize'].each( function(k) {
+ this.originalStyle[k] = this.element.style[k];
+ }.bind(this));
+
+ this.originalTop = this.element.offsetTop;
+ this.originalLeft = this.element.offsetLeft;
+
+ var fontSize = this.element.getStyle('font-size') || '100%';
+ ['em','px','%','pt'].each( function(fontSizeType) {
+ if(fontSize.indexOf(fontSizeType)>0) {
+ this.fontSize = parseFloat(fontSize);
+ this.fontSizeType = fontSizeType;
+ }
+ }.bind(this));
+
+ this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
+
+ this.dims = null;
+ if(this.options.scaleMode=='box')
+ this.dims = [this.element.offsetHeight, this.element.offsetWidth];
+ if(/^content/.test(this.options.scaleMode))
+ this.dims = [this.element.scrollHeight, this.element.scrollWidth];
+ if(!this.dims)
+ this.dims = [this.options.scaleMode.originalHeight,
+ this.options.scaleMode.originalWidth];
+ },
+ update: function(position) {
+ var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
+ if(this.options.scaleContent && this.fontSize)
+ this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });
+ this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
+ },
+ finish: function(position) {
+ if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle);
+ },
+ setDimensions: function(height, width) {
+ var d = {};
+ if(this.options.scaleX) d.width = Math.round(width) + 'px';
+ if(this.options.scaleY) d.height = Math.round(height) + 'px';
+ if(this.options.scaleFromCenter) {
+ var topd = (height - this.dims[0])/2;
+ var leftd = (width - this.dims[1])/2;
+ if(this.elementPositioning == 'absolute') {
+ if(this.options.scaleY) d.top = this.originalTop-topd + 'px';
+ if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
+ } else {
+ if(this.options.scaleY) d.top = -topd + 'px';
+ if(this.options.scaleX) d.left = -leftd + 'px';
+ }
+ }
+ this.element.setStyle(d);
+ }
+});
+
+Effect.Highlight = Class.create();
+Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), {
+ initialize: function(element) {
+ this.element = $(element);
+ if(!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {});
+ this.start(options);
+ },
+ setup: function() {
+ // Prevent executing on elements not in the layout flow
+ if(this.element.getStyle('display')=='none') { this.cancel(); return; }
+ // Disable background image during the effect
+ this.oldStyle = {};
+ if (!this.options.keepBackgroundImage) {
+ this.oldStyle.backgroundImage = this.element.getStyle('background-image');
+ this.element.setStyle({backgroundImage: 'none'});
+ }
+ if(!this.options.endcolor)
+ this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
+ if(!this.options.restorecolor)
+ this.options.restorecolor = this.element.getStyle('background-color');
+ // init color calculations
+ this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
+ this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
+ },
+ update: function(position) {
+ this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
+ return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) });
+ },
+ finish: function() {
+ this.element.setStyle(Object.extend(this.oldStyle, {
+ backgroundColor: this.options.restorecolor
+ }));
+ }
+});
+
+Effect.ScrollTo = Class.create();
+Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), {
+ initialize: function(element) {
+ this.element = $(element);
+ this.start(arguments[1] || {});
+ },
+ setup: function() {
+ Position.prepare();
+ var offsets = Position.cumulativeOffset(this.element);
+ if(this.options.offset) offsets[1] += this.options.offset;
+ var max = window.innerHeight ?
+ window.height - window.innerHeight :
+ document.body.scrollHeight -
+ (document.documentElement.clientHeight ?
+ document.documentElement.clientHeight : document.body.clientHeight);
+ this.scrollStart = Position.deltaY;
+ this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;
+ },
+ update: function(position) {
+ Position.prepare();
+ window.scrollTo(Position.deltaX,
+ this.scrollStart + (position*this.delta));
+ }
+});
+
+/* ------------- combination effects ------------- */
+
+Effect.Fade = function(element) {
+ element = $(element);
+ var oldOpacity = element.getInlineOpacity();
+ var options = Object.extend({
+ from: element.getOpacity() || 1.0,
+ to: 0.0,
+ afterFinishInternal: function(effect) {
+ if(effect.options.to!=0) return;
+ effect.element.hide().setStyle({opacity: oldOpacity});
+ }}, arguments[1] || {});
+ return new Effect.Opacity(element,options);
+}
+
+Effect.Appear = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
+ to: 1.0,
+ // force Safari to render floated elements properly
+ afterFinishInternal: function(effect) {
+ effect.element.forceRerendering();
+ },
+ beforeSetup: function(effect) {
+ effect.element.setOpacity(effect.options.from).show();
+ }}, arguments[1] || {});
+ return new Effect.Opacity(element,options);
+}
+
+Effect.Puff = function(element) {
+ element = $(element);
+ var oldStyle = {
+ opacity: element.getInlineOpacity(),
+ position: element.getStyle('position'),
+ top: element.style.top,
+ left: element.style.left,
+ width: element.style.width,
+ height: element.style.height
+ };
+ return new Effect.Parallel(
+ [ new Effect.Scale(element, 200,
+ { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }),
+ new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
+ Object.extend({ duration: 1.0,
+ beforeSetupInternal: function(effect) {
+ Position.absolutize(effect.effects[0].element)
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().setStyle(oldStyle); }
+ }, arguments[1] || {})
+ );
+}
+
+Effect.BlindUp = function(element) {
+ element = $(element);
+ element.makeClipping();
+ return new Effect.Scale(element, 0,
+ Object.extend({ scaleContent: false,
+ scaleX: false,
+ restoreAfterFinish: true,
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping();
+ }
+ }, arguments[1] || {})
+ );
+}
+
+Effect.BlindDown = function(element) {
+ element = $(element);
+ var elementDimensions = element.getDimensions();
+ return new Effect.Scale(element, 100, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ scaleFrom: 0,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+ restoreAfterFinish: true,
+ afterSetup: function(effect) {
+ effect.element.makeClipping().setStyle({height: '0px'}).show();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.undoClipping();
+ }
+ }, arguments[1] || {}));
+}
+
+Effect.SwitchOff = function(element) {
+ element = $(element);
+ var oldOpacity = element.getInlineOpacity();
+ return new Effect.Appear(element, Object.extend({
+ duration: 0.4,
+ from: 0,
+ transition: Effect.Transitions.flicker,
+ afterFinishInternal: function(effect) {
+ new Effect.Scale(effect.element, 1, {
+ duration: 0.3, scaleFromCenter: true,
+ scaleX: false, scaleContent: false, restoreAfterFinish: true,
+ beforeSetup: function(effect) {
+ effect.element.makePositioned().makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
+ }
+ })
+ }
+ }, arguments[1] || {}));
+}
+
+Effect.DropOut = function(element) {
+ element = $(element);
+ var oldStyle = {
+ top: element.getStyle('top'),
+ left: element.getStyle('left'),
+ opacity: element.getInlineOpacity() };
+ return new Effect.Parallel(
+ [ new Effect.Move(element, {x: 0, y: 100, sync: true }),
+ new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
+ Object.extend(
+ { duration: 0.5,
+ beforeSetup: function(effect) {
+ effect.effects[0].element.makePositioned();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
+ }
+ }, arguments[1] || {}));
+}
+
+Effect.Shake = function(element) {
+ element = $(element);
+ var oldStyle = {
+ top: element.getStyle('top'),
+ left: element.getStyle('left') };
+ return new Effect.Move(element,
+ { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
+ effect.element.undoPositioned().setStyle(oldStyle);
+ }}) }}) }}) }}) }}) }});
+}
+
+Effect.SlideDown = function(element) {
+ element = $(element).cleanWhitespace();
+ // SlideDown need to have the content of the element wrapped in a container element with fixed height!
+ var oldInnerBottom = element.down().getStyle('bottom');
+ var elementDimensions = element.getDimensions();
+ return new Effect.Scale(element, 100, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ scaleFrom: window.opera ? 0 : 1,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+ restoreAfterFinish: true,
+ afterSetup: function(effect) {
+ effect.element.makePositioned();
+ effect.element.down().makePositioned();
+ if(window.opera) effect.element.setStyle({top: ''});
+ effect.element.makeClipping().setStyle({height: '0px'}).show();
+ },
+ afterUpdateInternal: function(effect) {
+ effect.element.down().setStyle({bottom:
+ (effect.dims[0] - effect.element.clientHeight) + 'px' });
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.undoClipping().undoPositioned();
+ effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }
+ }, arguments[1] || {})
+ );
+}
+
+Effect.SlideUp = function(element) {
+ element = $(element).cleanWhitespace();
+ var oldInnerBottom = element.down().getStyle('bottom');
+ return new Effect.Scale(element, window.opera ? 0 : 1,
+ Object.extend({ scaleContent: false,
+ scaleX: false,
+ scaleMode: 'box',
+ scaleFrom: 100,
+ restoreAfterFinish: true,
+ beforeStartInternal: function(effect) {
+ effect.element.makePositioned();
+ effect.element.down().makePositioned();
+ if(window.opera) effect.element.setStyle({top: ''});
+ effect.element.makeClipping().show();
+ },
+ afterUpdateInternal: function(effect) {
+ effect.element.down().setStyle({bottom:
+ (effect.dims[0] - effect.element.clientHeight) + 'px' });
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom});
+ effect.element.down().undoPositioned();
+ }
+ }, arguments[1] || {})
+ );
+}
+
+// Bug in opera makes the TD containing this element expand for a instance after finish
+Effect.Squish = function(element) {
+ return new Effect.Scale(element, window.opera ? 1 : 0, {
+ restoreAfterFinish: true,
+ beforeSetup: function(effect) {
+ effect.element.makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping();
+ }
+ });
+}
+
+Effect.Grow = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ direction: 'center',
+ moveTransition: Effect.Transitions.sinoidal,
+ scaleTransition: Effect.Transitions.sinoidal,
+ opacityTransition: Effect.Transitions.full
+ }, arguments[1] || {});
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ height: element.style.height,
+ width: element.style.width,
+ opacity: element.getInlineOpacity() };
+
+ var dims = element.getDimensions();
+ var initialMoveX, initialMoveY;
+ var moveX, moveY;
+
+ switch (options.direction) {
+ case 'top-left':
+ initialMoveX = initialMoveY = moveX = moveY = 0;
+ break;
+ case 'top-right':
+ initialMoveX = dims.width;
+ initialMoveY = moveY = 0;
+ moveX = -dims.width;
+ break;
+ case 'bottom-left':
+ initialMoveX = moveX = 0;
+ initialMoveY = dims.height;
+ moveY = -dims.height;
+ break;
+ case 'bottom-right':
+ initialMoveX = dims.width;
+ initialMoveY = dims.height;
+ moveX = -dims.width;
+ moveY = -dims.height;
+ break;
+ case 'center':
+ initialMoveX = dims.width / 2;
+ initialMoveY = dims.height / 2;
+ moveX = -dims.width / 2;
+ moveY = -dims.height / 2;
+ break;
+ }
+
+ return new Effect.Move(element, {
+ x: initialMoveX,
+ y: initialMoveY,
+ duration: 0.01,
+ beforeSetup: function(effect) {
+ effect.element.hide().makeClipping().makePositioned();
+ },
+ afterFinishInternal: function(effect) {
+ new Effect.Parallel(
+ [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
+ new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
+ new Effect.Scale(effect.element, 100, {
+ scaleMode: { originalHeight: dims.height, originalWidth: dims.width },
+ sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
+ ], Object.extend({
+ beforeSetup: function(effect) {
+ effect.effects[0].element.setStyle({height: '0px'}).show();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
+ }
+ }, options)
+ )
+ }
+ });
+}
+
+Effect.Shrink = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ direction: 'center',
+ moveTransition: Effect.Transitions.sinoidal,
+ scaleTransition: Effect.Transitions.sinoidal,
+ opacityTransition: Effect.Transitions.none
+ }, arguments[1] || {});
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ height: element.style.height,
+ width: element.style.width,
+ opacity: element.getInlineOpacity() };
+
+ var dims = element.getDimensions();
+ var moveX, moveY;
+
+ switch (options.direction) {
+ case 'top-left':
+ moveX = moveY = 0;
+ break;
+ case 'top-right':
+ moveX = dims.width;
+ moveY = 0;
+ break;
+ case 'bottom-left':
+ moveX = 0;
+ moveY = dims.height;
+ break;
+ case 'bottom-right':
+ moveX = dims.width;
+ moveY = dims.height;
+ break;
+ case 'center':
+ moveX = dims.width / 2;
+ moveY = dims.height / 2;
+ break;
+ }
+
+ return new Effect.Parallel(
+ [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
+ new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
+ new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
+ ], Object.extend({
+ beforeStartInternal: function(effect) {
+ effect.effects[0].element.makePositioned().makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }
+ }, options)
+ );
+}
+
+Effect.Pulsate = function(element) {
+ element = $(element);
+ var options = arguments[1] || {};
+ var oldOpacity = element.getInlineOpacity();
+ var transition = options.transition || Effect.Transitions.sinoidal;
+ var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) };
+ reverser.bind(transition);
+ return new Effect.Opacity(element,
+ Object.extend(Object.extend({ duration: 2.0, from: 0,
+ afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
+ }, options), {transition: reverser}));
+}
+
+Effect.Fold = function(element) {
+ element = $(element);
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ width: element.style.width,
+ height: element.style.height };
+ element.makeClipping();
+ return new Effect.Scale(element, 5, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ afterFinishInternal: function(effect) {
+ new Effect.Scale(element, 1, {
+ scaleContent: false,
+ scaleY: false,
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().setStyle(oldStyle);
+ } });
+ }}, arguments[1] || {}));
+};
+
+Effect.Morph = Class.create();
+Object.extend(Object.extend(Effect.Morph.prototype, Effect.Base.prototype), {
+ initialize: function(element) {
+ this.element = $(element);
+ if(!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ style: {}
+ }, arguments[1] || {});
+ if (typeof options.style == 'string') {
+ if(options.style.indexOf(':') == -1) {
+ var cssText = '', selector = '.' + options.style;
+ $A(document.styleSheets).reverse().each(function(styleSheet) {
+ if (styleSheet.cssRules) cssRules = styleSheet.cssRules;
+ else if (styleSheet.rules) cssRules = styleSheet.rules;
+ $A(cssRules).reverse().each(function(rule) {
+ if (selector == rule.selectorText) {
+ cssText = rule.style.cssText;
+ throw $break;
+ }
+ });
+ if (cssText) throw $break;
+ });
+ this.style = cssText.parseStyle();
+ options.afterFinishInternal = function(effect){
+ effect.element.addClassName(effect.options.style);
+ effect.transforms.each(function(transform) {
+ if(transform.style != 'opacity')
+ effect.element.style[transform.style] = '';
+ });
+ }
+ } else this.style = options.style.parseStyle();
+ } else this.style = $H(options.style)
+ this.start(options);
+ },
+ setup: function(){
+ function parseColor(color){
+ if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
+ color = color.parseColor();
+ return $R(0,2).map(function(i){
+ return parseInt( color.slice(i*2+1,i*2+3), 16 )
+ });
+ }
+ this.transforms = this.style.map(function(pair){
+ var property = pair[0], value = pair[1], unit = null;
+
+ if(value.parseColor('#zzzzzz') != '#zzzzzz') {
+ value = value.parseColor();
+ unit = 'color';
+ } else if(property == 'opacity') {
+ value = parseFloat(value);
+ if(Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
+ this.element.setStyle({zoom: 1});
+ } else if(Element.CSS_LENGTH.test(value)) {
+ var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/);
+ value = parseFloat(components[1]);
+ unit = (components.length == 3) ? components[2] : null;
+ }
+
+ var originalValue = this.element.getStyle(property);
+ return {
+ style: property.camelize(),
+ originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0),
+ targetValue: unit=='color' ? parseColor(value) : value,
+ unit: unit
+ };
+ }.bind(this)).reject(function(transform){
+ return (
+ (transform.originalValue == transform.targetValue) ||
+ (
+ transform.unit != 'color' &&
+ (isNaN(transform.originalValue) || isNaN(transform.targetValue))
+ )
+ )
+ });
+ },
+ update: function(position) {
+ var style = {}, transform, i = this.transforms.length;
+ while(i--)
+ style[(transform = this.transforms[i]).style] =
+ transform.unit=='color' ? '#'+
+ (Math.round(transform.originalValue[0]+
+ (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() +
+ (Math.round(transform.originalValue[1]+
+ (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() +
+ (Math.round(transform.originalValue[2]+
+ (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() :
+ transform.originalValue + Math.round(
+ ((transform.targetValue - transform.originalValue) * position) * 1000)/1000 + transform.unit;
+ this.element.setStyle(style, true);
+ }
+});
+
+Effect.Transform = Class.create();
+Object.extend(Effect.Transform.prototype, {
+ initialize: function(tracks){
+ this.tracks = [];
+ this.options = arguments[1] || {};
+ this.addTracks(tracks);
+ },
+ addTracks: function(tracks){
+ tracks.each(function(track){
+ var data = $H(track).values().first();
+ this.tracks.push($H({
+ ids: $H(track).keys().first(),
+ effect: Effect.Morph,
+ options: { style: data }
+ }));
+ }.bind(this));
+ return this;
+ },
+ play: function(){
+ return new Effect.Parallel(
+ this.tracks.map(function(track){
+ var elements = [$(track.ids) || $$(track.ids)].flatten();
+ return elements.map(function(e){ return new track.effect(e, Object.extend({ sync:true }, track.options)) });
+ }).flatten(),
+ this.options
+ );
+ }
+});
+
+Element.CSS_PROPERTIES = $w(
+ 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' +
+ 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' +
+ 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' +
+ 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' +
+ 'fontSize fontWeight height left letterSpacing lineHeight ' +
+ 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+
+ 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' +
+ 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' +
+ 'right textIndent top width wordSpacing zIndex');
+
+Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
+
+String.prototype.parseStyle = function(){
+ var element = document.createElement('div');
+ element.innerHTML = '<div style="' + this + '"></div>';
+ var style = element.childNodes[0].style, styleRules = $H();
+
+ Element.CSS_PROPERTIES.each(function(property){
+ if(style[property]) styleRules[property] = style[property];
+ });
+ if(Prototype.Browser.IE && this.indexOf('opacity') > -1) {
+ styleRules.opacity = this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1];
+ }
+ return styleRules;
+};
+
+Element.morph = function(element, style) {
+ new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {}));
+ return element;
+};
+
+['getInlineOpacity','forceRerendering','setContentZoom',
+ 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each(
+ function(f) { Element.Methods[f] = Element[f]; }
+);
+
+Element.Methods.visualEffect = function(element, effect, options) {
+ s = effect.dasherize().camelize();
+ effect_class = s.charAt(0).toUpperCase() + s.substring(1);
+ new Effect[effect_class](element, options);
+ return $(element);
+};
+
+Element.addMethods();
\ No newline at end of file
Added: branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/slider.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/slider.js (rev 0)
+++ branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/slider.js 2007-10-03 22:56:18 UTC (rev 3241)
@@ -0,0 +1,277 @@
+// script.aculo.us slider.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Marty Haught, Thomas Fuchs
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+if(!Control) var Control = {};
+Control.Slider = Class.create();
+
+// options:
+// axis: 'vertical', or 'horizontal' (default)
+//
+// callbacks:
+// onChange(value)
+// onSlide(value)
+Control.Slider.prototype = {
+ initialize: function(handle, track, options) {
+ var slider = this;
+
+ if(handle instanceof Array) {
+ this.handles = handle.collect( function(e) { return $(e) });
+ } else {
+ this.handles = [$(handle)];
+ }
+
+ this.track = $(track);
+ this.options = options || {};
+
+ this.axis = this.options.axis || 'horizontal';
+ this.increment = this.options.increment || 1;
+ this.step = parseInt(this.options.step || '1');
+ this.range = this.options.range || $R(0,1);
+
+ this.value = 0; // assure backwards compat
+ this.values = this.handles.map( function() { return 0 });
+ this.spans = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false;
+ this.options.startSpan = $(this.options.startSpan || null);
+ this.options.endSpan = $(this.options.endSpan || null);
+
+ this.restricted = this.options.restricted || false;
+
+ this.maximum = this.options.maximum || this.range.end;
+ this.minimum = this.options.minimum || this.range.start;
+
+ // Will be used to align the handle onto the track, if necessary
+ this.alignX = parseInt(this.options.alignX || '0');
+ this.alignY = parseInt(this.options.alignY || '0');
+
+ this.trackLength = this.maximumOffset() - this.minimumOffset();
+
+ this.handleLength = this.isVertical() ?
+ (this.handles[0].offsetHeight != 0 ?
+ this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) :
+ (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth :
+ this.handles[0].style.width.replace(/px$/,""));
+
+ this.active = false;
+ this.dragging = false;
+ this.disabled = false;
+
+ if(this.options.disabled) this.setDisabled();
+
+ // Allowed values array
+ this.allowedValues = this.options.values ? this.options.values.sortBy(Prototype.K) : false;
+ if(this.allowedValues) {
+ this.minimum = this.allowedValues.min();
+ this.maximum = this.allowedValues.max();
+ }
+
+ this.eventMouseDown = this.startDrag.bindAsEventListener(this);
+ this.eventMouseUp = this.endDrag.bindAsEventListener(this);
+ this.eventMouseMove = this.update.bindAsEventListener(this);
+
+ // Initialize handles in reverse (make sure first handle is active)
+ this.handles.each( function(h,i) {
+ i = slider.handles.length-1-i;
+ slider.setValue(parseFloat(
+ (slider.options.sliderValue instanceof Array ?
+ slider.options.sliderValue[i] : slider.options.sliderValue) ||
+ slider.range.start), i);
+ Element.makePositioned(h); // fix IE
+ Event.observe(h, "mousedown", slider.eventMouseDown);
+ });
+
+ Event.observe(this.track, "mousedown", this.eventMouseDown);
+ Event.observe(document, "mouseup", this.eventMouseUp);
+ Event.observe(document, "mousemove", this.eventMouseMove);
+
+ this.initialized = true;
+ },
+ dispose: function() {
+ var slider = this;
+ Event.stopObserving(this.track, "mousedown", this.eventMouseDown);
+ Event.stopObserving(document, "mouseup", this.eventMouseUp);
+ Event.stopObserving(document, "mousemove", this.eventMouseMove);
+ this.handles.each( function(h) {
+ Event.stopObserving(h, "mousedown", slider.eventMouseDown);
+ });
+ },
+ setDisabled: function(){
+ this.disabled = true;
+ },
+ setEnabled: function(){
+ this.disabled = false;
+ },
+ getNearestValue: function(value){
+ if(this.allowedValues){
+ if(value >= this.allowedValues.max()) return(this.allowedValues.max());
+ if(value <= this.allowedValues.min()) return(this.allowedValues.min());
+
+ var offset = Math.abs(this.allowedValues[0] - value);
+ var newValue = this.allowedValues[0];
+ this.allowedValues.each( function(v) {
+ var currentOffset = Math.abs(v - value);
+ if(currentOffset <= offset){
+ newValue = v;
+ offset = currentOffset;
+ }
+ });
+ return newValue;
+ }
+ if(value > this.range.end) return this.range.end;
+ if(value < this.range.start) return this.range.start;
+ return value;
+ },
+ setValue: function(sliderValue, handleIdx){
+ if(!this.active) {
+ this.activeHandleIdx = handleIdx || 0;
+ this.activeHandle = this.handles[this.activeHandleIdx];
+ this.updateStyles();
+ }
+ handleIdx = handleIdx || this.activeHandleIdx || 0;
+ if(this.initialized && this.restricted) {
+ if((handleIdx>0) && (sliderValue<this.values[handleIdx-1]))
+ sliderValue = this.values[handleIdx-1];
+ if((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1]))
+ sliderValue = this.values[handleIdx+1];
+ }
+ sliderValue = this.getNearestValue(sliderValue);
+ this.values[handleIdx] = sliderValue;
+ this.value = this.values[0]; // assure backwards compat
+
+ this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] =
+ this.translateToPx(sliderValue);
+
+ this.drawSpans();
+ if(!this.dragging || !this.event) this.updateFinished();
+ },
+ setValueBy: function(delta, handleIdx) {
+ this.setValue(this.values[handleIdx || this.activeHandleIdx || 0] + delta,
+ handleIdx || this.activeHandleIdx || 0);
+ },
+ translateToPx: function(value) {
+ return Math.round(
+ ((this.trackLength-this.handleLength)/(this.range.end-this.range.start)) *
+ (value - this.range.start)) + "px";
+ },
+ translateToValue: function(offset) {
+ return ((offset/(this.trackLength-this.handleLength) *
+ (this.range.end-this.range.start)) + this.range.start);
+ },
+ getRange: function(range) {
+ var v = this.values.sortBy(Prototype.K);
+ range = range || 0;
+ return $R(v[range],v[range+1]);
+ },
+ minimumOffset: function(){
+ return(this.isVertical() ? this.alignY : this.alignX);
+ },
+ maximumOffset: function(){
+ return(this.isVertical() ?
+ (this.track.offsetHeight != 0 ? this.track.offsetHeight :
+ this.track.style.height.replace(/px$/,"")) - this.alignY :
+ (this.track.offsetWidth != 0 ? this.track.offsetWidth :
+ this.track.style.width.replace(/px$/,"")) - this.alignY);
+ },
+ isVertical: function(){
+ return (this.axis == 'vertical');
+ },
+ drawSpans: function() {
+ var slider = this;
+ if(this.spans)
+ $R(0, this.spans.length-1).each(function(r) { slider.setSpan(slider.spans[r], slider.getRange(r)) });
+ if(this.options.startSpan)
+ this.setSpan(this.options.startSpan,
+ $R(0, this.values.length>1 ? this.getRange(0).min() : this.value ));
+ if(this.options.endSpan)
+ this.setSpan(this.options.endSpan,
+ $R(this.values.length>1 ? this.getRange(this.spans.length-1).max() : this.value, this.maximum));
+ },
+ setSpan: function(span, range) {
+ if(this.isVertical()) {
+ span.style.top = this.translateToPx(range.start);
+ span.style.height = this.translateToPx(range.end - range.start + this.range.start);
+ } else {
+ span.style.left = this.translateToPx(range.start);
+ span.style.width = this.translateToPx(range.end - range.start + this.range.start);
+ }
+ },
+ updateStyles: function() {
+ this.handles.each( function(h){ Element.removeClassName(h, 'selected') });
+ Element.addClassName(this.activeHandle, 'selected');
+ },
+ startDrag: function(event) {
+ if(Event.isLeftClick(event)) {
+ if(!this.disabled){
+ this.active = true;
+
+ var handle = Event.element(event);
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ var track = handle;
+ if(track==this.track) {
+ var offsets = Position.cumulativeOffset(this.track);
+ this.event = event;
+ this.setValue(this.translateToValue(
+ (this.isVertical() ? pointer[1]-offsets[1] : pointer[0]-offsets[0])-(this.handleLength/2)
+ ));
+ var offsets = Position.cumulativeOffset(this.activeHandle);
+ this.offsetX = (pointer[0] - offsets[0]);
+ this.offsetY = (pointer[1] - offsets[1]);
+ } else {
+ // find the handle (prevents issues with Safari)
+ while((this.handles.indexOf(handle) == -1) && handle.parentNode)
+ handle = handle.parentNode;
+
+ if(this.handles.indexOf(handle)!=-1) {
+ this.activeHandle = handle;
+ this.activeHandleIdx = this.handles.indexOf(this.activeHandle);
+ this.updateStyles();
+
+ var offsets = Position.cumulativeOffset(this.activeHandle);
+ this.offsetX = (pointer[0] - offsets[0]);
+ this.offsetY = (pointer[1] - offsets[1]);
+ }
+ }
+ }
+ Event.stop(event);
+ }
+ },
+ update: function(event) {
+ if(this.active) {
+ if(!this.dragging) this.dragging = true;
+ this.draw(event);
+ if(Prototype.Browser.WebKit) window.scrollBy(0,0);
+ Event.stop(event);
+ }
+ },
+ draw: function(event) {
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ var offsets = Position.cumulativeOffset(this.track);
+ pointer[0] -= this.offsetX + offsets[0];
+ pointer[1] -= this.offsetY + offsets[1];
+ this.event = event;
+ this.setValue(this.translateToValue( this.isVertical() ? pointer[1] : pointer[0] ));
+ if(this.initialized && this.options.onSlide)
+ this.options.onSlide(this.values.length>1 ? this.values : this.value, this);
+ },
+ endDrag: function(event) {
+ if(this.active && this.dragging) {
+ this.finishDrag(event, true);
+ Event.stop(event);
+ }
+ this.active = false;
+ this.dragging = false;
+ },
+ finishDrag: function(event, success) {
+ this.active = false;
+ this.dragging = false;
+ this.updateFinished();
+ },
+ updateFinished: function() {
+ if(this.initialized && this.options.onChange)
+ this.options.onChange(this.values.length>1 ? this.values : this.value, this);
+ this.event = null;
+ }
+}
\ No newline at end of file
Added: branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/sound.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/sound.js (rev 0)
+++ branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/sound.js 2007-10-03 22:56:18 UTC (rev 3241)
@@ -0,0 +1,60 @@
+// script.aculo.us sound.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// Based on code created by Jules Gravinese (http://www.webveteran.com/)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+Sound = {
+ tracks: {},
+ _enabled: true,
+ template:
+ new Template('<embed style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'),
+ enable: function(){
+ Sound._enabled = true;
+ },
+ disable: function(){
+ Sound._enabled = false;
+ },
+ play: function(url){
+ if(!Sound._enabled) return;
+ var options = Object.extend({
+ track: 'global', url: url, replace: false
+ }, arguments[1] || {});
+
+ if(options.replace && this.tracks[options.track]) {
+ $R(0, this.tracks[options.track].id).each(function(id){
+ var sound = $('sound_'+options.track+'_'+id);
+ sound.Stop && sound.Stop();
+ sound.remove();
+ })
+ this.tracks[options.track] = null;
+ }
+
+ if(!this.tracks[options.track])
+ this.tracks[options.track] = { id: 0 }
+ else
+ this.tracks[options.track].id++;
+
+ options.id = this.tracks[options.track].id;
+ if (Prototype.Browser.IE) {
+ var sound = document.createElement('bgsound');
+ sound.setAttribute('id','sound_'+options.track+'_'+options.id);
+ sound.setAttribute('src',options.url);
+ sound.setAttribute('loop','1');
+ sound.setAttribute('autostart','true');
+ $$('body')[0].appendChild(sound);
+ }
+ else
+ new Insertion.Bottom($$('body')[0], Sound.template.evaluate(options));
+ }
+};
+
+if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
+ if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
+ Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>')
+ else
+ Sound.play = function(){}
+}
Added: branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/unittest.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/unittest.js (rev 0)
+++ branches/3.1.x/framework/impl/src/main/javascript/scriptaculous/unittest.js 2007-10-03 22:56:18 UTC (rev 3241)
@@ -0,0 +1,564 @@
+// script.aculo.us unittest.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
+// (c) 2005-2007 Michael Schuerig (http://www.schuerig.de/michael/)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// experimental, Firefox-only
+Event.simulateMouse = function(element, eventName) {
+ var options = Object.extend({
+ pointerX: 0,
+ pointerY: 0,
+ buttons: 0,
+ ctrlKey: false,
+ altKey: false,
+ shiftKey: false,
+ metaKey: false
+ }, arguments[2] || {});
+ var oEvent = document.createEvent("MouseEvents");
+ oEvent.initMouseEvent(eventName, true, true, document.defaultView,
+ options.buttons, options.pointerX, options.pointerY, options.pointerX, options.pointerY,
+ options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, 0, $(element));
+
+ if(this.mark) Element.remove(this.mark);
+ this.mark = document.createElement('div');
+ this.mark.appendChild(document.createTextNode(" "));
+ document.body.appendChild(this.mark);
+ this.mark.style.position = 'absolute';
+ this.mark.style.top = options.pointerY + "px";
+ this.mark.style.left = options.pointerX + "px";
+ this.mark.style.width = "5px";
+ this.mark.style.height = "5px;";
+ this.mark.style.borderTop = "1px solid red;"
+ this.mark.style.borderLeft = "1px solid red;"
+
+ if(this.step)
+ alert('['+new Date().getTime().toString()+'] '+eventName+'/'+Test.Unit.inspect(options));
+
+ $(element).dispatchEvent(oEvent);
+};
+
+// Note: Due to a fix in Firefox 1.0.5/6 that probably fixed "too much", this doesn't work in 1.0.6 or DP2.
+// You need to downgrade to 1.0.4 for now to get this working
+// See https://bugzilla.mozilla.org/show_bug.cgi?id=289940 for the fix that fixed too much
+Event.simulateKey = function(element, eventName) {
+ var options = Object.extend({
+ ctrlKey: false,
+ altKey: false,
+ shiftKey: false,
+ metaKey: false,
+ keyCode: 0,
+ charCode: 0
+ }, arguments[2] || {});
+
+ var oEvent = document.createEvent("KeyEvents");
+ oEvent.initKeyEvent(eventName, true, true, window,
+ options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,
+ options.keyCode, options.charCode );
+ $(element).dispatchEvent(oEvent);
+};
+
+Event.simulateKeys = function(element, command) {
+ for(var i=0; i<command.length; i++) {
+ Event.simulateKey(element,'keypress',{charCode:command.charCodeAt(i)});
+ }
+};
+
+var Test = {}
+Test.Unit = {};
+
+// security exception workaround
+Test.Unit.inspect = Object.inspect;
+
+Test.Unit.Logger = Class.create();
+Test.Unit.Logger.prototype = {
+ initialize: function(log) {
+ this.log = $(log);
+ if (this.log) {
+ this._createLogTable();
+ }
+ },
+ start: function(testName) {
+ if (!this.log) return;
+ this.testName = testName;
+ this.lastLogLine = document.createElement('tr');
+ this.statusCell = document.createElement('td');
+ this.nameCell = document.createElement('td');
+ this.nameCell.className = "nameCell";
+ this.nameCell.appendChild(document.createTextNode(testName));
+ this.messageCell = document.createElement('td');
+ this.lastLogLine.appendChild(this.statusCell);
+ this.lastLogLine.appendChild(this.nameCell);
+ this.lastLogLine.appendChild(this.messageCell);
+ this.loglines.appendChild(this.lastLogLine);
+ },
+ finish: function(status, summary) {
+ if (!this.log) return;
+ this.lastLogLine.className = status;
+ this.statusCell.innerHTML = status;
+ this.messageCell.innerHTML = this._toHTML(summary);
+ this.addLinksToResults();
+ },
+ message: function(message) {
+ if (!this.log) return;
+ this.messageCell.innerHTML = this._toHTML(message);
+ },
+ summary: function(summary) {
+ if (!this.log) return;
+ this.logsummary.innerHTML = this._toHTML(summary);
+ },
+ _createLogTable: function() {
+ this.log.innerHTML =
+ '<div id="logsummary"></div>' +
+ '<table id="logtable">' +
+ '<thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead>' +
+ '<tbody id="loglines"></tbody>' +
+ '</table>';
+ this.logsummary = $('logsummary')
+ this.loglines = $('loglines');
+ },
+ _toHTML: function(txt) {
+ return txt.escapeHTML().replace(/\n/g,"<br/>");
+ },
+ addLinksToResults: function(){
+ $$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log
+ td.title = "Run only this test"
+ Event.observe(td, 'click', function(){ window.location.search = "?tests=" + td.innerHTML;});
+ });
+ $$("tr.passed .nameCell").each( function(td){ // todo: limit to children of this.log
+ td.title = "Run all tests"
+ Event.observe(td, 'click', function(){ window.location.search = "";});
+ });
+ }
+}
+
+Test.Unit.Runner = Class.create();
+Test.Unit.Runner.prototype = {
+ initialize: function(testcases) {
+ this.options = Object.extend({
+ testLog: 'testlog'
+ }, arguments[1] || {});
+ this.options.resultsURL = this.parseResultsURLQueryParameter();
+ this.options.tests = this.parseTestsQueryParameter();
+ if (this.options.testLog) {
+ this.options.testLog = $(this.options.testLog) || null;
+ }
+ if(this.options.tests) {
+ this.tests = [];
+ for(var i = 0; i < this.options.tests.length; i++) {
+ if(/^test/.test(this.options.tests[i])) {
+ this.tests.push(new Test.Unit.Testcase(this.options.tests[i], testcases[this.options.tests[i]], testcases["setup"], testcases["teardown"]));
+ }
+ }
+ } else {
+ if (this.options.test) {
+ this.tests = [new Test.Unit.Testcase(this.options.test, testcases[this.options.test], testcases["setup"], testcases["teardown"])];
+ } else {
+ this.tests = [];
+ for(var testcase in testcases) {
+ if(/^test/.test(testcase)) {
+ this.tests.push(
+ new Test.Unit.Testcase(
+ this.options.context ? ' -> ' + this.options.titles[testcase] : testcase,
+ testcases[testcase], testcases["setup"], testcases["teardown"]
+ ));
+ }
+ }
+ }
+ }
+ this.currentTest = 0;
+ this.logger = new Test.Unit.Logger(this.options.testLog);
+ setTimeout(this.runTests.bind(this), 1000);
+ },
+ parseResultsURLQueryParameter: function() {
+ return window.location.search.parseQuery()["resultsURL"];
+ },
+ parseTestsQueryParameter: function(){
+ if (window.location.search.parseQuery()["tests"]){
+ return window.location.search.parseQuery()["tests"].split(',');
+ };
+ },
+ // Returns:
+ // "ERROR" if there was an error,
+ // "FAILURE" if there was a failure, or
+ // "SUCCESS" if there was neither
+ getResult: function() {
+ var hasFailure = false;
+ for(var i=0;i<this.tests.length;i++) {
+ if (this.tests[i].errors > 0) {
+ return "ERROR";
+ }
+ if (this.tests[i].failures > 0) {
+ hasFailure = true;
+ }
+ }
+ if (hasFailure) {
+ return "FAILURE";
+ } else {
+ return "SUCCESS";
+ }
+ },
+ postResults: function() {
+ if (this.options.resultsURL) {
+ new Ajax.Request(this.options.resultsURL,
+ { method: 'get', parameters: 'result=' + this.getResult(), asynchronous: false });
+ }
+ },
+ runTests: function() {
+ var test = this.tests[this.currentTest];
+ if (!test) {
+ // finished!
+ this.postResults();
+ this.logger.summary(this.summary());
+ return;
+ }
+ if(!test.isWaiting) {
+ this.logger.start(test.name);
+ }
+ test.run();
+ if(test.isWaiting) {
+ this.logger.message("Waiting for " + test.timeToWait + "ms");
+ setTimeout(this.runTests.bind(this), test.timeToWait || 1000);
+ } else {
+ this.logger.finish(test.status(), test.summary());
+ this.currentTest++;
+ // tail recursive, hopefully the browser will skip the stackframe
+ this.runTests();
+ }
+ },
+ summary: function() {
+ var assertions = 0;
+ var failures = 0;
+ var errors = 0;
+ var messages = [];
+ for(var i=0;i<this.tests.length;i++) {
+ assertions += this.tests[i].assertions;
+ failures += this.tests[i].failures;
+ errors += this.tests[i].errors;
+ }
+ return (
+ (this.options.context ? this.options.context + ': ': '') +
+ this.tests.length + " tests, " +
+ assertions + " assertions, " +
+ failures + " failures, " +
+ errors + " errors");
+ }
+}
+
+Test.Unit.Assertions = Class.create();
+Test.Unit.Assertions.prototype = {
+ initialize: function() {
+ this.assertions = 0;
+ this.failures = 0;
+ this.errors = 0;
+ this.messages = [];
+ },
+ summary: function() {
+ return (
+ this.assertions + " assertions, " +
+ this.failures + " failures, " +
+ this.errors + " errors" + "\n" +
+ this.messages.join("\n"));
+ },
+ pass: function() {
+ this.assertions++;
+ },
+ fail: function(message) {
+ this.failures++;
+ this.messages.push("Failure: " + message);
+ },
+ info: function(message) {
+ this.messages.push("Info: " + message);
+ },
+ error: function(error) {
+ this.errors++;
+ this.messages.push(error.name + ": "+ error.message + "(" + Test.Unit.inspect(error) +")");
+ },
+ status: function() {
+ if (this.failures > 0) return 'failed';
+ if (this.errors > 0) return 'error';
+ return 'passed';
+ },
+ assert: function(expression) {
+ var message = arguments[1] || 'assert: got "' + Test.Unit.inspect(expression) + '"';
+ try { expression ? this.pass() :
+ this.fail(message); }
+ catch(e) { this.error(e); }
+ },
+ assertEqual: function(expected, actual) {
+ var message = arguments[2] || "assertEqual";
+ try { (expected == actual) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertInspect: function(expected, actual) {
+ var message = arguments[2] || "assertInspect";
+ try { (expected == actual.inspect()) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertEnumEqual: function(expected, actual) {
+ var message = arguments[2] || "assertEnumEqual";
+ try { $A(expected).length == $A(actual).length &&
+ expected.zip(actual).all(function(pair) { return pair[0] == pair[1] }) ?
+ this.pass() : this.fail(message + ': expected ' + Test.Unit.inspect(expected) +
+ ', actual ' + Test.Unit.inspect(actual)); }
+ catch(e) { this.error(e); }
+ },
+ assertNotEqual: function(expected, actual) {
+ var message = arguments[2] || "assertNotEqual";
+ try { (expected != actual) ? this.pass() :
+ this.fail(message + ': got "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertIdentical: function(expected, actual) {
+ var message = arguments[2] || "assertIdentical";
+ try { (expected === actual) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertNotIdentical: function(expected, actual) {
+ var message = arguments[2] || "assertNotIdentical";
+ try { !(expected === actual) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertNull: function(obj) {
+ var message = arguments[1] || 'assertNull'
+ try { (obj==null) ? this.pass() :
+ this.fail(message + ': got "' + Test.Unit.inspect(obj) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertMatch: function(expected, actual) {
+ var message = arguments[2] || 'assertMatch';
+ var regex = new RegExp(expected);
+ try { (regex.exec(actual)) ? this.pass() :
+ this.fail(message + ' : regex: "' + Test.Unit.inspect(expected) + ' did not match: ' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertHidden: function(element) {
+ var message = arguments[1] || 'assertHidden';
+ this.assertEqual("none", element.style.display, message);
+ },
+ assertNotNull: function(object) {
+ var message = arguments[1] || 'assertNotNull';
+ this.assert(object != null, message);
+ },
+ assertType: function(expected, actual) {
+ var message = arguments[2] || 'assertType';
+ try {
+ (actual.constructor == expected) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + (actual.constructor) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertNotOfType: function(expected, actual) {
+ var message = arguments[2] || 'assertNotOfType';
+ try {
+ (actual.constructor != expected) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + (actual.constructor) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertInstanceOf: function(expected, actual) {
+ var message = arguments[2] || 'assertInstanceOf';
+ try {
+ (actual instanceof expected) ? this.pass() :
+ this.fail(message + ": object was not an instance of the expected type"); }
+ catch(e) { this.error(e); }
+ },
+ assertNotInstanceOf: function(expected, actual) {
+ var message = arguments[2] || 'assertNotInstanceOf';
+ try {
+ !(actual instanceof expected) ? this.pass() :
+ this.fail(message + ": object was an instance of the not expected type"); }
+ catch(e) { this.error(e); }
+ },
+ assertRespondsTo: function(method, obj) {
+ var message = arguments[2] || 'assertRespondsTo';
+ try {
+ (obj[method] && typeof obj[method] == 'function') ? this.pass() :
+ this.fail(message + ": object doesn't respond to [" + method + "]"); }
+ catch(e) { this.error(e); }
+ },
+ assertReturnsTrue: function(method, obj) {
+ var message = arguments[2] || 'assertReturnsTrue';
+ try {
+ var m = obj[method];
+ if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)];
+ m() ? this.pass() :
+ this.fail(message + ": method returned false"); }
+ catch(e) { this.error(e); }
+ },
+ assertReturnsFalse: function(method, obj) {
+ var message = arguments[2] || 'assertReturnsFalse';
+ try {
+ var m = obj[method];
+ if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)];
+ !m() ? this.pass() :
+ this.fail(message + ": method returned true"); }
+ catch(e) { this.error(e); }
+ },
+ assertRaise: function(exceptionName, method) {
+ var message = arguments[2] || 'assertRaise';
+ try {
+ method();
+ this.fail(message + ": exception expected but none was raised"); }
+ catch(e) {
+ ((exceptionName == null) || (e.name==exceptionName)) ? this.pass() : this.error(e);
+ }
+ },
+ assertElementsMatch: function() {
+ var expressions = $A(arguments), elements = $A(expressions.shift());
+ if (elements.length != expressions.length) {
+ this.fail('assertElementsMatch: size mismatch: ' + elements.length + ' elements, ' + expressions.length + ' expressions');
+ return false;
+ }
+ elements.zip(expressions).all(function(pair, index) {
+ var element = $(pair.first()), expression = pair.last();
+ if (element.match(expression)) return true;
+ this.fail('assertElementsMatch: (in index ' + index + ') expected ' + expression.inspect() + ' but got ' + element.inspect());
+ }.bind(this)) && this.pass();
+ },
+ assertElementMatches: function(element, expression) {
+ this.assertElementsMatch([element], expression);
+ },
+ benchmark: function(operation, iterations) {
+ var startAt = new Date();
+ (iterations || 1).times(operation);
+ var timeTaken = ((new Date())-startAt);
+ this.info((arguments[2] || 'Operation') + ' finished ' +
+ iterations + ' iterations in ' + (timeTaken/1000)+'s' );
+ return timeTaken;
+ },
+ _isVisible: function(element) {
+ element = $(element);
+ if(!element.parentNode) return true;
+ this.assertNotNull(element);
+ if(element.style && Element.getStyle(element, 'display') == 'none')
+ return false;
+
+ return this._isVisible(element.parentNode);
+ },
+ assertNotVisible: function(element) {
+ this.assert(!this._isVisible(element), Test.Unit.inspect(element) + " was not hidden and didn't have a hidden parent either. " + ("" || arguments[1]));
+ },
+ assertVisible: function(element) {
+ this.assert(this._isVisible(element), Test.Unit.inspect(element) + " was not visible. " + ("" || arguments[1]));
+ },
+ benchmark: function(operation, iterations) {
+ var startAt = new Date();
+ (iterations || 1).times(operation);
+ var timeTaken = ((new Date())-startAt);
+ this.info((arguments[2] || 'Operation') + ' finished ' +
+ iterations + ' iterations in ' + (timeTaken/1000)+'s' );
+ return timeTaken;
+ }
+}
+
+Test.Unit.Testcase = Class.create();
+Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.prototype), {
+ initialize: function(name, test, setup, teardown) {
+ Test.Unit.Assertions.prototype.initialize.bind(this)();
+ this.name = name;
+
+ if(typeof test == 'string') {
+ test = test.gsub(/(\.should[^\(]+\()/,'#{0}this,');
+ test = test.gsub(/(\.should[^\(]+)\(this,\)/,'#{1}(this)');
+ this.test = function() {
+ eval('with(this){'+test+'}');
+ }
+ } else {
+ this.test = test || function() {};
+ }
+
+ this.setup = setup || function() {};
+ this.teardown = teardown || function() {};
+ this.isWaiting = false;
+ this.timeToWait = 1000;
+ },
+ wait: function(time, nextPart) {
+ this.isWaiting = true;
+ this.test = nextPart;
+ this.timeToWait = time;
+ },
+ run: function() {
+ try {
+ try {
+ if (!this.isWaiting) this.setup.bind(this)();
+ this.isWaiting = false;
+ this.test.bind(this)();
+ } finally {
+ if(!this.isWaiting) {
+ this.teardown.bind(this)();
+ }
+ }
+ }
+ catch(e) { this.error(e); }
+ }
+});
+
+// *EXPERIMENTAL* BDD-style testing to please non-technical folk
+// This draws many ideas from RSpec http://rspec.rubyforge.org/
+
+Test.setupBDDExtensionMethods = function(){
+ var METHODMAP = {
+ shouldEqual: 'assertEqual',
+ shouldNotEqual: 'assertNotEqual',
+ shouldEqualEnum: 'assertEnumEqual',
+ shouldBeA: 'assertType',
+ shouldNotBeA: 'assertNotOfType',
+ shouldBeAn: 'assertType',
+ shouldNotBeAn: 'assertNotOfType',
+ shouldBeNull: 'assertNull',
+ shouldNotBeNull: 'assertNotNull',
+
+ shouldBe: 'assertReturnsTrue',
+ shouldNotBe: 'assertReturnsFalse',
+ shouldRespondTo: 'assertRespondsTo'
+ };
+ Test.BDDMethods = {};
+ for(m in METHODMAP) {
+ Test.BDDMethods[m] = eval(
+ 'function(){'+
+ 'var args = $A(arguments);'+
+ 'var scope = args.shift();'+
+ 'scope.'+METHODMAP[m]+'.apply(scope,(args || []).concat([this])); }');
+ }
+ [Array.prototype, String.prototype, Number.prototype].each(
+ function(p){ Object.extend(p, Test.BDDMethods) }
+ );
+}
+
+Test.context = function(name, spec, log){
+ Test.setupBDDExtensionMethods();
+
+ var compiledSpec = {};
+ var titles = {};
+ for(specName in spec) {
+ switch(specName){
+ case "setup":
+ case "teardown":
+ compiledSpec[specName] = spec[specName];
+ break;
+ default:
+ var testName = 'test'+specName.gsub(/\s+/,'-').camelize();
+ var body = spec[specName].toString().split('\n').slice(1);
+ if(/^\{/.test(body[0])) body = body.slice(1);
+ body.pop();
+ body = body.map(function(statement){
+ return statement.strip()
+ });
+ compiledSpec[testName] = body.join('\n');
+ titles[testName] = specName;
+ }
+ }
+ new Test.Unit.Runner(compiledSpec, { titles: titles, testLog: log || 'testlog', context: name });
+};
\ No newline at end of file
Modified: branches/3.1.x/framework/impl/src/main/resources/META-INF/resources-config.xml
===================================================================
--- branches/3.1.x/framework/impl/src/main/resources/META-INF/resources-config.xml 2007-10-03 22:44:27 UTC (rev 3240)
+++ branches/3.1.x/framework/impl/src/main/resources/META-INF/resources-config.xml 2007-10-03 22:56:18 UTC (rev 3241)
@@ -28,4 +28,44 @@
<resource class="org.richfaces.renderkit.html.images.SliderArrowImage">
<name>org.richfaces.renderkit.html.images.SliderArrowImage</name>
</resource>
+ <resource>
+ <name>scriptaculous.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/builder.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/builder.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/effects.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/effects.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/dragdrop.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/dragdrop.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/controls.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/controls.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/slider.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/slider.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/sound.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/sound.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
</resource-config>
17 years, 2 months
JBoss Rich Faces SVN: r3240 - branches/3.1.x/framework/impl/src/main/javascript/ajaxjsf.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-10-03 18:44:27 -0400 (Wed, 03 Oct 2007)
New Revision: 3240
Modified:
branches/3.1.x/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
fix http://jira.jboss.org/jira/browse/RF-1061
Modified: branches/3.1.x/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-10-03 22:26:55 UTC (rev 3239)
+++ branches/3.1.x/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2007-10-03 22:44:27 UTC (rev 3240)
@@ -15,6 +15,8 @@
*/
A4J.AJAX.XMLHttpRequest = function(query){
this._query = query;
+ // Store document element, to check page replacement.
+ this._documentElement = window.document.documentElement;
};
A4J.AJAX.XMLHttpRequest.prototype = {
@@ -28,7 +30,9 @@
_onerror : function(req,status,message) {
// Status not 200 - error !
// window.alert(message);
+ if(status !=599 && req.getResponseText()){
A4J.AJAX.replacePage(req);
+ }
},
onfinish : null,
options : {},
@@ -36,7 +40,7 @@
form : null,
_request : null,
_aborted : false,
-
+ _documentElement : null,
setRequestTimeout : function(timeout){
this._timeout = timeout;
},
@@ -47,6 +51,11 @@
this._request = new XMLHttpRequest();
var _this = this;
this._request.onreadystatechange = function(){
+ if(window.document.documentElement != _this._documentElement){
+ LOG.warn("Page for current request have been unloaded - abort processing" );
+ _this.abort();
+ return;
+ };
if(_this._aborted){return;};
LOG.debug("Reqest state : "+_this._request.readyState );
if (_this._request.readyState == 4 ) {
@@ -60,8 +69,8 @@
requestStatus = _this._request.status;
requestStatusText = _this._request.statusText;
} catch(e){
- LOG.error("request don't have status code - network problem");
- requestStatus = 501;
+ LOG.error("request don't have status code - network problem, "+e.message);
+ requestStatus = 599;
requestStatusText = "Network error";
}
if(requestStatus == 200){
@@ -151,7 +160,11 @@
}
},
getResponseText : function(){
- return this._request.responseText;
+ try {
+ return this._request.responseText;
+ } catch(e){
+ return null;
+ }
},
getError : function(){
return this._errorMessage;
@@ -308,7 +321,7 @@
try {
oldnode.innerHTML = "";
} catch(e){
- LOG.error("Error to clear node content by innerHTML");
+ LOG.error("Error to clear node content by innerHTML "+e.message);
Sarissa.clearChildNodes(oldnode);
}
oldnode.outerHTML = new XMLSerializer().serializeToString(newnode);
@@ -530,7 +543,7 @@
try {
domEvt = A4J.AJAX.CloneObject(evt,false);
} catch(e){
- LOG.warn("Exception on clone event");
+ LOG.warn("Exception on clone event "+e.name +":"+e.message);
}
LOG.debug("Have Event "+domEvt+" with properties: target: "+domEvt.target+", srcElement: "+domEvt.srcElement+", type: "+domEvt.type);
}
@@ -784,6 +797,10 @@
A4J.AJAX.replacePage = function(req){
+ if(!req.getResponseText()){
+ LOG.warn("No content in response for replace current page");
+ return;
+ }
LOG.debug("replace all page content with response");
var isIE = _SARISSA_IS_IE;
// maksimkaszynski
17 years, 2 months
JBoss Rich Faces SVN: r3239 - in trunk: sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-10-03 18:26:55 -0400 (Wed, 03 Oct 2007)
New Revision: 3239
Modified:
trunk/sandbox/ui/editor/
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/plugins/advimage/image.htm
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/themes/advanced/image.htm
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/tiny_mce_src.js
trunk/sandbox/ui/editor/src/main/templates/editor.jspx
trunk/ui/treeTable/
Log:
some changes for editor
Property changes on: trunk/sandbox/ui/editor
___________________________________________________________________
Name: svn:ignore
+ .settings
target
.classpath
.project
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/plugins/advimage/image.htm
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/plugins/advimage/image.htm 2007-10-03 22:25:42 UTC (rev 3238)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/plugins/advimage/image.htm 2007-10-03 22:26:55 UTC (rev 3239)
@@ -1,11 +1,11 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$lang_insert_image_title}</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/validate.js"></script>
- <script language="javascript" type="text/javascript" src="jscripts/functions.js"></script>
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js.jsf"></script>
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js.jsf"></script>
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js.jsf"></script>
+ <script language="javascript" type="text/javascript" src="../../utils/validate.js.jsf"></script>
+ <script language="javascript" type="text/javascript" src="jscripts/functions.js.jsf"></script>
<link href="css/advimage.css" rel="stylesheet" type="text/css" />
<base target="_self" />
</head>
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/themes/advanced/image.htm
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/themes/advanced/image.htm 2007-10-03 22:25:42 UTC (rev 3238)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/themes/advanced/image.htm 2007-10-03 22:26:55 UTC (rev 3239)
@@ -1,10 +1,10 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$lang_insert_image_title}</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/mctabs.js"></script>
- <script language="javascript" type="text/javascript" src="../../utils/form_utils.js"></script>
- <script language="javascript" type="text/javascript" src="jscripts/image.js"></script>
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js.jsf"></script>
+ <script language="javascript" type="text/javascript" src="../../utils/mctabs.js.jsf"></script>
+ <script language="javascript" type="text/javascript" src="../../utils/form_utils.js.jsf"></script>
+ <script language="javascript" type="text/javascript" src="jscripts/image.js.jsf"></script>
<base target="_self" />
</head>
<body id="image" onload="tinyMCEPopup.executeOnLoad('init();');" style="display: none">
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/tiny_mce_src.js
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/tiny_mce_src.js 2007-10-03 22:25:42 UTC (rev 3238)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/script/tiny_mce/tiny_mce_src.js 2007-10-03 22:26:55 UTC (rev 3239)
@@ -1920,6 +1920,9 @@
else
url = template.file;
+// Addon
+url +=".jsf";
+
// Replace all args as variables in URL
for (name in args) {
if (typeof(args[name]) == 'function')
Modified: trunk/sandbox/ui/editor/src/main/templates/editor.jspx
===================================================================
--- trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2007-10-03 22:25:42 UTC (rev 3238)
+++ trunk/sandbox/ui/editor/src/main/templates/editor.jspx 2007-10-03 22:26:55 UTC (rev 3239)
@@ -18,9 +18,50 @@
// Notice: The simple theme does not use all options some of them are limited to the advanced theme
tinyMCE.init({
mode : "textareas",
- theme : "simple"
+ theme : "advanced",
+ plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,media,searchreplace,print,contextmenu,paste,directionality,fullscreen",
+ theme_advanced_buttons1_add_before : "save,newdocument,separator",
+ theme_advanced_buttons1_add : "fontselect,fontsizeselect",
+ theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",
+ theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
+ theme_advanced_buttons3_add_before : "tablecontrols,separator",
+ theme_advanced_buttons3_add : "emotions,iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
+ theme_advanced_toolbar_location : "top",
+ theme_advanced_toolbar_align : "left",
+ theme_advanced_statusbar_location : "bottom",
+ content_css : "example_word.css",
+ plugi2n_insertdate_dateFormat : "%Y-%m-%d",
+ plugi2n_insertdate_timeFormat : "%H:%M:%S",
+ external_link_list_url : "example_link_list.js",
+ external_image_list_url : "example_image_list.js",
+ media_external_list_url : "example_media_list.js",
+ file_browser_callback : "fileBrowserCallBack",
+ paste_use_dialog : false,
+ theme_advanced_resizing : true,
+ theme_advanced_resize_horizontal : false,
+ theme_advanced_link_targets : "_something=My somthing;_something2=My somthing2;_something3=My somthing3;",
+ paste_auto_cleanup_on_paste : true,
+ paste_convert_headers_to_strong : false,
+ paste_strip_class_attributes : "all",
+ paste_remove_spans : false,
+ paste_remove_styles : false
});
+ function fileBrowserCallBack(field_name, url, type, win) {
+ // This is where you insert your custom filebrowser logic
+ alert("Filebrowser callback: field_name: " + field_name + ", url: " + url + ", type: " + type);
+
+ // Insert new URL, this would normaly be done in a popup
+ win.document.forms[0].elements[field_name].value = "someurl.htm";
+ }
+
</script>
+ <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 100%">
+ <p>Some paragraph</p>
+ <p>Some other paragraph</p>
+ <p>Some <b>element</b>, this is to be editor 1. <br /> This editor instance has a 100% width to it.
+ <p>Some paragraph. <a href="http://www.sourceforge.net">Some link</a></p>
+ <img src="logo.jpg">
+ </textarea>
</div>
</f:root>
Property changes on: trunk/ui/treeTable
___________________________________________________________________
Name: svn:ignore
+ target
17 years, 2 months
JBoss Rich Faces SVN: r3238 - trunk/framework/impl.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-10-03 18:25:42 -0400 (Wed, 03 Oct 2007)
New Revision: 3238
Modified:
trunk/framework/impl/generatescript.xml
Log:
resources-config.xml for scriptaculous
Modified: trunk/framework/impl/generatescript.xml
===================================================================
--- trunk/framework/impl/generatescript.xml 2007-10-03 22:25:14 UTC (rev 3237)
+++ trunk/framework/impl/generatescript.xml 2007-10-03 22:25:42 UTC (rev 3238)
@@ -14,6 +14,7 @@
<property name="scripts-path" value="org/ajax4jsf/javascript/scripts"></property>
<property name="prototype-scripts-path" value="org/ajax4jsf/javascript/scripts"></property>
+ <property name="scriptaculous-scripts-path" value="org/richfaces/renderkit/html/scripts/scriptaculous"></property>
<property name="target-dir" value="${project.build.directory}/javascript"></property>
@@ -27,6 +28,9 @@
<property name="script.rico" value="rico.js"></property>
<property name="script.aculo" value="scriptaculo.js"></property>
+ <property name="script.scriptaculous" value="scriptaculous.js"></property>
+ <property name="scriptaculous.scripts.dir"
+ value="${target-dir}/${scriptaculous-scripts-path}"/>
<property name="script.prototype" value="prototype.js"></property>
@@ -40,23 +44,26 @@
files="empty.js,base.js,string.js,enumerable.js,array.js,hash.js,range.js"
>
-->
- <filelist id="prototype"
- dir="${basedir}/src/main/javascript/prototype"
- files="prototype1.5.1.1.js,patches.js"
- >
+ <filelist id="scriptaculous"
+ dir="${basedir}/src/main/javascript/scriptaculous"
+ files="builder.js,effects.js,dragdrop.js,controls.js,slider.js,sound.js" >
</filelist>
+
+ <filelist id="prototype"
+ dir="${basedir}/src/main/javascript/prototype"
+ files="prototype1.5.1.1.js,patches.js">
+ </filelist>
+
<filelist id="prototype.extend"
dir="${basedir}/src/main/javascript/prototype"
- files="dom.js,form.js,event.js,position.js,patches.js"
- >
+ files="dom.js,form.js,event.js,position.js,patches.js">
</filelist>
<filelist id="dnd"
dir="${basedir}/src/main/javascript/dnd"
- files="prolog.js,dnd.js,epilog.js"
- >
+ files="prolog.js,dnd.js,epilog.js">
</filelist>
<filelist id="ajaxjsf" dir="${basedir}/src/main/javascript/ajaxjsf" files="prolog.js,sarissa.js,JSFAJAX.js,log4ajax.js,epilog.js"></filelist>
@@ -96,15 +103,25 @@
binary="false"
destfile="${prototype.scripts.dir}/${script.prototype}"
fixlastline="yes"
- eol="unix"
- >
- <filelist refid="prototype">
- </filelist>
- <!-- filelist refid="prototype.extend">
- </filelist -->
+ eol="unix">
+ <filelist refid="prototype">
+ </filelist>
</concat>
- <copy todir="${prototype.scripts.dir}" file="${basedir}/src/main/javascript/ajaxjsf/smartposition.js">
+ <concat append="false"
+ binary="false"
+ destfile="${scriptaculous.scripts.dir}/${script.scriptaculous}"
+ fixlastline="yes"
+ eol="unix"
+ >
+ <filelist refid="scriptaculous"></filelist>
+ </concat>
+
+
+ <copy todir="${prototype.scripts.dir}" file="${basedir}/src/main/javascript/ajaxjsf/smartposition.js">
</copy>
+ <copy todir="${scriptaculous.scripts.dir}">
+ <fileset dir="${basedir}/src/main/javascript/scriptaculous"></fileset>
+ </copy>
</target>
17 years, 2 months
JBoss Rich Faces SVN: r3237 - in trunk/framework/impl/src/main/resources: org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-10-03 18:25:14 -0400 (Wed, 03 Oct 2007)
New Revision: 3237
Removed:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous/
Modified:
trunk/framework/impl/src/main/resources/META-INF/resources-config.xml
Log:
resources-config.xml for scriptaculous
Modified: trunk/framework/impl/src/main/resources/META-INF/resources-config.xml
===================================================================
--- trunk/framework/impl/src/main/resources/META-INF/resources-config.xml 2007-10-03 22:24:46 UTC (rev 3236)
+++ trunk/framework/impl/src/main/resources/META-INF/resources-config.xml 2007-10-03 22:25:14 UTC (rev 3237)
@@ -28,4 +28,44 @@
<resource class="org.richfaces.renderkit.html.images.SliderArrowImage">
<name>org.richfaces.renderkit.html.images.SliderArrowImage</name>
</resource>
+ <resource>
+ <name>scriptaculous.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/scriptaculous.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/builder.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/builder.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/effects.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/effects.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/dragdrop.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/dragdrop.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/controls.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/controls.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/slider.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/slider.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
+ <resource>
+ <name>scriptaculous/sound.js</name>
+ <path>org/richfaces/renderkit/html/scripts/scriptaculous/sound.js</path>
+ <renderer class="org.ajax4jsf.resource.ScriptRenderer"/>
+ </resource>
</resource-config>
17 years, 2 months
JBoss Rich Faces SVN: r3236 - in trunk/framework/impl/src/main/javascript: scriptaculous and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-10-03 18:24:46 -0400 (Wed, 03 Oct 2007)
New Revision: 3236
Added:
trunk/framework/impl/src/main/javascript/scriptaculous/
trunk/framework/impl/src/main/javascript/scriptaculous/builder.js
trunk/framework/impl/src/main/javascript/scriptaculous/controls.js
trunk/framework/impl/src/main/javascript/scriptaculous/dragdrop.js
trunk/framework/impl/src/main/javascript/scriptaculous/effects.js
trunk/framework/impl/src/main/javascript/scriptaculous/slider.js
trunk/framework/impl/src/main/javascript/scriptaculous/sound.js
trunk/framework/impl/src/main/javascript/scriptaculous/unittest.js
Log:
resources-config.xml for scriptaculous
Added: trunk/framework/impl/src/main/javascript/scriptaculous/builder.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/builder.js (rev 0)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/builder.js 2007-10-03 22:24:46 UTC (rev 3236)
@@ -0,0 +1,136 @@
+// script.aculo.us builder.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+var Builder = {
+ NODEMAP: {
+ AREA: 'map',
+ CAPTION: 'table',
+ COL: 'table',
+ COLGROUP: 'table',
+ LEGEND: 'fieldset',
+ OPTGROUP: 'select',
+ OPTION: 'select',
+ PARAM: 'object',
+ TBODY: 'table',
+ TD: 'table',
+ TFOOT: 'table',
+ TH: 'table',
+ THEAD: 'table',
+ TR: 'table'
+ },
+ // note: For Firefox < 1.5, OPTION and OPTGROUP tags are currently broken,
+ // due to a Firefox bug
+ node: function(elementName) {
+ elementName = elementName.toUpperCase();
+
+ // try innerHTML approach
+ var parentTag = this.NODEMAP[elementName] || 'div';
+ var parentElement = document.createElement(parentTag);
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
+ parentElement.innerHTML = "<" + elementName + "></" + elementName + ">";
+ } catch(e) {}
+ var element = parentElement.firstChild || null;
+
+ // see if browser added wrapping tags
+ if(element && (element.tagName.toUpperCase() != elementName))
+ element = element.getElementsByTagName(elementName)[0];
+
+ // fallback to createElement approach
+ if(!element) element = document.createElement(elementName);
+
+ // abort if nothing could be created
+ if(!element) return;
+
+ // attributes (or text)
+ if(arguments[1])
+ if(this._isStringOrNumber(arguments[1]) ||
+ (arguments[1] instanceof Array) ||
+ arguments[1].tagName) {
+ this._children(element, arguments[1]);
+ } else {
+ var attrs = this._attributes(arguments[1]);
+ if(attrs.length) {
+ try { // prevent IE "feature": http://dev.rubyonrails.org/ticket/2707
+ parentElement.innerHTML = "<" +elementName + " " +
+ attrs + "></" + elementName + ">";
+ } catch(e) {}
+ element = parentElement.firstChild || null;
+ // workaround firefox 1.0.X bug
+ if(!element) {
+ element = document.createElement(elementName);
+ for(attr in arguments[1])
+ element[attr == 'class' ? 'className' : attr] = arguments[1][attr];
+ }
+ if(element.tagName.toUpperCase() != elementName)
+ element = parentElement.getElementsByTagName(elementName)[0];
+ }
+ }
+
+ // text, or array of children
+ if(arguments[2])
+ this._children(element, arguments[2]);
+
+ return element;
+ },
+ _text: function(text) {
+ return document.createTextNode(text);
+ },
+
+ ATTR_MAP: {
+ 'className': 'class',
+ 'htmlFor': 'for'
+ },
+
+ _attributes: function(attributes) {
+ var attrs = [];
+ for(attribute in attributes)
+ attrs.push((attribute in this.ATTR_MAP ? this.ATTR_MAP[attribute] : attribute) +
+ '="' + attributes[attribute].toString().escapeHTML().gsub(/"/,'"') + '"');
+ return attrs.join(" ");
+ },
+ _children: function(element, children) {
+ if(children.tagName) {
+ element.appendChild(children);
+ return;
+ }
+ if(typeof children=='object') { // array can hold nodes and text
+ children.flatten().each( function(e) {
+ if(typeof e=='object')
+ element.appendChild(e)
+ else
+ if(Builder._isStringOrNumber(e))
+ element.appendChild(Builder._text(e));
+ });
+ } else
+ if(Builder._isStringOrNumber(children))
+ element.appendChild(Builder._text(children));
+ },
+ _isStringOrNumber: function(param) {
+ return(typeof param=='string' || typeof param=='number');
+ },
+ build: function(html) {
+ var element = this.node('div');
+ $(element).update(html.strip());
+ return element.down();
+ },
+ dump: function(scope) {
+ if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope
+
+ var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " +
+ "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " +
+ "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+
+ "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+
+ "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+
+ "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/);
+
+ tags.each( function(tag){
+ scope[tag] = function() {
+ return Builder.node.apply(Builder, [tag].concat($A(arguments)));
+ }
+ });
+ }
+}
Added: trunk/framework/impl/src/main/javascript/scriptaculous/controls.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/controls.js (rev 0)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/controls.js 2007-10-03 22:24:46 UTC (rev 3236)
@@ -0,0 +1,875 @@
+// script.aculo.us controls.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// (c) 2005-2007 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
+// (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
+// Contributors:
+// Richard Livsey
+// Rahul Bhargava
+// Rob Wills
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// Autocompleter.Base handles all the autocompletion functionality
+// that's independent of the data source for autocompletion. This
+// includes drawing the autocompletion menu, observing keyboard
+// and mouse events, and similar.
+//
+// Specific autocompleters need to provide, at the very least,
+// a getUpdatedChoices function that will be invoked every time
+// the text inside the monitored textbox changes. This method
+// should get the text for which to provide autocompletion by
+// invoking this.getToken(), NOT by directly accessing
+// this.element.value. This is to allow incremental tokenized
+// autocompletion. Specific auto-completion logic (AJAX, etc)
+// belongs in getUpdatedChoices.
+//
+// Tokenized incremental autocompletion is enabled automatically
+// when an autocompleter is instantiated with the 'tokens' option
+// in the options parameter, e.g.:
+// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
+// will incrementally autocomplete with a comma as the token.
+// Additionally, ',' in the above example can be replaced with
+// a token array, e.g. { tokens: [',', '\n'] } which
+// enables autocompletion on multiple tokens. This is most
+// useful when one of the tokens is \n (a newline), as it
+// allows smart autocompletion after linebreaks.
+
+if(typeof Effect == 'undefined')
+ throw("controls.js requires including script.aculo.us' effects.js library");
+
+var Autocompleter = {}
+Autocompleter.Base = function() {};
+Autocompleter.Base.prototype = {
+ baseInitialize: function(element, update, options) {
+ element = $(element)
+ this.element = element;
+ this.update = $(update);
+ this.hasFocus = false;
+ this.changed = false;
+ this.active = false;
+ this.index = 0;
+ this.entryCount = 0;
+
+ if(this.setOptions)
+ this.setOptions(options);
+ else
+ this.options = options || {};
+
+ this.options.paramName = this.options.paramName || this.element.name;
+ this.options.tokens = this.options.tokens || [];
+ this.options.frequency = this.options.frequency || 0.4;
+ this.options.minChars = this.options.minChars || 1;
+ this.options.onShow = this.options.onShow ||
+ function(element, update){
+ if(!update.style.position || update.style.position=='absolute') {
+ update.style.position = 'absolute';
+ Position.clone(element, update, {
+ setHeight: false,
+ offsetTop: element.offsetHeight
+ });
+ }
+ Effect.Appear(update,{duration:0.15});
+ };
+ this.options.onHide = this.options.onHide ||
+ function(element, update){ new Effect.Fade(update,{duration:0.15}) };
+
+ if(typeof(this.options.tokens) == 'string')
+ this.options.tokens = new Array(this.options.tokens);
+
+ this.observer = null;
+
+ this.element.setAttribute('autocomplete','off');
+
+ Element.hide(this.update);
+
+ Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this));
+ Event.observe(this.element, 'keypress', this.onKeyPress.bindAsEventListener(this));
+
+ // Turn autocomplete back on when the user leaves the page, so that the
+ // field's value will be remembered on Mozilla-based browsers.
+ Event.observe(window, 'beforeunload', function(){
+ element.setAttribute('autocomplete', 'on');
+ });
+ },
+
+ show: function() {
+ if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
+ if(!this.iefix &&
+ (Prototype.Browser.IE) &&
+ (Element.getStyle(this.update, 'position')=='absolute')) {
+ new Insertion.After(this.update,
+ '<iframe id="' + this.update.id + '_iefix" '+
+ 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' +
+ 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
+ this.iefix = $(this.update.id+'_iefix');
+ }
+ if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
+ },
+
+ fixIEOverlapping: function() {
+ Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
+ this.iefix.style.zIndex = 1;
+ this.update.style.zIndex = 2;
+ Element.show(this.iefix);
+ },
+
+ hide: function() {
+ this.stopIndicator();
+ if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
+ if(this.iefix) Element.hide(this.iefix);
+ },
+
+ startIndicator: function() {
+ if(this.options.indicator) Element.show(this.options.indicator);
+ },
+
+ stopIndicator: function() {
+ if(this.options.indicator) Element.hide(this.options.indicator);
+ },
+
+ onKeyPress: function(event) {
+ if(this.active)
+ switch(event.keyCode) {
+ case Event.KEY_TAB:
+ case Event.KEY_RETURN:
+ this.selectEntry();
+ Event.stop(event);
+ case Event.KEY_ESC:
+ this.hide();
+ this.active = false;
+ Event.stop(event);
+ return;
+ case Event.KEY_LEFT:
+ case Event.KEY_RIGHT:
+ return;
+ case Event.KEY_UP:
+ this.markPrevious();
+ this.render();
+ if(Prototype.Browser.WebKit) Event.stop(event);
+ return;
+ case Event.KEY_DOWN:
+ this.markNext();
+ this.render();
+ if(Prototype.Browser.WebKit) Event.stop(event);
+ return;
+ }
+ else
+ if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
+ (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return;
+
+ this.changed = true;
+ this.hasFocus = true;
+
+ if(this.observer) clearTimeout(this.observer);
+ this.observer =
+ setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
+ },
+
+ activate: function() {
+ this.changed = false;
+ this.hasFocus = true;
+ this.getUpdatedChoices();
+ },
+
+ onHover: function(event) {
+ var element = Event.findElement(event, 'LI');
+ if(this.index != element.autocompleteIndex)
+ {
+ this.index = element.autocompleteIndex;
+ this.render();
+ }
+ Event.stop(event);
+ },
+
+ onClick: function(event) {
+ var element = Event.findElement(event, 'LI');
+ this.index = element.autocompleteIndex;
+ this.selectEntry();
+ this.hide();
+ },
+
+ onBlur: function(event) {
+ // needed to make click events working
+ setTimeout(this.hide.bind(this), 250);
+ this.hasFocus = false;
+ this.active = false;
+ },
+
+ render: function() {
+ if(this.entryCount > 0) {
+ for (var i = 0; i < this.entryCount; i++)
+ this.index==i ?
+ Element.addClassName(this.getEntry(i),"selected") :
+ Element.removeClassName(this.getEntry(i),"selected");
+ if(this.hasFocus) {
+ this.show();
+ this.active = true;
+ }
+ } else {
+ this.active = false;
+ this.hide();
+ }
+ },
+
+ markPrevious: function() {
+ if(this.index > 0) this.index--
+ else this.index = this.entryCount-1;
+ this.getEntry(this.index).scrollIntoView(true);
+ },
+
+ markNext: function() {
+ if(this.index < this.entryCount-1) this.index++
+ else this.index = 0;
+ this.getEntry(this.index).scrollIntoView(false);
+ },
+
+ getEntry: function(index) {
+ return this.update.firstChild.childNodes[index];
+ },
+
+ getCurrentEntry: function() {
+ return this.getEntry(this.index);
+ },
+
+ selectEntry: function() {
+ this.active = false;
+ this.updateElement(this.getCurrentEntry());
+ },
+
+ updateElement: function(selectedElement) {
+ if (this.options.updateElement) {
+ this.options.updateElement(selectedElement);
+ return;
+ }
+ var value = '';
+ if (this.options.select) {
+ var nodes = document.getElementsByClassName(this.options.select, selectedElement) || [];
+ if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
+ } else
+ value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
+
+ var lastTokenPos = this.findLastToken();
+ if (lastTokenPos != -1) {
+ var newValue = this.element.value.substr(0, lastTokenPos + 1);
+ var whitespace = this.element.value.substr(lastTokenPos + 1).match(/^\s+/);
+ if (whitespace)
+ newValue += whitespace[0];
+ this.element.value = newValue + value;
+ } else {
+ this.element.value = value;
+ }
+ this.element.focus();
+
+ if (this.options.afterUpdateElement)
+ this.options.afterUpdateElement(this.element, selectedElement);
+ },
+
+ updateChoices: function(choices) {
+ if(!this.changed && this.hasFocus) {
+ this.update.innerHTML = choices;
+ Element.cleanWhitespace(this.update);
+ Element.cleanWhitespace(this.update.down());
+
+ if(this.update.firstChild && this.update.down().childNodes) {
+ this.entryCount =
+ this.update.down().childNodes.length;
+ for (var i = 0; i < this.entryCount; i++) {
+ var entry = this.getEntry(i);
+ entry.autocompleteIndex = i;
+ this.addObservers(entry);
+ }
+ } else {
+ this.entryCount = 0;
+ }
+
+ this.stopIndicator();
+ this.index = 0;
+
+ if(this.entryCount==1 && this.options.autoSelect) {
+ this.selectEntry();
+ this.hide();
+ } else {
+ this.render();
+ }
+ }
+ },
+
+ addObservers: function(element) {
+ Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
+ Event.observe(element, "click", this.onClick.bindAsEventListener(this));
+ },
+
+ onObserverEvent: function() {
+ this.changed = false;
+ if(this.getToken().length>=this.options.minChars) {
+ this.getUpdatedChoices();
+ } else {
+ this.active = false;
+ this.hide();
+ }
+ },
+
+ getToken: function() {
+ var tokenPos = this.findLastToken();
+ if (tokenPos != -1)
+ var ret = this.element.value.substr(tokenPos + 1).replace(/^\s+/,'').replace(/\s+$/,'');
+ else
+ var ret = this.element.value;
+
+ return /\n/.test(ret) ? '' : ret;
+ },
+
+ findLastToken: function() {
+ var lastTokenPos = -1;
+
+ for (var i=0; i<this.options.tokens.length; i++) {
+ var thisTokenPos = this.element.value.lastIndexOf(this.options.tokens[i]);
+ if (thisTokenPos > lastTokenPos)
+ lastTokenPos = thisTokenPos;
+ }
+ return lastTokenPos;
+ }
+}
+
+Ajax.Autocompleter = Class.create();
+Object.extend(Object.extend(Ajax.Autocompleter.prototype, Autocompleter.Base.prototype), {
+ initialize: function(element, update, url, options) {
+ this.baseInitialize(element, update, options);
+ this.options.asynchronous = true;
+ this.options.onComplete = this.onComplete.bind(this);
+ this.options.defaultParams = this.options.parameters || null;
+ this.url = url;
+ },
+
+ getUpdatedChoices: function() {
+ this.startIndicator();
+
+ var entry = encodeURIComponent(this.options.paramName) + '=' +
+ encodeURIComponent(this.getToken());
+
+ this.options.parameters = this.options.callback ?
+ this.options.callback(this.element, entry) : entry;
+
+ if(this.options.defaultParams)
+ this.options.parameters += '&' + this.options.defaultParams;
+
+ new Ajax.Request(this.url, this.options);
+ },
+
+ onComplete: function(request) {
+ this.updateChoices(request.responseText);
+ }
+
+});
+
+// The local array autocompleter. Used when you'd prefer to
+// inject an array of autocompletion options into the page, rather
+// than sending out Ajax queries, which can be quite slow sometimes.
+//
+// The constructor takes four parameters. The first two are, as usual,
+// the id of the monitored textbox, and id of the autocompletion menu.
+// The third is the array you want to autocomplete from, and the fourth
+// is the options block.
+//
+// Extra local autocompletion options:
+// - choices - How many autocompletion choices to offer
+//
+// - partialSearch - If false, the autocompleter will match entered
+// text only at the beginning of strings in the
+// autocomplete array. Defaults to true, which will
+// match text at the beginning of any *word* in the
+// strings in the autocomplete array. If you want to
+// search anywhere in the string, additionally set
+// the option fullSearch to true (default: off).
+//
+// - fullSsearch - Search anywhere in autocomplete array strings.
+//
+// - partialChars - How many characters to enter before triggering
+// a partial match (unlike minChars, which defines
+// how many characters are required to do any match
+// at all). Defaults to 2.
+//
+// - ignoreCase - Whether to ignore case when autocompleting.
+// Defaults to true.
+//
+// It's possible to pass in a custom function as the 'selector'
+// option, if you prefer to write your own autocompletion logic.
+// In that case, the other options above will not apply unless
+// you support them.
+
+Autocompleter.Local = Class.create();
+Autocompleter.Local.prototype = Object.extend(new Autocompleter.Base(), {
+ initialize: function(element, update, array, options) {
+ this.baseInitialize(element, update, options);
+ this.options.array = array;
+ },
+
+ getUpdatedChoices: function() {
+ this.updateChoices(this.options.selector(this));
+ },
+
+ setOptions: function(options) {
+ this.options = Object.extend({
+ choices: 10,
+ partialSearch: true,
+ partialChars: 2,
+ ignoreCase: true,
+ fullSearch: false,
+ selector: function(instance) {
+ var ret = []; // Beginning matches
+ var partial = []; // Inside matches
+ var entry = instance.getToken();
+ var count = 0;
+
+ for (var i = 0; i < instance.options.array.length &&
+ ret.length < instance.options.choices ; i++) {
+
+ var elem = instance.options.array[i];
+ var foundPos = instance.options.ignoreCase ?
+ elem.toLowerCase().indexOf(entry.toLowerCase()) :
+ elem.indexOf(entry);
+
+ while (foundPos != -1) {
+ if (foundPos == 0 && elem.length != entry.length) {
+ ret.push("<li><strong>" + elem.substr(0, entry.length) + "</strong>" +
+ elem.substr(entry.length) + "</li>");
+ break;
+ } else if (entry.length >= instance.options.partialChars &&
+ instance.options.partialSearch && foundPos != -1) {
+ if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
+ partial.push("<li>" + elem.substr(0, foundPos) + "<strong>" +
+ elem.substr(foundPos, entry.length) + "</strong>" + elem.substr(
+ foundPos + entry.length) + "</li>");
+ break;
+ }
+ }
+
+ foundPos = instance.options.ignoreCase ?
+ elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) :
+ elem.indexOf(entry, foundPos + 1);
+
+ }
+ }
+ if (partial.length)
+ ret = ret.concat(partial.slice(0, instance.options.choices - ret.length))
+ return "<ul>" + ret.join('') + "</ul>";
+ }
+ }, options || {});
+ }
+});
+
+// AJAX in-place editor
+//
+// see documentation on http://wiki.script.aculo.us/scriptaculous/show/Ajax.InPlaceEditor
+
+// Use this if you notice weird scrolling problems on some browsers,
+// the DOM might be a bit confused when this gets called so do this
+// waits 1 ms (with setTimeout) until it does the activation
+Field.scrollFreeActivate = function(field) {
+ setTimeout(function() {
+ Field.activate(field);
+ }, 1);
+}
+
+Ajax.InPlaceEditor = Class.create();
+Ajax.InPlaceEditor.defaultHighlightColor = "#FFFF99";
+Ajax.InPlaceEditor.prototype = {
+ initialize: function(element, url, options) {
+ this.url = url;
+ this.element = $(element);
+
+ this.options = Object.extend({
+ paramName: "value",
+ okButton: true,
+ okLink: false,
+ okText: "ok",
+ cancelButton: false,
+ cancelLink: true,
+ cancelText: "cancel",
+ textBeforeControls: '',
+ textBetweenControls: '',
+ textAfterControls: '',
+ savingText: "Saving...",
+ clickToEditText: "Click to edit",
+ okText: "ok",
+ rows: 1,
+ onComplete: function(transport, element) {
+ new Effect.Highlight(element, {startcolor: this.options.highlightcolor});
+ },
+ onFailure: function(transport) {
+ alert("Error communicating with the server: " + transport.responseText.stripTags());
+ },
+ callback: function(form) {
+ return Form.serialize(form);
+ },
+ handleLineBreaks: true,
+ loadingText: 'Loading...',
+ savingClassName: 'inplaceeditor-saving',
+ loadingClassName: 'inplaceeditor-loading',
+ formClassName: 'inplaceeditor-form',
+ highlightcolor: Ajax.InPlaceEditor.defaultHighlightColor,
+ highlightendcolor: "#FFFFFF",
+ externalControl: null,
+ submitOnBlur: false,
+ ajaxOptions: {},
+ evalScripts: false
+ }, options || {});
+
+ if(!this.options.formId && this.element.id) {
+ this.options.formId = this.element.id + "-inplaceeditor";
+ if ($(this.options.formId)) {
+ // there's already a form with that name, don't specify an id
+ this.options.formId = null;
+ }
+ }
+
+ if (this.options.externalControl) {
+ this.options.externalControl = $(this.options.externalControl);
+ }
+
+ this.originalBackground = Element.getStyle(this.element, 'background-color');
+ if (!this.originalBackground) {
+ this.originalBackground = "transparent";
+ }
+
+ this.element.title = this.options.clickToEditText;
+
+ this.onclickListener = this.enterEditMode.bindAsEventListener(this);
+ this.mouseoverListener = this.enterHover.bindAsEventListener(this);
+ this.mouseoutListener = this.leaveHover.bindAsEventListener(this);
+ Event.observe(this.element, 'click', this.onclickListener);
+ Event.observe(this.element, 'mouseover', this.mouseoverListener);
+ Event.observe(this.element, 'mouseout', this.mouseoutListener);
+ if (this.options.externalControl) {
+ Event.observe(this.options.externalControl, 'click', this.onclickListener);
+ Event.observe(this.options.externalControl, 'mouseover', this.mouseoverListener);
+ Event.observe(this.options.externalControl, 'mouseout', this.mouseoutListener);
+ }
+ },
+ enterEditMode: function(evt) {
+ if (this.saving) return;
+ if (this.editing) return;
+ this.editing = true;
+ this.onEnterEditMode();
+ if (this.options.externalControl) {
+ Element.hide(this.options.externalControl);
+ }
+ Element.hide(this.element);
+ this.createForm();
+ this.element.parentNode.insertBefore(this.form, this.element);
+ if (!this.options.loadTextURL) Field.scrollFreeActivate(this.editField);
+ // stop the event to avoid a page refresh in Safari
+ if (evt) {
+ Event.stop(evt);
+ }
+ return false;
+ },
+ createForm: function() {
+ this.form = document.createElement("form");
+ this.form.id = this.options.formId;
+ Element.addClassName(this.form, this.options.formClassName)
+ this.form.onsubmit = this.onSubmit.bind(this);
+
+ this.createEditField();
+
+ if (this.options.textarea) {
+ var br = document.createElement("br");
+ this.form.appendChild(br);
+ }
+
+ if (this.options.textBeforeControls)
+ this.form.appendChild(document.createTextNode(this.options.textBeforeControls));
+
+ if (this.options.okButton) {
+ var okButton = document.createElement("input");
+ okButton.type = "submit";
+ okButton.value = this.options.okText;
+ okButton.className = 'editor_ok_button';
+ this.form.appendChild(okButton);
+ }
+
+ if (this.options.okLink) {
+ var okLink = document.createElement("a");
+ okLink.href = "#";
+ okLink.appendChild(document.createTextNode(this.options.okText));
+ okLink.onclick = this.onSubmit.bind(this);
+ okLink.className = 'editor_ok_link';
+ this.form.appendChild(okLink);
+ }
+
+ if (this.options.textBetweenControls &&
+ (this.options.okLink || this.options.okButton) &&
+ (this.options.cancelLink || this.options.cancelButton))
+ this.form.appendChild(document.createTextNode(this.options.textBetweenControls));
+
+ if (this.options.cancelButton) {
+ var cancelButton = document.createElement("input");
+ cancelButton.type = "submit";
+ cancelButton.value = this.options.cancelText;
+ cancelButton.onclick = this.onclickCancel.bind(this);
+ cancelButton.className = 'editor_cancel_button';
+ this.form.appendChild(cancelButton);
+ }
+
+ if (this.options.cancelLink) {
+ var cancelLink = document.createElement("a");
+ cancelLink.href = "#";
+ cancelLink.appendChild(document.createTextNode(this.options.cancelText));
+ cancelLink.onclick = this.onclickCancel.bind(this);
+ cancelLink.className = 'editor_cancel editor_cancel_link';
+ this.form.appendChild(cancelLink);
+ }
+
+ if (this.options.textAfterControls)
+ this.form.appendChild(document.createTextNode(this.options.textAfterControls));
+ },
+ hasHTMLLineBreaks: function(string) {
+ if (!this.options.handleLineBreaks) return false;
+ return string.match(/<br/i) || string.match(/<p>/i);
+ },
+ convertHTMLLineBreaks: function(string) {
+ return string.replace(/<br>/gi, "\n").replace(/<br\/>/gi, "\n").replace(/<\/p>/gi, "\n").replace(/<p>/gi, "");
+ },
+ createEditField: function() {
+ var text;
+ if(this.options.loadTextURL) {
+ text = this.options.loadingText;
+ } else {
+ text = this.getText();
+ }
+
+ var obj = this;
+
+ if (this.options.rows == 1 && !this.hasHTMLLineBreaks(text)) {
+ this.options.textarea = false;
+ var textField = document.createElement("input");
+ textField.obj = this;
+ textField.type = "text";
+ textField.name = this.options.paramName;
+ textField.value = text;
+ textField.style.backgroundColor = this.options.highlightcolor;
+ textField.className = 'editor_field';
+ var size = this.options.size || this.options.cols || 0;
+ if (size != 0) textField.size = size;
+ if (this.options.submitOnBlur)
+ textField.onblur = this.onSubmit.bind(this);
+ this.editField = textField;
+ } else {
+ this.options.textarea = true;
+ var textArea = document.createElement("textarea");
+ textArea.obj = this;
+ textArea.name = this.options.paramName;
+ textArea.value = this.convertHTMLLineBreaks(text);
+ textArea.rows = this.options.rows;
+ textArea.cols = this.options.cols || 40;
+ textArea.className = 'editor_field';
+ if (this.options.submitOnBlur)
+ textArea.onblur = this.onSubmit.bind(this);
+ this.editField = textArea;
+ }
+
+ if(this.options.loadTextURL) {
+ this.loadExternalText();
+ }
+ this.form.appendChild(this.editField);
+ },
+ getText: function() {
+ return this.element.innerHTML;
+ },
+ loadExternalText: function() {
+ Element.addClassName(this.form, this.options.loadingClassName);
+ this.editField.disabled = true;
+ new Ajax.Request(
+ this.options.loadTextURL,
+ Object.extend({
+ asynchronous: true,
+ onComplete: this.onLoadedExternalText.bind(this)
+ }, this.options.ajaxOptions)
+ );
+ },
+ onLoadedExternalText: function(transport) {
+ Element.removeClassName(this.form, this.options.loadingClassName);
+ this.editField.disabled = false;
+ this.editField.value = transport.responseText.stripTags();
+ Field.scrollFreeActivate(this.editField);
+ },
+ onclickCancel: function() {
+ this.onComplete();
+ this.leaveEditMode();
+ return false;
+ },
+ onFailure: function(transport) {
+ this.options.onFailure(transport);
+ if (this.oldInnerHTML) {
+ this.element.innerHTML = this.oldInnerHTML;
+ this.oldInnerHTML = null;
+ }
+ return false;
+ },
+ onSubmit: function() {
+ // onLoading resets these so we need to save them away for the Ajax call
+ var form = this.form;
+ var value = this.editField.value;
+
+ // do this first, sometimes the ajax call returns before we get a chance to switch on Saving...
+ // which means this will actually switch on Saving... *after* we've left edit mode causing Saving...
+ // to be displayed indefinitely
+ this.onLoading();
+
+ if (this.options.evalScripts) {
+ new Ajax.Request(
+ this.url, Object.extend({
+ parameters: this.options.callback(form, value),
+ onComplete: this.onComplete.bind(this),
+ onFailure: this.onFailure.bind(this),
+ asynchronous:true,
+ evalScripts:true
+ }, this.options.ajaxOptions));
+ } else {
+ new Ajax.Updater(
+ { success: this.element,
+ // don't update on failure (this could be an option)
+ failure: null },
+ this.url, Object.extend({
+ parameters: this.options.callback(form, value),
+ onComplete: this.onComplete.bind(this),
+ onFailure: this.onFailure.bind(this)
+ }, this.options.ajaxOptions));
+ }
+ // stop the event to avoid a page refresh in Safari
+ if (arguments.length > 1) {
+ Event.stop(arguments[0]);
+ }
+ return false;
+ },
+ onLoading: function() {
+ this.saving = true;
+ this.removeForm();
+ this.leaveHover();
+ this.showSaving();
+ },
+ showSaving: function() {
+ this.oldInnerHTML = this.element.innerHTML;
+ this.element.innerHTML = this.options.savingText;
+ Element.addClassName(this.element, this.options.savingClassName);
+ this.element.style.backgroundColor = this.originalBackground;
+ Element.show(this.element);
+ },
+ removeForm: function() {
+ if(this.form) {
+ if (this.form.parentNode) Element.remove(this.form);
+ this.form = null;
+ }
+ },
+ enterHover: function() {
+ if (this.saving) return;
+ this.element.style.backgroundColor = this.options.highlightcolor;
+ if (this.effect) {
+ this.effect.cancel();
+ }
+ Element.addClassName(this.element, this.options.hoverClassName)
+ },
+ leaveHover: function() {
+ if (this.options.backgroundColor) {
+ this.element.style.backgroundColor = this.oldBackground;
+ }
+ Element.removeClassName(this.element, this.options.hoverClassName)
+ if (this.saving) return;
+ this.effect = new Effect.Highlight(this.element, {
+ startcolor: this.options.highlightcolor,
+ endcolor: this.options.highlightendcolor,
+ restorecolor: this.originalBackground
+ });
+ },
+ leaveEditMode: function() {
+ Element.removeClassName(this.element, this.options.savingClassName);
+ this.removeForm();
+ this.leaveHover();
+ this.element.style.backgroundColor = this.originalBackground;
+ Element.show(this.element);
+ if (this.options.externalControl) {
+ Element.show(this.options.externalControl);
+ }
+ this.editing = false;
+ this.saving = false;
+ this.oldInnerHTML = null;
+ this.onLeaveEditMode();
+ },
+ onComplete: function(transport) {
+ this.leaveEditMode();
+ this.options.onComplete.bind(this)(transport, this.element);
+ },
+ onEnterEditMode: function() {},
+ onLeaveEditMode: function() {},
+ dispose: function() {
+ if (this.oldInnerHTML) {
+ this.element.innerHTML = this.oldInnerHTML;
+ }
+ this.leaveEditMode();
+ Event.stopObserving(this.element, 'click', this.onclickListener);
+ Event.stopObserving(this.element, 'mouseover', this.mouseoverListener);
+ Event.stopObserving(this.element, 'mouseout', this.mouseoutListener);
+ if (this.options.externalControl) {
+ Event.stopObserving(this.options.externalControl, 'click', this.onclickListener);
+ Event.stopObserving(this.options.externalControl, 'mouseover', this.mouseoverListener);
+ Event.stopObserving(this.options.externalControl, 'mouseout', this.mouseoutListener);
+ }
+ }
+};
+
+Ajax.InPlaceCollectionEditor = Class.create();
+Object.extend(Ajax.InPlaceCollectionEditor.prototype, Ajax.InPlaceEditor.prototype);
+Object.extend(Ajax.InPlaceCollectionEditor.prototype, {
+ createEditField: function() {
+ if (!this.cached_selectTag) {
+ var selectTag = document.createElement("select");
+ var collection = this.options.collection || [];
+ var optionTag;
+ collection.each(function(e,i) {
+ optionTag = document.createElement("option");
+ optionTag.value = (e instanceof Array) ? e[0] : e;
+ if((typeof this.options.value == 'undefined') &&
+ ((e instanceof Array) ? this.element.innerHTML == e[1] : e == optionTag.value)) optionTag.selected = true;
+ if(this.options.value==optionTag.value) optionTag.selected = true;
+ optionTag.appendChild(document.createTextNode((e instanceof Array) ? e[1] : e));
+ selectTag.appendChild(optionTag);
+ }.bind(this));
+ this.cached_selectTag = selectTag;
+ }
+
+ this.editField = this.cached_selectTag;
+ if(this.options.loadTextURL) this.loadExternalText();
+ this.form.appendChild(this.editField);
+ this.options.callback = function(form, value) {
+ return "value=" + encodeURIComponent(value);
+ }
+ }
+});
+
+// Delayed observer, like Form.Element.Observer,
+// but waits for delay after last key input
+// Ideal for live-search fields
+
+Form.Element.DelayedObserver = Class.create();
+Form.Element.DelayedObserver.prototype = {
+ initialize: function(element, delay, callback) {
+ this.delay = delay || 0.5;
+ this.element = $(element);
+ this.callback = callback;
+ this.timer = null;
+ this.lastValue = $F(this.element);
+ Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this));
+ },
+ delayedListener: function(event) {
+ if(this.lastValue == $F(this.element)) return;
+ if(this.timer) clearTimeout(this.timer);
+ this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);
+ this.lastValue = $F(this.element);
+ },
+ onTimerEvent: function() {
+ this.timer = null;
+ this.callback(this.element, $F(this.element));
+ }
+};
Added: trunk/framework/impl/src/main/javascript/scriptaculous/dragdrop.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/dragdrop.js (rev 0)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/dragdrop.js 2007-10-03 22:24:46 UTC (rev 3236)
@@ -0,0 +1,970 @@
+// script.aculo.us dragdrop.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi(a)oriontransfer.co.nz)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+if(typeof Effect == 'undefined')
+ throw("dragdrop.js requires including script.aculo.us' effects.js library");
+
+var Droppables = {
+ drops: [],
+
+ remove: function(element) {
+ this.drops = this.drops.reject(function(d) { return d.element==$(element) });
+ },
+
+ add: function(element) {
+ element = $(element);
+ var options = Object.extend({
+ greedy: true,
+ hoverclass: null,
+ tree: false
+ }, arguments[1] || {});
+
+ // cache containers
+ if(options.containment) {
+ options._containers = [];
+ var containment = options.containment;
+ if((typeof containment == 'object') &&
+ (containment.constructor == Array)) {
+ containment.each( function(c) { options._containers.push($(c)) });
+ } else {
+ options._containers.push($(containment));
+ }
+ }
+
+ if(options.accept) options.accept = [options.accept].flatten();
+
+ Element.makePositioned(element); // fix IE
+ options.element = element;
+
+ this.drops.push(options);
+ },
+
+ findDeepestChild: function(drops) {
+ deepest = drops[0];
+
+ for (i = 1; i < drops.length; ++i)
+ if (Element.isParent(drops[i].element, deepest.element))
+ deepest = drops[i];
+
+ return deepest;
+ },
+
+ isContained: function(element, drop) {
+ var containmentNode;
+ if(drop.tree) {
+ containmentNode = element.treeNode;
+ } else {
+ containmentNode = element.parentNode;
+ }
+ return drop._containers.detect(function(c) { return containmentNode == c });
+ },
+
+ isAffected: function(point, element, drop) {
+ return (
+ (drop.element!=element) &&
+ ((!drop._containers) ||
+ this.isContained(element, drop)) &&
+ ((!drop.accept) ||
+ (Element.classNames(element).detect(
+ function(v) { return drop.accept.include(v) } ) )) &&
+ Position.within(drop.element, point[0], point[1]) );
+ },
+
+ deactivate: function(drop) {
+ if(drop.hoverclass)
+ Element.removeClassName(drop.element, drop.hoverclass);
+ this.last_active = null;
+ },
+
+ activate: function(drop) {
+ if(drop.hoverclass)
+ Element.addClassName(drop.element, drop.hoverclass);
+ this.last_active = drop;
+ },
+
+ show: function(point, element) {
+ if(!this.drops.length) return;
+ var affected = [];
+
+ if(this.last_active) this.deactivate(this.last_active);
+ this.drops.each( function(drop) {
+ if(Droppables.isAffected(point, element, drop))
+ affected.push(drop);
+ });
+
+ if(affected.length>0) {
+ drop = Droppables.findDeepestChild(affected);
+ Position.within(drop.element, point[0], point[1]);
+ if(drop.onHover)
+ drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
+
+ Droppables.activate(drop);
+ }
+ },
+
+ fire: function(event, element) {
+ if(!this.last_active) return;
+ Position.prepare();
+
+ if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
+ if (this.last_active.onDrop) {
+ this.last_active.onDrop(element, this.last_active.element, event);
+ return true;
+ }
+ },
+
+ reset: function() {
+ if(this.last_active)
+ this.deactivate(this.last_active);
+ }
+}
+
+var Draggables = {
+ drags: [],
+ observers: [],
+
+ register: function(draggable) {
+ if(this.drags.length == 0) {
+ this.eventMouseUp = this.endDrag.bindAsEventListener(this);
+ this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
+ this.eventKeypress = this.keyPress.bindAsEventListener(this);
+
+ Event.observe(document, "mouseup", this.eventMouseUp);
+ Event.observe(document, "mousemove", this.eventMouseMove);
+ Event.observe(document, "keypress", this.eventKeypress);
+ }
+ this.drags.push(draggable);
+ },
+
+ unregister: function(draggable) {
+ this.drags = this.drags.reject(function(d) { return d==draggable });
+ if(this.drags.length == 0) {
+ Event.stopObserving(document, "mouseup", this.eventMouseUp);
+ Event.stopObserving(document, "mousemove", this.eventMouseMove);
+ Event.stopObserving(document, "keypress", this.eventKeypress);
+ }
+ },
+
+ activate: function(draggable) {
+ if(draggable.options.delay) {
+ this._timeout = setTimeout(function() {
+ Draggables._timeout = null;
+ window.focus();
+ Draggables.activeDraggable = draggable;
+ }.bind(this), draggable.options.delay);
+ } else {
+ window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
+ this.activeDraggable = draggable;
+ }
+ },
+
+ deactivate: function() {
+ this.activeDraggable = null;
+ },
+
+ updateDrag: function(event) {
+ if(!this.activeDraggable) return;
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ // Mozilla-based browsers fire successive mousemove events with
+ // the same coordinates, prevent needless redrawing (moz bug?)
+ if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
+ this._lastPointer = pointer;
+
+ this.activeDraggable.updateDrag(event, pointer);
+ },
+
+ endDrag: function(event) {
+ if(this._timeout) {
+ clearTimeout(this._timeout);
+ this._timeout = null;
+ }
+ if(!this.activeDraggable) return;
+ this._lastPointer = null;
+ this.activeDraggable.endDrag(event);
+ this.activeDraggable = null;
+ },
+
+ keyPress: function(event) {
+ if(this.activeDraggable)
+ this.activeDraggable.keyPress(event);
+ },
+
+ addObserver: function(observer) {
+ this.observers.push(observer);
+ this._cacheObserverCallbacks();
+ },
+
+ removeObserver: function(element) { // element instead of observer fixes mem leaks
+ this.observers = this.observers.reject( function(o) { return o.element==element });
+ this._cacheObserverCallbacks();
+ },
+
+ notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag'
+ if(this[eventName+'Count'] > 0)
+ this.observers.each( function(o) {
+ if(o[eventName]) o[eventName](eventName, draggable, event);
+ });
+ if(draggable.options[eventName]) draggable.options[eventName](draggable, event);
+ },
+
+ _cacheObserverCallbacks: function() {
+ ['onStart','onEnd','onDrag'].each( function(eventName) {
+ Draggables[eventName+'Count'] = Draggables.observers.select(
+ function(o) { return o[eventName]; }
+ ).length;
+ });
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Draggable = Class.create();
+Draggable._dragging = {};
+
+Draggable.prototype = {
+ initialize: function(element) {
+ var defaults = {
+ handle: false,
+ reverteffect: function(element, top_offset, left_offset) {
+ var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
+ new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur,
+ queue: {scope:'_draggable', position:'end'}
+ });
+ },
+ endeffect: function(element) {
+ var toOpacity = typeof element._opacity == 'number' ? element._opacity : 1.0;
+ new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity,
+ queue: {scope:'_draggable', position:'end'},
+ afterFinish: function(){
+ Draggable._dragging[element] = false
+ }
+ });
+ },
+ zindex: 1000,
+ revert: false,
+ quiet: false,
+ scroll: false,
+ scrollSensitivity: 20,
+ scrollSpeed: 15,
+ snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] }
+ delay: 0
+ };
+
+ if(!arguments[1] || typeof arguments[1].endeffect == 'undefined')
+ Object.extend(defaults, {
+ starteffect: function(element) {
+ element._opacity = Element.getOpacity(element);
+ Draggable._dragging[element] = true;
+ new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7});
+ }
+ });
+
+ var options = Object.extend(defaults, arguments[1] || {});
+
+ this.element = $(element);
+
+ if(options.handle && (typeof options.handle == 'string'))
+ this.handle = this.element.down('.'+options.handle, 0);
+
+ if(!this.handle) this.handle = $(options.handle);
+ if(!this.handle) this.handle = this.element;
+
+ if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {
+ options.scroll = $(options.scroll);
+ this._isScrollChild = Element.childOf(this.element, options.scroll);
+ }
+
+ Element.makePositioned(this.element); // fix IE
+
+ this.delta = this.currentDelta();
+ this.options = options;
+ this.dragging = false;
+
+ this.eventMouseDown = this.initDrag.bindAsEventListener(this);
+ Event.observe(this.handle, "mousedown", this.eventMouseDown);
+
+ Draggables.register(this);
+ },
+
+ destroy: function() {
+ Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
+ Draggables.unregister(this);
+ },
+
+ currentDelta: function() {
+ return([
+ parseInt(Element.getStyle(this.element,'left') || '0'),
+ parseInt(Element.getStyle(this.element,'top') || '0')]);
+ },
+
+ initDrag: function(event) {
+ if(typeof Draggable._dragging[this.element] != 'undefined' &&
+ Draggable._dragging[this.element]) return;
+ if(Event.isLeftClick(event)) {
+ // abort on form elements, fixes a Firefox issue
+ var src = Event.element(event);
+ if((tag_name = src.tagName.toUpperCase()) && (
+ tag_name=='INPUT' ||
+ tag_name=='SELECT' ||
+ tag_name=='OPTION' ||
+ tag_name=='BUTTON' ||
+ tag_name=='TEXTAREA')) return;
+
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ var pos = Position.cumulativeOffset(this.element);
+ this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
+
+ Draggables.activate(this);
+ Event.stop(event);
+ }
+ },
+
+ startDrag: function(event) {
+ this.dragging = true;
+
+ if(this.options.zindex) {
+ this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
+ this.element.style.zIndex = this.options.zindex;
+ }
+
+ if(this.options.ghosting) {
+ this._clone = this.element.cloneNode(true);
+ Position.absolutize(this.element);
+ this.element.parentNode.insertBefore(this._clone, this.element);
+ }
+
+ if(this.options.scroll) {
+ if (this.options.scroll == window) {
+ var where = this._getWindowScroll(this.options.scroll);
+ this.originalScrollLeft = where.left;
+ this.originalScrollTop = where.top;
+ } else {
+ this.originalScrollLeft = this.options.scroll.scrollLeft;
+ this.originalScrollTop = this.options.scroll.scrollTop;
+ }
+ }
+
+ Draggables.notify('onStart', this, event);
+
+ if(this.options.starteffect) this.options.starteffect(this.element);
+ },
+
+ updateDrag: function(event, pointer) {
+ if(!this.dragging) this.startDrag(event);
+
+ if(!this.options.quiet){
+ Position.prepare();
+ Droppables.show(pointer, this.element);
+ }
+
+ Draggables.notify('onDrag', this, event);
+
+ this.draw(pointer);
+ if(this.options.change) this.options.change(this);
+
+ if(this.options.scroll) {
+ this.stopScrolling();
+
+ var p;
+ if (this.options.scroll == window) {
+ with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
+ } else {
+ p = Position.page(this.options.scroll);
+ p[0] += this.options.scroll.scrollLeft + Position.deltaX;
+ p[1] += this.options.scroll.scrollTop + Position.deltaY;
+ p.push(p[0]+this.options.scroll.offsetWidth);
+ p.push(p[1]+this.options.scroll.offsetHeight);
+ }
+ var speed = [0,0];
+ if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity);
+ if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity);
+ if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity);
+ if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity);
+ this.startScrolling(speed);
+ }
+
+ // fix AppleWebKit rendering
+ if(Prototype.Browser.WebKit) window.scrollBy(0,0);
+
+ Event.stop(event);
+ },
+
+ finishDrag: function(event, success) {
+ this.dragging = false;
+
+ if(this.options.quiet){
+ Position.prepare();
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ Droppables.show(pointer, this.element);
+ }
+
+ if(this.options.ghosting) {
+ Position.relativize(this.element);
+ Element.remove(this._clone);
+ this._clone = null;
+ }
+
+ var dropped = false;
+ if(success) {
+ dropped = Droppables.fire(event, this.element);
+ if (!dropped) dropped = false;
+ }
+ if(dropped && this.options.onDropped) this.options.onDropped(this.element);
+ Draggables.notify('onEnd', this, event);
+
+ var revert = this.options.revert;
+ if(revert && typeof revert == 'function') revert = revert(this.element);
+
+ var d = this.currentDelta();
+ if(revert && this.options.reverteffect) {
+ if (dropped == 0 || revert != 'failure')
+ this.options.reverteffect(this.element,
+ d[1]-this.delta[1], d[0]-this.delta[0]);
+ } else {
+ this.delta = d;
+ }
+
+ if(this.options.zindex)
+ this.element.style.zIndex = this.originalZ;
+
+ if(this.options.endeffect)
+ this.options.endeffect(this.element);
+
+ Draggables.deactivate(this);
+ Droppables.reset();
+ },
+
+ keyPress: function(event) {
+ if(event.keyCode!=Event.KEY_ESC) return;
+ this.finishDrag(event, false);
+ Event.stop(event);
+ },
+
+ endDrag: function(event) {
+ if(!this.dragging) return;
+ this.stopScrolling();
+ this.finishDrag(event, true);
+ Event.stop(event);
+ },
+
+ draw: function(point) {
+ var pos = Position.cumulativeOffset(this.element);
+ if(this.options.ghosting) {
+ var r = Position.realOffset(this.element);
+ pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
+ }
+
+ var d = this.currentDelta();
+ pos[0] -= d[0]; pos[1] -= d[1];
+
+ if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
+ pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
+ pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
+ }
+
+ var p = [0,1].map(function(i){
+ return (point[i]-pos[i]-this.offset[i])
+ }.bind(this));
+
+ if(this.options.snap) {
+ if(typeof this.options.snap == 'function') {
+ p = this.options.snap(p[0],p[1],this);
+ } else {
+ if(this.options.snap instanceof Array) {
+ p = p.map( function(v, i) {
+ return Math.round(v/this.options.snap[i])*this.options.snap[i] }.bind(this))
+ } else {
+ p = p.map( function(v) {
+ return Math.round(v/this.options.snap)*this.options.snap }.bind(this))
+ }
+ }}
+
+ var style = this.element.style;
+ if((!this.options.constraint) || (this.options.constraint=='horizontal'))
+ style.left = p[0] + "px";
+ if((!this.options.constraint) || (this.options.constraint=='vertical'))
+ style.top = p[1] + "px";
+
+ if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
+ },
+
+ stopScrolling: function() {
+ if(this.scrollInterval) {
+ clearInterval(this.scrollInterval);
+ this.scrollInterval = null;
+ Draggables._lastScrollPointer = null;
+ }
+ },
+
+ startScrolling: function(speed) {
+ if(!(speed[0] || speed[1])) return;
+ this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];
+ this.lastScrolled = new Date();
+ this.scrollInterval = setInterval(this.scroll.bind(this), 10);
+ },
+
+ scroll: function() {
+ var current = new Date();
+ var delta = current - this.lastScrolled;
+ this.lastScrolled = current;
+ if(this.options.scroll == window) {
+ with (this._getWindowScroll(this.options.scroll)) {
+ if (this.scrollSpeed[0] || this.scrollSpeed[1]) {
+ var d = delta / 1000;
+ this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] );
+ }
+ }
+ } else {
+ this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;
+ this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000;
+ }
+
+ Position.prepare();
+ Droppables.show(Draggables._lastPointer, this.element);
+ Draggables.notify('onDrag', this);
+ if (this._isScrollChild) {
+ Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer);
+ Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000;
+ Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000;
+ if (Draggables._lastScrollPointer[0] < 0)
+ Draggables._lastScrollPointer[0] = 0;
+ if (Draggables._lastScrollPointer[1] < 0)
+ Draggables._lastScrollPointer[1] = 0;
+ this.draw(Draggables._lastScrollPointer);
+ }
+
+ if(this.options.change) this.options.change(this);
+ },
+
+ _getWindowScroll: function(w) {
+ var T, L, W, H;
+ with (w.document) {
+ if (w.document.documentElement && documentElement.scrollTop) {
+ T = documentElement.scrollTop;
+ L = documentElement.scrollLeft;
+ } else if (w.document.body) {
+ T = body.scrollTop;
+ L = body.scrollLeft;
+ }
+ if (w.innerWidth) {
+ W = w.innerWidth;
+ H = w.innerHeight;
+ } else if (w.document.documentElement && documentElement.clientWidth) {
+ W = documentElement.clientWidth;
+ H = documentElement.clientHeight;
+ } else {
+ W = body.offsetWidth;
+ H = body.offsetHeight
+ }
+ }
+ return { top: T, left: L, width: W, height: H };
+ }
+}
+
+/*--------------------------------------------------------------------------*/
+
+var SortableObserver = Class.create();
+SortableObserver.prototype = {
+ initialize: function(element, observer) {
+ this.element = $(element);
+ this.observer = observer;
+ this.lastValue = Sortable.serialize(this.element);
+ },
+
+ onStart: function() {
+ this.lastValue = Sortable.serialize(this.element);
+ },
+
+ onEnd: function() {
+ Sortable.unmark();
+ if(this.lastValue != Sortable.serialize(this.element))
+ this.observer(this.element)
+ }
+}
+
+var Sortable = {
+ SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,
+
+ sortables: {},
+
+ _findRootElement: function(element) {
+ while (element.tagName.toUpperCase() != "BODY") {
+ if(element.id && Sortable.sortables[element.id]) return element;
+ element = element.parentNode;
+ }
+ },
+
+ options: function(element) {
+ element = Sortable._findRootElement($(element));
+ if(!element) return;
+ return Sortable.sortables[element.id];
+ },
+
+ destroy: function(element){
+ var s = Sortable.options(element);
+
+ if(s) {
+ Draggables.removeObserver(s.element);
+ s.droppables.each(function(d){ Droppables.remove(d) });
+ s.draggables.invoke('destroy');
+
+ delete Sortable.sortables[s.element.id];
+ }
+ },
+
+ create: function(element) {
+ element = $(element);
+ var options = Object.extend({
+ element: element,
+ tag: 'li', // assumes li children, override with tag: 'tagname'
+ dropOnEmpty: false,
+ tree: false,
+ treeTag: 'ul',
+ overlap: 'vertical', // one of 'vertical', 'horizontal'
+ constraint: 'vertical', // one of 'vertical', 'horizontal', false
+ containment: element, // also takes array of elements (or id's); or false
+ handle: false, // or a CSS class
+ only: false,
+ delay: 0,
+ hoverclass: null,
+ ghosting: false,
+ quiet: false,
+ scroll: false,
+ scrollSensitivity: 20,
+ scrollSpeed: 15,
+ format: this.SERIALIZE_RULE,
+
+ // these take arrays of elements or ids and can be
+ // used for better initialization performance
+ elements: false,
+ handles: false,
+
+ onChange: Prototype.emptyFunction,
+ onUpdate: Prototype.emptyFunction
+ }, arguments[1] || {});
+
+ // clear any old sortable with same element
+ this.destroy(element);
+
+ // build options for the draggables
+ var options_for_draggable = {
+ revert: true,
+ quiet: options.quiet,
+ scroll: options.scroll,
+ scrollSpeed: options.scrollSpeed,
+ scrollSensitivity: options.scrollSensitivity,
+ delay: options.delay,
+ ghosting: options.ghosting,
+ constraint: options.constraint,
+ handle: options.handle };
+
+ if(options.starteffect)
+ options_for_draggable.starteffect = options.starteffect;
+
+ if(options.reverteffect)
+ options_for_draggable.reverteffect = options.reverteffect;
+ else
+ if(options.ghosting) options_for_draggable.reverteffect = function(element) {
+ element.style.top = 0;
+ element.style.left = 0;
+ };
+
+ if(options.endeffect)
+ options_for_draggable.endeffect = options.endeffect;
+
+ if(options.zindex)
+ options_for_draggable.zindex = options.zindex;
+
+ // build options for the droppables
+ var options_for_droppable = {
+ overlap: options.overlap,
+ containment: options.containment,
+ tree: options.tree,
+ hoverclass: options.hoverclass,
+ onHover: Sortable.onHover
+ }
+
+ var options_for_tree = {
+ onHover: Sortable.onEmptyHover,
+ overlap: options.overlap,
+ containment: options.containment,
+ hoverclass: options.hoverclass
+ }
+
+ // fix for gecko engine
+ Element.cleanWhitespace(element);
+
+ options.draggables = [];
+ options.droppables = [];
+
+ // drop on empty handling
+ if(options.dropOnEmpty || options.tree) {
+ Droppables.add(element, options_for_tree);
+ options.droppables.push(element);
+ }
+
+ (options.elements || this.findElements(element, options) || []).each( function(e,i) {
+ var handle = options.handles ? $(options.handles[i]) :
+ (options.handle ? $(e).getElementsByClassName(options.handle)[0] : e);
+ options.draggables.push(
+ new Draggable(e, Object.extend(options_for_draggable, { handle: handle })));
+ Droppables.add(e, options_for_droppable);
+ if(options.tree) e.treeNode = element;
+ options.droppables.push(e);
+ });
+
+ if(options.tree) {
+ (Sortable.findTreeElements(element, options) || []).each( function(e) {
+ Droppables.add(e, options_for_tree);
+ e.treeNode = element;
+ options.droppables.push(e);
+ });
+ }
+
+ // keep reference
+ this.sortables[element.id] = options;
+
+ // for onupdate
+ Draggables.addObserver(new SortableObserver(element, options.onUpdate));
+
+ },
+
+ // return all suitable-for-sortable elements in a guaranteed order
+ findElements: function(element, options) {
+ return Element.findChildren(
+ element, options.only, options.tree ? true : false, options.tag);
+ },
+
+ findTreeElements: function(element, options) {
+ return Element.findChildren(
+ element, options.only, options.tree ? true : false, options.treeTag);
+ },
+
+ onHover: function(element, dropon, overlap) {
+ if(Element.isParent(dropon, element)) return;
+
+ if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) {
+ return;
+ } else if(overlap>0.5) {
+ Sortable.mark(dropon, 'before');
+ if(dropon.previousSibling != element) {
+ var oldParentNode = element.parentNode;
+ element.style.visibility = "hidden"; // fix gecko rendering
+ dropon.parentNode.insertBefore(element, dropon);
+ if(dropon.parentNode!=oldParentNode)
+ Sortable.options(oldParentNode).onChange(element);
+ Sortable.options(dropon.parentNode).onChange(element);
+ }
+ } else {
+ Sortable.mark(dropon, 'after');
+ var nextElement = dropon.nextSibling || null;
+ if(nextElement != element) {
+ var oldParentNode = element.parentNode;
+ element.style.visibility = "hidden"; // fix gecko rendering
+ dropon.parentNode.insertBefore(element, nextElement);
+ if(dropon.parentNode!=oldParentNode)
+ Sortable.options(oldParentNode).onChange(element);
+ Sortable.options(dropon.parentNode).onChange(element);
+ }
+ }
+ },
+
+ onEmptyHover: function(element, dropon, overlap) {
+ var oldParentNode = element.parentNode;
+ var droponOptions = Sortable.options(dropon);
+
+ if(!Element.isParent(dropon, element)) {
+ var index;
+
+ var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only});
+ var child = null;
+
+ if(children) {
+ var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap);
+
+ for (index = 0; index < children.length; index += 1) {
+ if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) {
+ offset -= Element.offsetSize (children[index], droponOptions.overlap);
+ } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) {
+ child = index + 1 < children.length ? children[index + 1] : null;
+ break;
+ } else {
+ child = children[index];
+ break;
+ }
+ }
+ }
+
+ dropon.insertBefore(element, child);
+
+ Sortable.options(oldParentNode).onChange(element);
+ droponOptions.onChange(element);
+ }
+ },
+
+ unmark: function() {
+ if(Sortable._marker) Sortable._marker.hide();
+ },
+
+ mark: function(dropon, position) {
+ // mark on ghosting only
+ var sortable = Sortable.options(dropon.parentNode);
+ if(sortable && !sortable.ghosting) return;
+
+ if(!Sortable._marker) {
+ Sortable._marker =
+ ($('dropmarker') || Element.extend(document.createElement('DIV'))).
+ hide().addClassName('dropmarker').setStyle({position:'absolute'});
+ document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
+ }
+ var offsets = Position.cumulativeOffset(dropon);
+ Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
+
+ if(position=='after')
+ if(sortable.overlap == 'horizontal')
+ Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'});
+ else
+ Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'});
+
+ Sortable._marker.show();
+ },
+
+ _tree: function(element, options, parent) {
+ var children = Sortable.findElements(element, options) || [];
+
+ for (var i = 0; i < children.length; ++i) {
+ var match = children[i].id.match(options.format);
+
+ if (!match) continue;
+
+ var child = {
+ id: encodeURIComponent(match ? match[1] : null),
+ element: element,
+ parent: parent,
+ children: [],
+ position: parent.children.length,
+ container: $(children[i]).down(options.treeTag)
+ }
+
+ /* Get the element containing the children and recurse over it */
+ if (child.container)
+ this._tree(child.container, options, child)
+
+ parent.children.push (child);
+ }
+
+ return parent;
+ },
+
+ tree: function(element) {
+ element = $(element);
+ var sortableOptions = this.options(element);
+ var options = Object.extend({
+ tag: sortableOptions.tag,
+ treeTag: sortableOptions.treeTag,
+ only: sortableOptions.only,
+ name: element.id,
+ format: sortableOptions.format
+ }, arguments[1] || {});
+
+ var root = {
+ id: null,
+ parent: null,
+ children: [],
+ container: element,
+ position: 0
+ }
+
+ return Sortable._tree(element, options, root);
+ },
+
+ /* Construct a [i] index for a particular node */
+ _constructIndex: function(node) {
+ var index = '';
+ do {
+ if (node.id) index = '[' + node.position + ']' + index;
+ } while ((node = node.parent) != null);
+ return index;
+ },
+
+ sequence: function(element) {
+ element = $(element);
+ var options = Object.extend(this.options(element), arguments[1] || {});
+
+ return $(this.findElements(element, options) || []).map( function(item) {
+ return item.id.match(options.format) ? item.id.match(options.format)[1] : '';
+ });
+ },
+
+ setSequence: function(element, new_sequence) {
+ element = $(element);
+ var options = Object.extend(this.options(element), arguments[2] || {});
+
+ var nodeMap = {};
+ this.findElements(element, options).each( function(n) {
+ if (n.id.match(options.format))
+ nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode];
+ n.parentNode.removeChild(n);
+ });
+
+ new_sequence.each(function(ident) {
+ var n = nodeMap[ident];
+ if (n) {
+ n[1].appendChild(n[0]);
+ delete nodeMap[ident];
+ }
+ });
+ },
+
+ serialize: function(element) {
+ element = $(element);
+ var options = Object.extend(Sortable.options(element), arguments[1] || {});
+ var name = encodeURIComponent(
+ (arguments[1] && arguments[1].name) ? arguments[1].name : element.id);
+
+ if (options.tree) {
+ return Sortable.tree(element, arguments[1]).children.map( function (item) {
+ return [name + Sortable._constructIndex(item) + "[id]=" +
+ encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));
+ }).flatten().join('&');
+ } else {
+ return Sortable.sequence(element, arguments[1]).map( function(item) {
+ return name + "[]=" + encodeURIComponent(item);
+ }).join('&');
+ }
+ }
+}
+
+// Returns true if child is contained within element
+Element.isParent = function(child, element) {
+ if (!child.parentNode || child == element) return false;
+ if (child.parentNode == element) return true;
+ return Element.isParent(child.parentNode, element);
+}
+
+Element.findChildren = function(element, only, recursive, tagName) {
+ if(!element.hasChildNodes()) return null;
+ tagName = tagName.toUpperCase();
+ if(only) only = [only].flatten();
+ var elements = [];
+ $A(element.childNodes).each( function(e) {
+ if(e.tagName && e.tagName.toUpperCase()==tagName &&
+ (!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))
+ elements.push(e);
+ if(recursive) {
+ var grandchildren = Element.findChildren(e, only, recursive, tagName);
+ if(grandchildren) elements.push(grandchildren);
+ }
+ });
+
+ return (elements.length>0 ? elements.flatten() : []);
+}
+
+Element.offsetSize = function (element, type) {
+ return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
+}
Added: trunk/framework/impl/src/main/javascript/scriptaculous/effects.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/effects.js (rev 0)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/effects.js 2007-10-03 22:24:46 UTC (rev 3236)
@@ -0,0 +1,1094 @@
+// script.aculo.us effects.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// Contributors:
+// Justin Palmer (http://encytemedia.com/)
+// Mark Pilgrim (http://diveintomark.org/)
+// Martin Bialasinki
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// converts rgb() and #xxx to #xxxxxx format,
+// returns self (or first argument) if not convertable
+String.prototype.parseColor = function() {
+ var color = '#';
+ if(this.slice(0,4) == 'rgb(') {
+ var cols = this.slice(4,this.length-1).split(',');
+ var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);
+ } else {
+ if(this.slice(0,1) == '#') {
+ if(this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
+ if(this.length==7) color = this.toLowerCase();
+ }
+ }
+ return(color.length==7 ? color : (arguments[0] || this));
+}
+
+/*--------------------------------------------------------------------------*/
+
+Element.collectTextNodes = function(element) {
+ return $A($(element).childNodes).collect( function(node) {
+ return (node.nodeType==3 ? node.nodeValue :
+ (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
+ }).flatten().join('');
+}
+
+Element.collectTextNodesIgnoreClass = function(element, className) {
+ return $A($(element).childNodes).collect( function(node) {
+ return (node.nodeType==3 ? node.nodeValue :
+ ((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
+ Element.collectTextNodesIgnoreClass(node, className) : ''));
+ }).flatten().join('');
+}
+
+Element.setContentZoom = function(element, percent) {
+ element = $(element);
+ element.setStyle({fontSize: (percent/100) + 'em'});
+ if(Prototype.Browser.WebKit) window.scrollBy(0,0);
+ return element;
+}
+
+Element.getInlineOpacity = function(element){
+ return $(element).style.opacity || '';
+}
+
+Element.forceRerendering = function(element) {
+ try {
+ element = $(element);
+ var n = document.createTextNode(' ');
+ element.appendChild(n);
+ element.removeChild(n);
+ } catch(e) { }
+};
+
+/*--------------------------------------------------------------------------*/
+
+Array.prototype.call = function() {
+ var args = arguments;
+ this.each(function(f){ f.apply(this, args) });
+}
+
+/*--------------------------------------------------------------------------*/
+
+var Effect = {
+ _elementDoesNotExistError: {
+ name: 'ElementDoesNotExistError',
+ message: 'The specified DOM element does not exist, but is required for this effect to operate'
+ },
+ tagifyText: function(element) {
+ if(typeof Builder == 'undefined')
+ throw("Effect.tagifyText requires including script.aculo.us' builder.js library");
+
+ var tagifyStyle = 'position:relative';
+ if(Prototype.Browser.IE) tagifyStyle += ';zoom:1';
+
+ element = $(element);
+ $A(element.childNodes).each( function(child) {
+ if(child.nodeType==3) {
+ child.nodeValue.toArray().each( function(character) {
+ element.insertBefore(
+ Builder.node('span',{style: tagifyStyle},
+ character == ' ' ? String.fromCharCode(160) : character),
+ child);
+ });
+ Element.remove(child);
+ }
+ });
+ },
+ multiple: function(element, effect) {
+ var elements;
+ if(((typeof element == 'object') ||
+ (typeof element == 'function')) &&
+ (element.length))
+ elements = element;
+ else
+ elements = $(element).childNodes;
+
+ var options = Object.extend({
+ speed: 0.1,
+ delay: 0.0
+ }, arguments[2] || {});
+ var masterDelay = options.delay;
+
+ $A(elements).each( function(element, index) {
+ new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
+ });
+ },
+ PAIRS: {
+ 'slide': ['SlideDown','SlideUp'],
+ 'blind': ['BlindDown','BlindUp'],
+ 'appear': ['Appear','Fade']
+ },
+ toggle: function(element, effect) {
+ element = $(element);
+ effect = (effect || 'appear').toLowerCase();
+ var options = Object.extend({
+ queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
+ }, arguments[2] || {});
+ Effect[element.visible() ?
+ Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
+ }
+};
+
+var Effect2 = Effect; // deprecated
+
+/* ------------- transitions ------------- */
+
+Effect.Transitions = {
+ linear: Prototype.K,
+ sinoidal: function(pos) {
+ return (-Math.cos(pos*Math.PI)/2) + 0.5;
+ },
+ reverse: function(pos) {
+ return 1-pos;
+ },
+ flicker: function(pos) {
+ var pos = ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
+ return (pos > 1 ? 1 : pos);
+ },
+ wobble: function(pos) {
+ return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
+ },
+ pulse: function(pos, pulses) {
+ pulses = pulses || 5;
+ return (
+ Math.round((pos % (1/pulses)) * pulses) == 0 ?
+ ((pos * pulses * 2) - Math.floor(pos * pulses * 2)) :
+ 1 - ((pos * pulses * 2) - Math.floor(pos * pulses * 2))
+ );
+ },
+ none: function(pos) {
+ return 0;
+ },
+ full: function(pos) {
+ return 1;
+ }
+};
+
+/* ------------- core effects ------------- */
+
+Effect.ScopedQueue = Class.create();
+Object.extend(Object.extend(Effect.ScopedQueue.prototype, Enumerable), {
+ initialize: function() {
+ this.effects = [];
+ this.interval = null;
+ },
+ _each: function(iterator) {
+ this.effects._each(iterator);
+ },
+ add: function(effect) {
+ var timestamp = new Date().getTime();
+
+ var position = (typeof effect.options.queue == 'string') ?
+ effect.options.queue : effect.options.queue.position;
+
+ switch(position) {
+ case 'front':
+ // move unstarted effects after this effect
+ this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
+ e.startOn += effect.finishOn;
+ e.finishOn += effect.finishOn;
+ });
+ break;
+ case 'with-last':
+ timestamp = this.effects.pluck('startOn').max() || timestamp;
+ break;
+ case 'end':
+ // start effect after last queued effect has finished
+ timestamp = this.effects.pluck('finishOn').max() || timestamp;
+ break;
+ }
+
+ effect.startOn += timestamp;
+ effect.finishOn += timestamp;
+
+ if(!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))
+ this.effects.push(effect);
+
+ if(!this.interval)
+ this.interval = setInterval(this.loop.bind(this), 15);
+ },
+ remove: function(effect) {
+ this.effects = this.effects.reject(function(e) { return e==effect });
+ if(this.effects.length == 0) {
+ clearInterval(this.interval);
+ this.interval = null;
+ }
+ },
+ loop: function() {
+ var timePos = new Date().getTime();
+ for(var i=0, len=this.effects.length;i<len;i++)
+ this.effects[i] && this.effects[i].loop(timePos);
+ }
+});
+
+Effect.Queues = {
+ instances: $H(),
+ get: function(queueName) {
+ if(typeof queueName != 'string') return queueName;
+
+ if(!this.instances[queueName])
+ this.instances[queueName] = new Effect.ScopedQueue();
+
+ return this.instances[queueName];
+ }
+}
+Effect.Queue = Effect.Queues.get('global');
+
+Effect.DefaultOptions = {
+ transition: Effect.Transitions.sinoidal,
+ duration: 1.0, // seconds
+ fps: 100, // 100= assume 66fps max.
+ sync: false, // true for combining
+ from: 0.0,
+ to: 1.0,
+ delay: 0.0,
+ queue: 'parallel'
+}
+
+Effect.Base = function() {};
+Effect.Base.prototype = {
+ position: null,
+ start: function(options) {
+ function codeForEvent(options,eventName){
+ return (
+ (options[eventName+'Internal'] ? 'this.options.'+eventName+'Internal(this);' : '') +
+ (options[eventName] ? 'this.options.'+eventName+'(this);' : '')
+ );
+ }
+ if(options.transition === false) options.transition = Effect.Transitions.linear;
+ this.options = Object.extend(Object.extend({},Effect.DefaultOptions), options || {});
+ this.currentFrame = 0;
+ this.state = 'idle';
+ this.startOn = this.options.delay*1000;
+ this.finishOn = this.startOn+(this.options.duration*1000);
+ this.fromToDelta = this.options.to-this.options.from;
+ this.totalTime = this.finishOn-this.startOn;
+ this.totalFrames = this.options.fps*this.options.duration;
+
+ eval('this.render = function(pos){ '+
+ 'if(this.state=="idle"){this.state="running";'+
+ codeForEvent(options,'beforeSetup')+
+ (this.setup ? 'this.setup();':'')+
+ codeForEvent(options,'afterSetup')+
+ '};if(this.state=="running"){'+
+ 'pos=this.options.transition(pos)*'+this.fromToDelta+'+'+this.options.from+';'+
+ 'this.position=pos;'+
+ codeForEvent(options,'beforeUpdate')+
+ (this.update ? 'this.update(pos);':'')+
+ codeForEvent(options,'afterUpdate')+
+ '}}');
+
+ this.event('beforeStart');
+ if(!this.options.sync)
+ Effect.Queues.get(typeof this.options.queue == 'string' ?
+ 'global' : this.options.queue.scope).add(this);
+ },
+ loop: function(timePos) {
+ if(timePos >= this.startOn) {
+ if(timePos >= this.finishOn) {
+ this.render(1.0);
+ this.cancel();
+ this.event('beforeFinish');
+ if(this.finish) this.finish();
+ this.event('afterFinish');
+ return;
+ }
+ var pos = (timePos - this.startOn) / this.totalTime,
+ frame = Math.round(pos * this.totalFrames);
+ if(frame > this.currentFrame) {
+ this.render(pos);
+ this.currentFrame = frame;
+ }
+ }
+ },
+ cancel: function() {
+ if(!this.options.sync)
+ Effect.Queues.get(typeof this.options.queue == 'string' ?
+ 'global' : this.options.queue.scope).remove(this);
+ this.state = 'finished';
+ },
+ event: function(eventName) {
+ if(this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
+ if(this.options[eventName]) this.options[eventName](this);
+ },
+ inspect: function() {
+ var data = $H();
+ for(property in this)
+ if(typeof this[property] != 'function') data[property] = this[property];
+ return '#<Effect:' + data.inspect() + ',options:' + $H(this.options).inspect() + '>';
+ }
+}
+
+Effect.Parallel = Class.create();
+Object.extend(Object.extend(Effect.Parallel.prototype, Effect.Base.prototype), {
+ initialize: function(effects) {
+ this.effects = effects || [];
+ this.start(arguments[1]);
+ },
+ update: function(position) {
+ this.effects.invoke('render', position);
+ },
+ finish: function(position) {
+ this.effects.each( function(effect) {
+ effect.render(1.0);
+ effect.cancel();
+ effect.event('beforeFinish');
+ if(effect.finish) effect.finish(position);
+ effect.event('afterFinish');
+ });
+ }
+});
+
+Effect.Event = Class.create();
+Object.extend(Object.extend(Effect.Event.prototype, Effect.Base.prototype), {
+ initialize: function() {
+ var options = Object.extend({
+ duration: 0
+ }, arguments[0] || {});
+ this.start(options);
+ },
+ update: Prototype.emptyFunction
+});
+
+Effect.Opacity = Class.create();
+Object.extend(Object.extend(Effect.Opacity.prototype, Effect.Base.prototype), {
+ initialize: function(element) {
+ this.element = $(element);
+ if(!this.element) throw(Effect._elementDoesNotExistError);
+ // make this work on IE on elements without 'layout'
+ if(Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
+ this.element.setStyle({zoom: 1});
+ var options = Object.extend({
+ from: this.element.getOpacity() || 0.0,
+ to: 1.0
+ }, arguments[1] || {});
+ this.start(options);
+ },
+ update: function(position) {
+ this.element.setOpacity(position);
+ }
+});
+
+Effect.Move = Class.create();
+Object.extend(Object.extend(Effect.Move.prototype, Effect.Base.prototype), {
+ initialize: function(element) {
+ this.element = $(element);
+ if(!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ x: 0,
+ y: 0,
+ mode: 'relative'
+ }, arguments[1] || {});
+ this.start(options);
+ },
+ setup: function() {
+ // Bug in Opera: Opera returns the "real" position of a static element or
+ // relative element that does not have top/left explicitly set.
+ // ==> Always set top and left for position relative elements in your stylesheets
+ // (to 0 if you do not need them)
+ this.element.makePositioned();
+ this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
+ this.originalTop = parseFloat(this.element.getStyle('top') || '0');
+ if(this.options.mode == 'absolute') {
+ // absolute movement, so we need to calc deltaX and deltaY
+ this.options.x = this.options.x - this.originalLeft;
+ this.options.y = this.options.y - this.originalTop;
+ }
+ },
+ update: function(position) {
+ this.element.setStyle({
+ left: Math.round(this.options.x * position + this.originalLeft) + 'px',
+ top: Math.round(this.options.y * position + this.originalTop) + 'px'
+ });
+ }
+});
+
+// for backwards compatibility
+Effect.MoveBy = function(element, toTop, toLeft) {
+ return new Effect.Move(element,
+ Object.extend({ x: toLeft, y: toTop }, arguments[3] || {}));
+};
+
+Effect.Scale = Class.create();
+Object.extend(Object.extend(Effect.Scale.prototype, Effect.Base.prototype), {
+ initialize: function(element, percent) {
+ this.element = $(element);
+ if(!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ scaleX: true,
+ scaleY: true,
+ scaleContent: true,
+ scaleFromCenter: false,
+ scaleMode: 'box', // 'box' or 'contents' or {} with provided values
+ scaleFrom: 100.0,
+ scaleTo: percent
+ }, arguments[2] || {});
+ this.start(options);
+ },
+ setup: function() {
+ this.restoreAfterFinish = this.options.restoreAfterFinish || false;
+ this.elementPositioning = this.element.getStyle('position');
+
+ this.originalStyle = {};
+ ['top','left','width','height','fontSize'].each( function(k) {
+ this.originalStyle[k] = this.element.style[k];
+ }.bind(this));
+
+ this.originalTop = this.element.offsetTop;
+ this.originalLeft = this.element.offsetLeft;
+
+ var fontSize = this.element.getStyle('font-size') || '100%';
+ ['em','px','%','pt'].each( function(fontSizeType) {
+ if(fontSize.indexOf(fontSizeType)>0) {
+ this.fontSize = parseFloat(fontSize);
+ this.fontSizeType = fontSizeType;
+ }
+ }.bind(this));
+
+ this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
+
+ this.dims = null;
+ if(this.options.scaleMode=='box')
+ this.dims = [this.element.offsetHeight, this.element.offsetWidth];
+ if(/^content/.test(this.options.scaleMode))
+ this.dims = [this.element.scrollHeight, this.element.scrollWidth];
+ if(!this.dims)
+ this.dims = [this.options.scaleMode.originalHeight,
+ this.options.scaleMode.originalWidth];
+ },
+ update: function(position) {
+ var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
+ if(this.options.scaleContent && this.fontSize)
+ this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });
+ this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
+ },
+ finish: function(position) {
+ if(this.restoreAfterFinish) this.element.setStyle(this.originalStyle);
+ },
+ setDimensions: function(height, width) {
+ var d = {};
+ if(this.options.scaleX) d.width = Math.round(width) + 'px';
+ if(this.options.scaleY) d.height = Math.round(height) + 'px';
+ if(this.options.scaleFromCenter) {
+ var topd = (height - this.dims[0])/2;
+ var leftd = (width - this.dims[1])/2;
+ if(this.elementPositioning == 'absolute') {
+ if(this.options.scaleY) d.top = this.originalTop-topd + 'px';
+ if(this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
+ } else {
+ if(this.options.scaleY) d.top = -topd + 'px';
+ if(this.options.scaleX) d.left = -leftd + 'px';
+ }
+ }
+ this.element.setStyle(d);
+ }
+});
+
+Effect.Highlight = Class.create();
+Object.extend(Object.extend(Effect.Highlight.prototype, Effect.Base.prototype), {
+ initialize: function(element) {
+ this.element = $(element);
+ if(!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || {});
+ this.start(options);
+ },
+ setup: function() {
+ // Prevent executing on elements not in the layout flow
+ if(this.element.getStyle('display')=='none') { this.cancel(); return; }
+ // Disable background image during the effect
+ this.oldStyle = {};
+ if (!this.options.keepBackgroundImage) {
+ this.oldStyle.backgroundImage = this.element.getStyle('background-image');
+ this.element.setStyle({backgroundImage: 'none'});
+ }
+ if(!this.options.endcolor)
+ this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
+ if(!this.options.restorecolor)
+ this.options.restorecolor = this.element.getStyle('background-color');
+ // init color calculations
+ this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
+ this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
+ },
+ update: function(position) {
+ this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
+ return m+(Math.round(this._base[i]+(this._delta[i]*position)).toColorPart()); }.bind(this)) });
+ },
+ finish: function() {
+ this.element.setStyle(Object.extend(this.oldStyle, {
+ backgroundColor: this.options.restorecolor
+ }));
+ }
+});
+
+Effect.ScrollTo = Class.create();
+Object.extend(Object.extend(Effect.ScrollTo.prototype, Effect.Base.prototype), {
+ initialize: function(element) {
+ this.element = $(element);
+ this.start(arguments[1] || {});
+ },
+ setup: function() {
+ Position.prepare();
+ var offsets = Position.cumulativeOffset(this.element);
+ if(this.options.offset) offsets[1] += this.options.offset;
+ var max = window.innerHeight ?
+ window.height - window.innerHeight :
+ document.body.scrollHeight -
+ (document.documentElement.clientHeight ?
+ document.documentElement.clientHeight : document.body.clientHeight);
+ this.scrollStart = Position.deltaY;
+ this.delta = (offsets[1] > max ? max : offsets[1]) - this.scrollStart;
+ },
+ update: function(position) {
+ Position.prepare();
+ window.scrollTo(Position.deltaX,
+ this.scrollStart + (position*this.delta));
+ }
+});
+
+/* ------------- combination effects ------------- */
+
+Effect.Fade = function(element) {
+ element = $(element);
+ var oldOpacity = element.getInlineOpacity();
+ var options = Object.extend({
+ from: element.getOpacity() || 1.0,
+ to: 0.0,
+ afterFinishInternal: function(effect) {
+ if(effect.options.to!=0) return;
+ effect.element.hide().setStyle({opacity: oldOpacity});
+ }}, arguments[1] || {});
+ return new Effect.Opacity(element,options);
+}
+
+Effect.Appear = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
+ to: 1.0,
+ // force Safari to render floated elements properly
+ afterFinishInternal: function(effect) {
+ effect.element.forceRerendering();
+ },
+ beforeSetup: function(effect) {
+ effect.element.setOpacity(effect.options.from).show();
+ }}, arguments[1] || {});
+ return new Effect.Opacity(element,options);
+}
+
+Effect.Puff = function(element) {
+ element = $(element);
+ var oldStyle = {
+ opacity: element.getInlineOpacity(),
+ position: element.getStyle('position'),
+ top: element.style.top,
+ left: element.style.left,
+ width: element.style.width,
+ height: element.style.height
+ };
+ return new Effect.Parallel(
+ [ new Effect.Scale(element, 200,
+ { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }),
+ new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
+ Object.extend({ duration: 1.0,
+ beforeSetupInternal: function(effect) {
+ Position.absolutize(effect.effects[0].element)
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().setStyle(oldStyle); }
+ }, arguments[1] || {})
+ );
+}
+
+Effect.BlindUp = function(element) {
+ element = $(element);
+ element.makeClipping();
+ return new Effect.Scale(element, 0,
+ Object.extend({ scaleContent: false,
+ scaleX: false,
+ restoreAfterFinish: true,
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping();
+ }
+ }, arguments[1] || {})
+ );
+}
+
+Effect.BlindDown = function(element) {
+ element = $(element);
+ var elementDimensions = element.getDimensions();
+ return new Effect.Scale(element, 100, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ scaleFrom: 0,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+ restoreAfterFinish: true,
+ afterSetup: function(effect) {
+ effect.element.makeClipping().setStyle({height: '0px'}).show();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.undoClipping();
+ }
+ }, arguments[1] || {}));
+}
+
+Effect.SwitchOff = function(element) {
+ element = $(element);
+ var oldOpacity = element.getInlineOpacity();
+ return new Effect.Appear(element, Object.extend({
+ duration: 0.4,
+ from: 0,
+ transition: Effect.Transitions.flicker,
+ afterFinishInternal: function(effect) {
+ new Effect.Scale(effect.element, 1, {
+ duration: 0.3, scaleFromCenter: true,
+ scaleX: false, scaleContent: false, restoreAfterFinish: true,
+ beforeSetup: function(effect) {
+ effect.element.makePositioned().makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
+ }
+ })
+ }
+ }, arguments[1] || {}));
+}
+
+Effect.DropOut = function(element) {
+ element = $(element);
+ var oldStyle = {
+ top: element.getStyle('top'),
+ left: element.getStyle('left'),
+ opacity: element.getInlineOpacity() };
+ return new Effect.Parallel(
+ [ new Effect.Move(element, {x: 0, y: 100, sync: true }),
+ new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
+ Object.extend(
+ { duration: 0.5,
+ beforeSetup: function(effect) {
+ effect.effects[0].element.makePositioned();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
+ }
+ }, arguments[1] || {}));
+}
+
+Effect.Shake = function(element) {
+ element = $(element);
+ var oldStyle = {
+ top: element.getStyle('top'),
+ left: element.getStyle('left') };
+ return new Effect.Move(element,
+ { x: 20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: 40, y: 0, duration: 0.1, afterFinishInternal: function(effect) {
+ new Effect.Move(effect.element,
+ { x: -20, y: 0, duration: 0.05, afterFinishInternal: function(effect) {
+ effect.element.undoPositioned().setStyle(oldStyle);
+ }}) }}) }}) }}) }}) }});
+}
+
+Effect.SlideDown = function(element) {
+ element = $(element).cleanWhitespace();
+ // SlideDown need to have the content of the element wrapped in a container element with fixed height!
+ var oldInnerBottom = element.down().getStyle('bottom');
+ var elementDimensions = element.getDimensions();
+ return new Effect.Scale(element, 100, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ scaleFrom: window.opera ? 0 : 1,
+ scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
+ restoreAfterFinish: true,
+ afterSetup: function(effect) {
+ effect.element.makePositioned();
+ effect.element.down().makePositioned();
+ if(window.opera) effect.element.setStyle({top: ''});
+ effect.element.makeClipping().setStyle({height: '0px'}).show();
+ },
+ afterUpdateInternal: function(effect) {
+ effect.element.down().setStyle({bottom:
+ (effect.dims[0] - effect.element.clientHeight) + 'px' });
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.undoClipping().undoPositioned();
+ effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }
+ }, arguments[1] || {})
+ );
+}
+
+Effect.SlideUp = function(element) {
+ element = $(element).cleanWhitespace();
+ var oldInnerBottom = element.down().getStyle('bottom');
+ return new Effect.Scale(element, window.opera ? 0 : 1,
+ Object.extend({ scaleContent: false,
+ scaleX: false,
+ scaleMode: 'box',
+ scaleFrom: 100,
+ restoreAfterFinish: true,
+ beforeStartInternal: function(effect) {
+ effect.element.makePositioned();
+ effect.element.down().makePositioned();
+ if(window.opera) effect.element.setStyle({top: ''});
+ effect.element.makeClipping().show();
+ },
+ afterUpdateInternal: function(effect) {
+ effect.element.down().setStyle({bottom:
+ (effect.dims[0] - effect.element.clientHeight) + 'px' });
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().undoPositioned().setStyle({bottom: oldInnerBottom});
+ effect.element.down().undoPositioned();
+ }
+ }, arguments[1] || {})
+ );
+}
+
+// Bug in opera makes the TD containing this element expand for a instance after finish
+Effect.Squish = function(element) {
+ return new Effect.Scale(element, window.opera ? 1 : 0, {
+ restoreAfterFinish: true,
+ beforeSetup: function(effect) {
+ effect.element.makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping();
+ }
+ });
+}
+
+Effect.Grow = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ direction: 'center',
+ moveTransition: Effect.Transitions.sinoidal,
+ scaleTransition: Effect.Transitions.sinoidal,
+ opacityTransition: Effect.Transitions.full
+ }, arguments[1] || {});
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ height: element.style.height,
+ width: element.style.width,
+ opacity: element.getInlineOpacity() };
+
+ var dims = element.getDimensions();
+ var initialMoveX, initialMoveY;
+ var moveX, moveY;
+
+ switch (options.direction) {
+ case 'top-left':
+ initialMoveX = initialMoveY = moveX = moveY = 0;
+ break;
+ case 'top-right':
+ initialMoveX = dims.width;
+ initialMoveY = moveY = 0;
+ moveX = -dims.width;
+ break;
+ case 'bottom-left':
+ initialMoveX = moveX = 0;
+ initialMoveY = dims.height;
+ moveY = -dims.height;
+ break;
+ case 'bottom-right':
+ initialMoveX = dims.width;
+ initialMoveY = dims.height;
+ moveX = -dims.width;
+ moveY = -dims.height;
+ break;
+ case 'center':
+ initialMoveX = dims.width / 2;
+ initialMoveY = dims.height / 2;
+ moveX = -dims.width / 2;
+ moveY = -dims.height / 2;
+ break;
+ }
+
+ return new Effect.Move(element, {
+ x: initialMoveX,
+ y: initialMoveY,
+ duration: 0.01,
+ beforeSetup: function(effect) {
+ effect.element.hide().makeClipping().makePositioned();
+ },
+ afterFinishInternal: function(effect) {
+ new Effect.Parallel(
+ [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
+ new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
+ new Effect.Scale(effect.element, 100, {
+ scaleMode: { originalHeight: dims.height, originalWidth: dims.width },
+ sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
+ ], Object.extend({
+ beforeSetup: function(effect) {
+ effect.effects[0].element.setStyle({height: '0px'}).show();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
+ }
+ }, options)
+ )
+ }
+ });
+}
+
+Effect.Shrink = function(element) {
+ element = $(element);
+ var options = Object.extend({
+ direction: 'center',
+ moveTransition: Effect.Transitions.sinoidal,
+ scaleTransition: Effect.Transitions.sinoidal,
+ opacityTransition: Effect.Transitions.none
+ }, arguments[1] || {});
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ height: element.style.height,
+ width: element.style.width,
+ opacity: element.getInlineOpacity() };
+
+ var dims = element.getDimensions();
+ var moveX, moveY;
+
+ switch (options.direction) {
+ case 'top-left':
+ moveX = moveY = 0;
+ break;
+ case 'top-right':
+ moveX = dims.width;
+ moveY = 0;
+ break;
+ case 'bottom-left':
+ moveX = 0;
+ moveY = dims.height;
+ break;
+ case 'bottom-right':
+ moveX = dims.width;
+ moveY = dims.height;
+ break;
+ case 'center':
+ moveX = dims.width / 2;
+ moveY = dims.height / 2;
+ break;
+ }
+
+ return new Effect.Parallel(
+ [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
+ new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
+ new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
+ ], Object.extend({
+ beforeStartInternal: function(effect) {
+ effect.effects[0].element.makePositioned().makeClipping();
+ },
+ afterFinishInternal: function(effect) {
+ effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }
+ }, options)
+ );
+}
+
+Effect.Pulsate = function(element) {
+ element = $(element);
+ var options = arguments[1] || {};
+ var oldOpacity = element.getInlineOpacity();
+ var transition = options.transition || Effect.Transitions.sinoidal;
+ var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) };
+ reverser.bind(transition);
+ return new Effect.Opacity(element,
+ Object.extend(Object.extend({ duration: 2.0, from: 0,
+ afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
+ }, options), {transition: reverser}));
+}
+
+Effect.Fold = function(element) {
+ element = $(element);
+ var oldStyle = {
+ top: element.style.top,
+ left: element.style.left,
+ width: element.style.width,
+ height: element.style.height };
+ element.makeClipping();
+ return new Effect.Scale(element, 5, Object.extend({
+ scaleContent: false,
+ scaleX: false,
+ afterFinishInternal: function(effect) {
+ new Effect.Scale(element, 1, {
+ scaleContent: false,
+ scaleY: false,
+ afterFinishInternal: function(effect) {
+ effect.element.hide().undoClipping().setStyle(oldStyle);
+ } });
+ }}, arguments[1] || {}));
+};
+
+Effect.Morph = Class.create();
+Object.extend(Object.extend(Effect.Morph.prototype, Effect.Base.prototype), {
+ initialize: function(element) {
+ this.element = $(element);
+ if(!this.element) throw(Effect._elementDoesNotExistError);
+ var options = Object.extend({
+ style: {}
+ }, arguments[1] || {});
+ if (typeof options.style == 'string') {
+ if(options.style.indexOf(':') == -1) {
+ var cssText = '', selector = '.' + options.style;
+ $A(document.styleSheets).reverse().each(function(styleSheet) {
+ if (styleSheet.cssRules) cssRules = styleSheet.cssRules;
+ else if (styleSheet.rules) cssRules = styleSheet.rules;
+ $A(cssRules).reverse().each(function(rule) {
+ if (selector == rule.selectorText) {
+ cssText = rule.style.cssText;
+ throw $break;
+ }
+ });
+ if (cssText) throw $break;
+ });
+ this.style = cssText.parseStyle();
+ options.afterFinishInternal = function(effect){
+ effect.element.addClassName(effect.options.style);
+ effect.transforms.each(function(transform) {
+ if(transform.style != 'opacity')
+ effect.element.style[transform.style] = '';
+ });
+ }
+ } else this.style = options.style.parseStyle();
+ } else this.style = $H(options.style)
+ this.start(options);
+ },
+ setup: function(){
+ function parseColor(color){
+ if(!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
+ color = color.parseColor();
+ return $R(0,2).map(function(i){
+ return parseInt( color.slice(i*2+1,i*2+3), 16 )
+ });
+ }
+ this.transforms = this.style.map(function(pair){
+ var property = pair[0], value = pair[1], unit = null;
+
+ if(value.parseColor('#zzzzzz') != '#zzzzzz') {
+ value = value.parseColor();
+ unit = 'color';
+ } else if(property == 'opacity') {
+ value = parseFloat(value);
+ if(Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
+ this.element.setStyle({zoom: 1});
+ } else if(Element.CSS_LENGTH.test(value)) {
+ var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/);
+ value = parseFloat(components[1]);
+ unit = (components.length == 3) ? components[2] : null;
+ }
+
+ var originalValue = this.element.getStyle(property);
+ return {
+ style: property.camelize(),
+ originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0),
+ targetValue: unit=='color' ? parseColor(value) : value,
+ unit: unit
+ };
+ }.bind(this)).reject(function(transform){
+ return (
+ (transform.originalValue == transform.targetValue) ||
+ (
+ transform.unit != 'color' &&
+ (isNaN(transform.originalValue) || isNaN(transform.targetValue))
+ )
+ )
+ });
+ },
+ update: function(position) {
+ var style = {}, transform, i = this.transforms.length;
+ while(i--)
+ style[(transform = this.transforms[i]).style] =
+ transform.unit=='color' ? '#'+
+ (Math.round(transform.originalValue[0]+
+ (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() +
+ (Math.round(transform.originalValue[1]+
+ (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() +
+ (Math.round(transform.originalValue[2]+
+ (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() :
+ transform.originalValue + Math.round(
+ ((transform.targetValue - transform.originalValue) * position) * 1000)/1000 + transform.unit;
+ this.element.setStyle(style, true);
+ }
+});
+
+Effect.Transform = Class.create();
+Object.extend(Effect.Transform.prototype, {
+ initialize: function(tracks){
+ this.tracks = [];
+ this.options = arguments[1] || {};
+ this.addTracks(tracks);
+ },
+ addTracks: function(tracks){
+ tracks.each(function(track){
+ var data = $H(track).values().first();
+ this.tracks.push($H({
+ ids: $H(track).keys().first(),
+ effect: Effect.Morph,
+ options: { style: data }
+ }));
+ }.bind(this));
+ return this;
+ },
+ play: function(){
+ return new Effect.Parallel(
+ this.tracks.map(function(track){
+ var elements = [$(track.ids) || $$(track.ids)].flatten();
+ return elements.map(function(e){ return new track.effect(e, Object.extend({ sync:true }, track.options)) });
+ }).flatten(),
+ this.options
+ );
+ }
+});
+
+Element.CSS_PROPERTIES = $w(
+ 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' +
+ 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' +
+ 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' +
+ 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' +
+ 'fontSize fontWeight height left letterSpacing lineHeight ' +
+ 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+
+ 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' +
+ 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' +
+ 'right textIndent top width wordSpacing zIndex');
+
+Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
+
+String.prototype.parseStyle = function(){
+ var element = document.createElement('div');
+ element.innerHTML = '<div style="' + this + '"></div>';
+ var style = element.childNodes[0].style, styleRules = $H();
+
+ Element.CSS_PROPERTIES.each(function(property){
+ if(style[property]) styleRules[property] = style[property];
+ });
+ if(Prototype.Browser.IE && this.indexOf('opacity') > -1) {
+ styleRules.opacity = this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1];
+ }
+ return styleRules;
+};
+
+Element.morph = function(element, style) {
+ new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || {}));
+ return element;
+};
+
+['getInlineOpacity','forceRerendering','setContentZoom',
+ 'collectTextNodes','collectTextNodesIgnoreClass','morph'].each(
+ function(f) { Element.Methods[f] = Element[f]; }
+);
+
+Element.Methods.visualEffect = function(element, effect, options) {
+ s = effect.dasherize().camelize();
+ effect_class = s.charAt(0).toUpperCase() + s.substring(1);
+ new Effect[effect_class](element, options);
+ return $(element);
+};
+
+Element.addMethods();
\ No newline at end of file
Added: trunk/framework/impl/src/main/javascript/scriptaculous/slider.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/slider.js (rev 0)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/slider.js 2007-10-03 22:24:46 UTC (rev 3236)
@@ -0,0 +1,277 @@
+// script.aculo.us slider.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Marty Haught, Thomas Fuchs
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+if(!Control) var Control = {};
+Control.Slider = Class.create();
+
+// options:
+// axis: 'vertical', or 'horizontal' (default)
+//
+// callbacks:
+// onChange(value)
+// onSlide(value)
+Control.Slider.prototype = {
+ initialize: function(handle, track, options) {
+ var slider = this;
+
+ if(handle instanceof Array) {
+ this.handles = handle.collect( function(e) { return $(e) });
+ } else {
+ this.handles = [$(handle)];
+ }
+
+ this.track = $(track);
+ this.options = options || {};
+
+ this.axis = this.options.axis || 'horizontal';
+ this.increment = this.options.increment || 1;
+ this.step = parseInt(this.options.step || '1');
+ this.range = this.options.range || $R(0,1);
+
+ this.value = 0; // assure backwards compat
+ this.values = this.handles.map( function() { return 0 });
+ this.spans = this.options.spans ? this.options.spans.map(function(s){ return $(s) }) : false;
+ this.options.startSpan = $(this.options.startSpan || null);
+ this.options.endSpan = $(this.options.endSpan || null);
+
+ this.restricted = this.options.restricted || false;
+
+ this.maximum = this.options.maximum || this.range.end;
+ this.minimum = this.options.minimum || this.range.start;
+
+ // Will be used to align the handle onto the track, if necessary
+ this.alignX = parseInt(this.options.alignX || '0');
+ this.alignY = parseInt(this.options.alignY || '0');
+
+ this.trackLength = this.maximumOffset() - this.minimumOffset();
+
+ this.handleLength = this.isVertical() ?
+ (this.handles[0].offsetHeight != 0 ?
+ this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) :
+ (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth :
+ this.handles[0].style.width.replace(/px$/,""));
+
+ this.active = false;
+ this.dragging = false;
+ this.disabled = false;
+
+ if(this.options.disabled) this.setDisabled();
+
+ // Allowed values array
+ this.allowedValues = this.options.values ? this.options.values.sortBy(Prototype.K) : false;
+ if(this.allowedValues) {
+ this.minimum = this.allowedValues.min();
+ this.maximum = this.allowedValues.max();
+ }
+
+ this.eventMouseDown = this.startDrag.bindAsEventListener(this);
+ this.eventMouseUp = this.endDrag.bindAsEventListener(this);
+ this.eventMouseMove = this.update.bindAsEventListener(this);
+
+ // Initialize handles in reverse (make sure first handle is active)
+ this.handles.each( function(h,i) {
+ i = slider.handles.length-1-i;
+ slider.setValue(parseFloat(
+ (slider.options.sliderValue instanceof Array ?
+ slider.options.sliderValue[i] : slider.options.sliderValue) ||
+ slider.range.start), i);
+ Element.makePositioned(h); // fix IE
+ Event.observe(h, "mousedown", slider.eventMouseDown);
+ });
+
+ Event.observe(this.track, "mousedown", this.eventMouseDown);
+ Event.observe(document, "mouseup", this.eventMouseUp);
+ Event.observe(document, "mousemove", this.eventMouseMove);
+
+ this.initialized = true;
+ },
+ dispose: function() {
+ var slider = this;
+ Event.stopObserving(this.track, "mousedown", this.eventMouseDown);
+ Event.stopObserving(document, "mouseup", this.eventMouseUp);
+ Event.stopObserving(document, "mousemove", this.eventMouseMove);
+ this.handles.each( function(h) {
+ Event.stopObserving(h, "mousedown", slider.eventMouseDown);
+ });
+ },
+ setDisabled: function(){
+ this.disabled = true;
+ },
+ setEnabled: function(){
+ this.disabled = false;
+ },
+ getNearestValue: function(value){
+ if(this.allowedValues){
+ if(value >= this.allowedValues.max()) return(this.allowedValues.max());
+ if(value <= this.allowedValues.min()) return(this.allowedValues.min());
+
+ var offset = Math.abs(this.allowedValues[0] - value);
+ var newValue = this.allowedValues[0];
+ this.allowedValues.each( function(v) {
+ var currentOffset = Math.abs(v - value);
+ if(currentOffset <= offset){
+ newValue = v;
+ offset = currentOffset;
+ }
+ });
+ return newValue;
+ }
+ if(value > this.range.end) return this.range.end;
+ if(value < this.range.start) return this.range.start;
+ return value;
+ },
+ setValue: function(sliderValue, handleIdx){
+ if(!this.active) {
+ this.activeHandleIdx = handleIdx || 0;
+ this.activeHandle = this.handles[this.activeHandleIdx];
+ this.updateStyles();
+ }
+ handleIdx = handleIdx || this.activeHandleIdx || 0;
+ if(this.initialized && this.restricted) {
+ if((handleIdx>0) && (sliderValue<this.values[handleIdx-1]))
+ sliderValue = this.values[handleIdx-1];
+ if((handleIdx < (this.handles.length-1)) && (sliderValue>this.values[handleIdx+1]))
+ sliderValue = this.values[handleIdx+1];
+ }
+ sliderValue = this.getNearestValue(sliderValue);
+ this.values[handleIdx] = sliderValue;
+ this.value = this.values[0]; // assure backwards compat
+
+ this.handles[handleIdx].style[this.isVertical() ? 'top' : 'left'] =
+ this.translateToPx(sliderValue);
+
+ this.drawSpans();
+ if(!this.dragging || !this.event) this.updateFinished();
+ },
+ setValueBy: function(delta, handleIdx) {
+ this.setValue(this.values[handleIdx || this.activeHandleIdx || 0] + delta,
+ handleIdx || this.activeHandleIdx || 0);
+ },
+ translateToPx: function(value) {
+ return Math.round(
+ ((this.trackLength-this.handleLength)/(this.range.end-this.range.start)) *
+ (value - this.range.start)) + "px";
+ },
+ translateToValue: function(offset) {
+ return ((offset/(this.trackLength-this.handleLength) *
+ (this.range.end-this.range.start)) + this.range.start);
+ },
+ getRange: function(range) {
+ var v = this.values.sortBy(Prototype.K);
+ range = range || 0;
+ return $R(v[range],v[range+1]);
+ },
+ minimumOffset: function(){
+ return(this.isVertical() ? this.alignY : this.alignX);
+ },
+ maximumOffset: function(){
+ return(this.isVertical() ?
+ (this.track.offsetHeight != 0 ? this.track.offsetHeight :
+ this.track.style.height.replace(/px$/,"")) - this.alignY :
+ (this.track.offsetWidth != 0 ? this.track.offsetWidth :
+ this.track.style.width.replace(/px$/,"")) - this.alignY);
+ },
+ isVertical: function(){
+ return (this.axis == 'vertical');
+ },
+ drawSpans: function() {
+ var slider = this;
+ if(this.spans)
+ $R(0, this.spans.length-1).each(function(r) { slider.setSpan(slider.spans[r], slider.getRange(r)) });
+ if(this.options.startSpan)
+ this.setSpan(this.options.startSpan,
+ $R(0, this.values.length>1 ? this.getRange(0).min() : this.value ));
+ if(this.options.endSpan)
+ this.setSpan(this.options.endSpan,
+ $R(this.values.length>1 ? this.getRange(this.spans.length-1).max() : this.value, this.maximum));
+ },
+ setSpan: function(span, range) {
+ if(this.isVertical()) {
+ span.style.top = this.translateToPx(range.start);
+ span.style.height = this.translateToPx(range.end - range.start + this.range.start);
+ } else {
+ span.style.left = this.translateToPx(range.start);
+ span.style.width = this.translateToPx(range.end - range.start + this.range.start);
+ }
+ },
+ updateStyles: function() {
+ this.handles.each( function(h){ Element.removeClassName(h, 'selected') });
+ Element.addClassName(this.activeHandle, 'selected');
+ },
+ startDrag: function(event) {
+ if(Event.isLeftClick(event)) {
+ if(!this.disabled){
+ this.active = true;
+
+ var handle = Event.element(event);
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ var track = handle;
+ if(track==this.track) {
+ var offsets = Position.cumulativeOffset(this.track);
+ this.event = event;
+ this.setValue(this.translateToValue(
+ (this.isVertical() ? pointer[1]-offsets[1] : pointer[0]-offsets[0])-(this.handleLength/2)
+ ));
+ var offsets = Position.cumulativeOffset(this.activeHandle);
+ this.offsetX = (pointer[0] - offsets[0]);
+ this.offsetY = (pointer[1] - offsets[1]);
+ } else {
+ // find the handle (prevents issues with Safari)
+ while((this.handles.indexOf(handle) == -1) && handle.parentNode)
+ handle = handle.parentNode;
+
+ if(this.handles.indexOf(handle)!=-1) {
+ this.activeHandle = handle;
+ this.activeHandleIdx = this.handles.indexOf(this.activeHandle);
+ this.updateStyles();
+
+ var offsets = Position.cumulativeOffset(this.activeHandle);
+ this.offsetX = (pointer[0] - offsets[0]);
+ this.offsetY = (pointer[1] - offsets[1]);
+ }
+ }
+ }
+ Event.stop(event);
+ }
+ },
+ update: function(event) {
+ if(this.active) {
+ if(!this.dragging) this.dragging = true;
+ this.draw(event);
+ if(Prototype.Browser.WebKit) window.scrollBy(0,0);
+ Event.stop(event);
+ }
+ },
+ draw: function(event) {
+ var pointer = [Event.pointerX(event), Event.pointerY(event)];
+ var offsets = Position.cumulativeOffset(this.track);
+ pointer[0] -= this.offsetX + offsets[0];
+ pointer[1] -= this.offsetY + offsets[1];
+ this.event = event;
+ this.setValue(this.translateToValue( this.isVertical() ? pointer[1] : pointer[0] ));
+ if(this.initialized && this.options.onSlide)
+ this.options.onSlide(this.values.length>1 ? this.values : this.value, this);
+ },
+ endDrag: function(event) {
+ if(this.active && this.dragging) {
+ this.finishDrag(event, true);
+ Event.stop(event);
+ }
+ this.active = false;
+ this.dragging = false;
+ },
+ finishDrag: function(event, success) {
+ this.active = false;
+ this.dragging = false;
+ this.updateFinished();
+ },
+ updateFinished: function() {
+ if(this.initialized && this.options.onChange)
+ this.options.onChange(this.values.length>1 ? this.values : this.value, this);
+ this.event = null;
+ }
+}
\ No newline at end of file
Added: trunk/framework/impl/src/main/javascript/scriptaculous/sound.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/sound.js (rev 0)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/sound.js 2007-10-03 22:24:46 UTC (rev 3236)
@@ -0,0 +1,60 @@
+// script.aculo.us sound.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+//
+// Based on code created by Jules Gravinese (http://www.webveteran.com/)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+Sound = {
+ tracks: {},
+ _enabled: true,
+ template:
+ new Template('<embed style="height:0" id="sound_#{track}_#{id}" src="#{url}" loop="false" autostart="true" hidden="true"/>'),
+ enable: function(){
+ Sound._enabled = true;
+ },
+ disable: function(){
+ Sound._enabled = false;
+ },
+ play: function(url){
+ if(!Sound._enabled) return;
+ var options = Object.extend({
+ track: 'global', url: url, replace: false
+ }, arguments[1] || {});
+
+ if(options.replace && this.tracks[options.track]) {
+ $R(0, this.tracks[options.track].id).each(function(id){
+ var sound = $('sound_'+options.track+'_'+id);
+ sound.Stop && sound.Stop();
+ sound.remove();
+ })
+ this.tracks[options.track] = null;
+ }
+
+ if(!this.tracks[options.track])
+ this.tracks[options.track] = { id: 0 }
+ else
+ this.tracks[options.track].id++;
+
+ options.id = this.tracks[options.track].id;
+ if (Prototype.Browser.IE) {
+ var sound = document.createElement('bgsound');
+ sound.setAttribute('id','sound_'+options.track+'_'+options.id);
+ sound.setAttribute('src',options.url);
+ sound.setAttribute('loop','1');
+ sound.setAttribute('autostart','true');
+ $$('body')[0].appendChild(sound);
+ }
+ else
+ new Insertion.Bottom($$('body')[0], Sound.template.evaluate(options));
+ }
+};
+
+if(Prototype.Browser.Gecko && navigator.userAgent.indexOf("Win") > 0){
+ if(navigator.plugins && $A(navigator.plugins).detect(function(p){ return p.name.indexOf('QuickTime') != -1 }))
+ Sound.template = new Template('<object id="sound_#{track}_#{id}" width="0" height="0" type="audio/mpeg" data="#{url}"/>')
+ else
+ Sound.play = function(){}
+}
Added: trunk/framework/impl/src/main/javascript/scriptaculous/unittest.js
===================================================================
--- trunk/framework/impl/src/main/javascript/scriptaculous/unittest.js (rev 0)
+++ trunk/framework/impl/src/main/javascript/scriptaculous/unittest.js 2007-10-03 22:24:46 UTC (rev 3236)
@@ -0,0 +1,564 @@
+// script.aculo.us unittest.js v1.7.1_beta3, Fri May 25 17:19:41 +0200 2007
+
+// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
+// (c) 2005-2007 Michael Schuerig (http://www.schuerig.de/michael/)
+//
+// script.aculo.us is freely distributable under the terms of an MIT-style license.
+// For details, see the script.aculo.us web site: http://script.aculo.us/
+
+// experimental, Firefox-only
+Event.simulateMouse = function(element, eventName) {
+ var options = Object.extend({
+ pointerX: 0,
+ pointerY: 0,
+ buttons: 0,
+ ctrlKey: false,
+ altKey: false,
+ shiftKey: false,
+ metaKey: false
+ }, arguments[2] || {});
+ var oEvent = document.createEvent("MouseEvents");
+ oEvent.initMouseEvent(eventName, true, true, document.defaultView,
+ options.buttons, options.pointerX, options.pointerY, options.pointerX, options.pointerY,
+ options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, 0, $(element));
+
+ if(this.mark) Element.remove(this.mark);
+ this.mark = document.createElement('div');
+ this.mark.appendChild(document.createTextNode(" "));
+ document.body.appendChild(this.mark);
+ this.mark.style.position = 'absolute';
+ this.mark.style.top = options.pointerY + "px";
+ this.mark.style.left = options.pointerX + "px";
+ this.mark.style.width = "5px";
+ this.mark.style.height = "5px;";
+ this.mark.style.borderTop = "1px solid red;"
+ this.mark.style.borderLeft = "1px solid red;"
+
+ if(this.step)
+ alert('['+new Date().getTime().toString()+'] '+eventName+'/'+Test.Unit.inspect(options));
+
+ $(element).dispatchEvent(oEvent);
+};
+
+// Note: Due to a fix in Firefox 1.0.5/6 that probably fixed "too much", this doesn't work in 1.0.6 or DP2.
+// You need to downgrade to 1.0.4 for now to get this working
+// See https://bugzilla.mozilla.org/show_bug.cgi?id=289940 for the fix that fixed too much
+Event.simulateKey = function(element, eventName) {
+ var options = Object.extend({
+ ctrlKey: false,
+ altKey: false,
+ shiftKey: false,
+ metaKey: false,
+ keyCode: 0,
+ charCode: 0
+ }, arguments[2] || {});
+
+ var oEvent = document.createEvent("KeyEvents");
+ oEvent.initKeyEvent(eventName, true, true, window,
+ options.ctrlKey, options.altKey, options.shiftKey, options.metaKey,
+ options.keyCode, options.charCode );
+ $(element).dispatchEvent(oEvent);
+};
+
+Event.simulateKeys = function(element, command) {
+ for(var i=0; i<command.length; i++) {
+ Event.simulateKey(element,'keypress',{charCode:command.charCodeAt(i)});
+ }
+};
+
+var Test = {}
+Test.Unit = {};
+
+// security exception workaround
+Test.Unit.inspect = Object.inspect;
+
+Test.Unit.Logger = Class.create();
+Test.Unit.Logger.prototype = {
+ initialize: function(log) {
+ this.log = $(log);
+ if (this.log) {
+ this._createLogTable();
+ }
+ },
+ start: function(testName) {
+ if (!this.log) return;
+ this.testName = testName;
+ this.lastLogLine = document.createElement('tr');
+ this.statusCell = document.createElement('td');
+ this.nameCell = document.createElement('td');
+ this.nameCell.className = "nameCell";
+ this.nameCell.appendChild(document.createTextNode(testName));
+ this.messageCell = document.createElement('td');
+ this.lastLogLine.appendChild(this.statusCell);
+ this.lastLogLine.appendChild(this.nameCell);
+ this.lastLogLine.appendChild(this.messageCell);
+ this.loglines.appendChild(this.lastLogLine);
+ },
+ finish: function(status, summary) {
+ if (!this.log) return;
+ this.lastLogLine.className = status;
+ this.statusCell.innerHTML = status;
+ this.messageCell.innerHTML = this._toHTML(summary);
+ this.addLinksToResults();
+ },
+ message: function(message) {
+ if (!this.log) return;
+ this.messageCell.innerHTML = this._toHTML(message);
+ },
+ summary: function(summary) {
+ if (!this.log) return;
+ this.logsummary.innerHTML = this._toHTML(summary);
+ },
+ _createLogTable: function() {
+ this.log.innerHTML =
+ '<div id="logsummary"></div>' +
+ '<table id="logtable">' +
+ '<thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead>' +
+ '<tbody id="loglines"></tbody>' +
+ '</table>';
+ this.logsummary = $('logsummary')
+ this.loglines = $('loglines');
+ },
+ _toHTML: function(txt) {
+ return txt.escapeHTML().replace(/\n/g,"<br/>");
+ },
+ addLinksToResults: function(){
+ $$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log
+ td.title = "Run only this test"
+ Event.observe(td, 'click', function(){ window.location.search = "?tests=" + td.innerHTML;});
+ });
+ $$("tr.passed .nameCell").each( function(td){ // todo: limit to children of this.log
+ td.title = "Run all tests"
+ Event.observe(td, 'click', function(){ window.location.search = "";});
+ });
+ }
+}
+
+Test.Unit.Runner = Class.create();
+Test.Unit.Runner.prototype = {
+ initialize: function(testcases) {
+ this.options = Object.extend({
+ testLog: 'testlog'
+ }, arguments[1] || {});
+ this.options.resultsURL = this.parseResultsURLQueryParameter();
+ this.options.tests = this.parseTestsQueryParameter();
+ if (this.options.testLog) {
+ this.options.testLog = $(this.options.testLog) || null;
+ }
+ if(this.options.tests) {
+ this.tests = [];
+ for(var i = 0; i < this.options.tests.length; i++) {
+ if(/^test/.test(this.options.tests[i])) {
+ this.tests.push(new Test.Unit.Testcase(this.options.tests[i], testcases[this.options.tests[i]], testcases["setup"], testcases["teardown"]));
+ }
+ }
+ } else {
+ if (this.options.test) {
+ this.tests = [new Test.Unit.Testcase(this.options.test, testcases[this.options.test], testcases["setup"], testcases["teardown"])];
+ } else {
+ this.tests = [];
+ for(var testcase in testcases) {
+ if(/^test/.test(testcase)) {
+ this.tests.push(
+ new Test.Unit.Testcase(
+ this.options.context ? ' -> ' + this.options.titles[testcase] : testcase,
+ testcases[testcase], testcases["setup"], testcases["teardown"]
+ ));
+ }
+ }
+ }
+ }
+ this.currentTest = 0;
+ this.logger = new Test.Unit.Logger(this.options.testLog);
+ setTimeout(this.runTests.bind(this), 1000);
+ },
+ parseResultsURLQueryParameter: function() {
+ return window.location.search.parseQuery()["resultsURL"];
+ },
+ parseTestsQueryParameter: function(){
+ if (window.location.search.parseQuery()["tests"]){
+ return window.location.search.parseQuery()["tests"].split(',');
+ };
+ },
+ // Returns:
+ // "ERROR" if there was an error,
+ // "FAILURE" if there was a failure, or
+ // "SUCCESS" if there was neither
+ getResult: function() {
+ var hasFailure = false;
+ for(var i=0;i<this.tests.length;i++) {
+ if (this.tests[i].errors > 0) {
+ return "ERROR";
+ }
+ if (this.tests[i].failures > 0) {
+ hasFailure = true;
+ }
+ }
+ if (hasFailure) {
+ return "FAILURE";
+ } else {
+ return "SUCCESS";
+ }
+ },
+ postResults: function() {
+ if (this.options.resultsURL) {
+ new Ajax.Request(this.options.resultsURL,
+ { method: 'get', parameters: 'result=' + this.getResult(), asynchronous: false });
+ }
+ },
+ runTests: function() {
+ var test = this.tests[this.currentTest];
+ if (!test) {
+ // finished!
+ this.postResults();
+ this.logger.summary(this.summary());
+ return;
+ }
+ if(!test.isWaiting) {
+ this.logger.start(test.name);
+ }
+ test.run();
+ if(test.isWaiting) {
+ this.logger.message("Waiting for " + test.timeToWait + "ms");
+ setTimeout(this.runTests.bind(this), test.timeToWait || 1000);
+ } else {
+ this.logger.finish(test.status(), test.summary());
+ this.currentTest++;
+ // tail recursive, hopefully the browser will skip the stackframe
+ this.runTests();
+ }
+ },
+ summary: function() {
+ var assertions = 0;
+ var failures = 0;
+ var errors = 0;
+ var messages = [];
+ for(var i=0;i<this.tests.length;i++) {
+ assertions += this.tests[i].assertions;
+ failures += this.tests[i].failures;
+ errors += this.tests[i].errors;
+ }
+ return (
+ (this.options.context ? this.options.context + ': ': '') +
+ this.tests.length + " tests, " +
+ assertions + " assertions, " +
+ failures + " failures, " +
+ errors + " errors");
+ }
+}
+
+Test.Unit.Assertions = Class.create();
+Test.Unit.Assertions.prototype = {
+ initialize: function() {
+ this.assertions = 0;
+ this.failures = 0;
+ this.errors = 0;
+ this.messages = [];
+ },
+ summary: function() {
+ return (
+ this.assertions + " assertions, " +
+ this.failures + " failures, " +
+ this.errors + " errors" + "\n" +
+ this.messages.join("\n"));
+ },
+ pass: function() {
+ this.assertions++;
+ },
+ fail: function(message) {
+ this.failures++;
+ this.messages.push("Failure: " + message);
+ },
+ info: function(message) {
+ this.messages.push("Info: " + message);
+ },
+ error: function(error) {
+ this.errors++;
+ this.messages.push(error.name + ": "+ error.message + "(" + Test.Unit.inspect(error) +")");
+ },
+ status: function() {
+ if (this.failures > 0) return 'failed';
+ if (this.errors > 0) return 'error';
+ return 'passed';
+ },
+ assert: function(expression) {
+ var message = arguments[1] || 'assert: got "' + Test.Unit.inspect(expression) + '"';
+ try { expression ? this.pass() :
+ this.fail(message); }
+ catch(e) { this.error(e); }
+ },
+ assertEqual: function(expected, actual) {
+ var message = arguments[2] || "assertEqual";
+ try { (expected == actual) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertInspect: function(expected, actual) {
+ var message = arguments[2] || "assertInspect";
+ try { (expected == actual.inspect()) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertEnumEqual: function(expected, actual) {
+ var message = arguments[2] || "assertEnumEqual";
+ try { $A(expected).length == $A(actual).length &&
+ expected.zip(actual).all(function(pair) { return pair[0] == pair[1] }) ?
+ this.pass() : this.fail(message + ': expected ' + Test.Unit.inspect(expected) +
+ ', actual ' + Test.Unit.inspect(actual)); }
+ catch(e) { this.error(e); }
+ },
+ assertNotEqual: function(expected, actual) {
+ var message = arguments[2] || "assertNotEqual";
+ try { (expected != actual) ? this.pass() :
+ this.fail(message + ': got "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertIdentical: function(expected, actual) {
+ var message = arguments[2] || "assertIdentical";
+ try { (expected === actual) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertNotIdentical: function(expected, actual) {
+ var message = arguments[2] || "assertNotIdentical";
+ try { !(expected === actual) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertNull: function(obj) {
+ var message = arguments[1] || 'assertNull'
+ try { (obj==null) ? this.pass() :
+ this.fail(message + ': got "' + Test.Unit.inspect(obj) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertMatch: function(expected, actual) {
+ var message = arguments[2] || 'assertMatch';
+ var regex = new RegExp(expected);
+ try { (regex.exec(actual)) ? this.pass() :
+ this.fail(message + ' : regex: "' + Test.Unit.inspect(expected) + ' did not match: ' + Test.Unit.inspect(actual) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertHidden: function(element) {
+ var message = arguments[1] || 'assertHidden';
+ this.assertEqual("none", element.style.display, message);
+ },
+ assertNotNull: function(object) {
+ var message = arguments[1] || 'assertNotNull';
+ this.assert(object != null, message);
+ },
+ assertType: function(expected, actual) {
+ var message = arguments[2] || 'assertType';
+ try {
+ (actual.constructor == expected) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + (actual.constructor) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertNotOfType: function(expected, actual) {
+ var message = arguments[2] || 'assertNotOfType';
+ try {
+ (actual.constructor != expected) ? this.pass() :
+ this.fail(message + ': expected "' + Test.Unit.inspect(expected) +
+ '", actual "' + (actual.constructor) + '"'); }
+ catch(e) { this.error(e); }
+ },
+ assertInstanceOf: function(expected, actual) {
+ var message = arguments[2] || 'assertInstanceOf';
+ try {
+ (actual instanceof expected) ? this.pass() :
+ this.fail(message + ": object was not an instance of the expected type"); }
+ catch(e) { this.error(e); }
+ },
+ assertNotInstanceOf: function(expected, actual) {
+ var message = arguments[2] || 'assertNotInstanceOf';
+ try {
+ !(actual instanceof expected) ? this.pass() :
+ this.fail(message + ": object was an instance of the not expected type"); }
+ catch(e) { this.error(e); }
+ },
+ assertRespondsTo: function(method, obj) {
+ var message = arguments[2] || 'assertRespondsTo';
+ try {
+ (obj[method] && typeof obj[method] == 'function') ? this.pass() :
+ this.fail(message + ": object doesn't respond to [" + method + "]"); }
+ catch(e) { this.error(e); }
+ },
+ assertReturnsTrue: function(method, obj) {
+ var message = arguments[2] || 'assertReturnsTrue';
+ try {
+ var m = obj[method];
+ if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)];
+ m() ? this.pass() :
+ this.fail(message + ": method returned false"); }
+ catch(e) { this.error(e); }
+ },
+ assertReturnsFalse: function(method, obj) {
+ var message = arguments[2] || 'assertReturnsFalse';
+ try {
+ var m = obj[method];
+ if(!m) m = obj['is'+method.charAt(0).toUpperCase()+method.slice(1)];
+ !m() ? this.pass() :
+ this.fail(message + ": method returned true"); }
+ catch(e) { this.error(e); }
+ },
+ assertRaise: function(exceptionName, method) {
+ var message = arguments[2] || 'assertRaise';
+ try {
+ method();
+ this.fail(message + ": exception expected but none was raised"); }
+ catch(e) {
+ ((exceptionName == null) || (e.name==exceptionName)) ? this.pass() : this.error(e);
+ }
+ },
+ assertElementsMatch: function() {
+ var expressions = $A(arguments), elements = $A(expressions.shift());
+ if (elements.length != expressions.length) {
+ this.fail('assertElementsMatch: size mismatch: ' + elements.length + ' elements, ' + expressions.length + ' expressions');
+ return false;
+ }
+ elements.zip(expressions).all(function(pair, index) {
+ var element = $(pair.first()), expression = pair.last();
+ if (element.match(expression)) return true;
+ this.fail('assertElementsMatch: (in index ' + index + ') expected ' + expression.inspect() + ' but got ' + element.inspect());
+ }.bind(this)) && this.pass();
+ },
+ assertElementMatches: function(element, expression) {
+ this.assertElementsMatch([element], expression);
+ },
+ benchmark: function(operation, iterations) {
+ var startAt = new Date();
+ (iterations || 1).times(operation);
+ var timeTaken = ((new Date())-startAt);
+ this.info((arguments[2] || 'Operation') + ' finished ' +
+ iterations + ' iterations in ' + (timeTaken/1000)+'s' );
+ return timeTaken;
+ },
+ _isVisible: function(element) {
+ element = $(element);
+ if(!element.parentNode) return true;
+ this.assertNotNull(element);
+ if(element.style && Element.getStyle(element, 'display') == 'none')
+ return false;
+
+ return this._isVisible(element.parentNode);
+ },
+ assertNotVisible: function(element) {
+ this.assert(!this._isVisible(element), Test.Unit.inspect(element) + " was not hidden and didn't have a hidden parent either. " + ("" || arguments[1]));
+ },
+ assertVisible: function(element) {
+ this.assert(this._isVisible(element), Test.Unit.inspect(element) + " was not visible. " + ("" || arguments[1]));
+ },
+ benchmark: function(operation, iterations) {
+ var startAt = new Date();
+ (iterations || 1).times(operation);
+ var timeTaken = ((new Date())-startAt);
+ this.info((arguments[2] || 'Operation') + ' finished ' +
+ iterations + ' iterations in ' + (timeTaken/1000)+'s' );
+ return timeTaken;
+ }
+}
+
+Test.Unit.Testcase = Class.create();
+Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.prototype), {
+ initialize: function(name, test, setup, teardown) {
+ Test.Unit.Assertions.prototype.initialize.bind(this)();
+ this.name = name;
+
+ if(typeof test == 'string') {
+ test = test.gsub(/(\.should[^\(]+\()/,'#{0}this,');
+ test = test.gsub(/(\.should[^\(]+)\(this,\)/,'#{1}(this)');
+ this.test = function() {
+ eval('with(this){'+test+'}');
+ }
+ } else {
+ this.test = test || function() {};
+ }
+
+ this.setup = setup || function() {};
+ this.teardown = teardown || function() {};
+ this.isWaiting = false;
+ this.timeToWait = 1000;
+ },
+ wait: function(time, nextPart) {
+ this.isWaiting = true;
+ this.test = nextPart;
+ this.timeToWait = time;
+ },
+ run: function() {
+ try {
+ try {
+ if (!this.isWaiting) this.setup.bind(this)();
+ this.isWaiting = false;
+ this.test.bind(this)();
+ } finally {
+ if(!this.isWaiting) {
+ this.teardown.bind(this)();
+ }
+ }
+ }
+ catch(e) { this.error(e); }
+ }
+});
+
+// *EXPERIMENTAL* BDD-style testing to please non-technical folk
+// This draws many ideas from RSpec http://rspec.rubyforge.org/
+
+Test.setupBDDExtensionMethods = function(){
+ var METHODMAP = {
+ shouldEqual: 'assertEqual',
+ shouldNotEqual: 'assertNotEqual',
+ shouldEqualEnum: 'assertEnumEqual',
+ shouldBeA: 'assertType',
+ shouldNotBeA: 'assertNotOfType',
+ shouldBeAn: 'assertType',
+ shouldNotBeAn: 'assertNotOfType',
+ shouldBeNull: 'assertNull',
+ shouldNotBeNull: 'assertNotNull',
+
+ shouldBe: 'assertReturnsTrue',
+ shouldNotBe: 'assertReturnsFalse',
+ shouldRespondTo: 'assertRespondsTo'
+ };
+ Test.BDDMethods = {};
+ for(m in METHODMAP) {
+ Test.BDDMethods[m] = eval(
+ 'function(){'+
+ 'var args = $A(arguments);'+
+ 'var scope = args.shift();'+
+ 'scope.'+METHODMAP[m]+'.apply(scope,(args || []).concat([this])); }');
+ }
+ [Array.prototype, String.prototype, Number.prototype].each(
+ function(p){ Object.extend(p, Test.BDDMethods) }
+ );
+}
+
+Test.context = function(name, spec, log){
+ Test.setupBDDExtensionMethods();
+
+ var compiledSpec = {};
+ var titles = {};
+ for(specName in spec) {
+ switch(specName){
+ case "setup":
+ case "teardown":
+ compiledSpec[specName] = spec[specName];
+ break;
+ default:
+ var testName = 'test'+specName.gsub(/\s+/,'-').camelize();
+ var body = spec[specName].toString().split('\n').slice(1);
+ if(/^\{/.test(body[0])) body = body.slice(1);
+ body.pop();
+ body = body.map(function(statement){
+ return statement.strip()
+ });
+ compiledSpec[testName] = body.join('\n');
+ titles[testName] = specName;
+ }
+ }
+ new Test.Unit.Runner(compiledSpec, { titles: titles, testLog: log || 'testlog', context: name });
+};
\ No newline at end of file
17 years, 2 months
JBoss Rich Faces SVN: r3235 - trunk/ui/tabPanel/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-10-03 13:21:07 -0400 (Wed, 03 Oct 2007)
New Revision: 3235
Modified:
trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java
Log:
add savedTab != null check
Modified: trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java
===================================================================
--- trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java 2007-10-03 16:45:17 UTC (rev 3234)
+++ trunk/ui/tabPanel/src/main/java/org/richfaces/component/UITabPanel.java 2007-10-03 17:21:07 UTC (rev 3235)
@@ -46,6 +46,14 @@
}
protected Iterator getSwitchedFacetsAndChildren() {
+
+// if(this.restoredRenderedValue == null){
+// RF-1047 (getRenderedValue() again if value attribute is bound to a Seam
+// conversation-scoped component because conversation-scoped components are not available
+// during the RestoreView phase)
+// this.restoredRenderedValue = getRenderedValue();
+// }
+
final Object renderedValue = this.restoredRenderedValue;
return new FilterIterator(getRenderedTabs(), new Predicate() {
@@ -122,12 +130,10 @@
List children = getChildren();
for (Iterator iterator = children.iterator(); iterator.hasNext();) {
UIComponent childComponent = (UIComponent) iterator.next();
-
if(childComponent instanceof UITab && ((UITab)childComponent).getName().equals(tabName)){
return (UITab)childComponent;
}
}
-
return null;
}
@@ -211,25 +217,28 @@
if (event instanceof SwitchablePanelSwitchEvent && this.equals(event.getComponent())) {
SwitchablePanelSwitchEvent switchEvent = (SwitchablePanelSwitchEvent) event;
UIComponent component = switchEvent.getEventSource();
- UITab savedTab = getTabWithName(getValue());
- if((component instanceof UITab) && ((UITab)savedTab).isImmediate() || isImmediate()){
- setImmediate(true);
- }else{
- setImmediate(false);
- }
+ UITab savedTab = getTabWithName(getValue());
+ if(savedTab != null){
+ if((component instanceof UITab) && ((UITab)savedTab).isImmediate() || isImmediate()){
+ setImmediate(true);
+ }else{
+ setImmediate(false);
+ }
+ }
}
// redefine phaseId of ActionEvent RF-843
if(event instanceof ActionEvent ){
UIComponent component = event.getComponent();
UITab savedTab = getTabWithName(getValue());
-
- if((component instanceof UITab) && ((UITab)savedTab).isImmediate() || isImmediate()){
- setImmediate(true);
- processedEvent.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- }else{
- setImmediate(false);
- processedEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
- }
+ if(savedTab != null){
+ if((component instanceof UITab) && ((UITab)savedTab).isImmediate() || isImmediate()){
+ setImmediate(true);
+ processedEvent.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ }else{
+ setImmediate(false);
+ processedEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ }
+ }
}
super.queueEvent(processedEvent);
17 years, 2 months