JBoss Rich Faces SVN: r14125 - in trunk/examples/photoalbum/source/web: environment/prod and 10 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-12 12:18:36 -0400 (Tue, 12 May 2009)
New Revision: 14125
Added:
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Environment.java
Modified:
trunk/examples/photoalbum/source/web/environment/dev/environment.properties
trunk/examples/photoalbum/source/web/environment/prod/environment.properties
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Authenticator.java
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/Help.java
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionListener.java
trunk/examples/photoalbum/source/web/src/main/webapp/error.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/fileUpload/uploadResult.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/buttonHelp.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/fileUploadHelp.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/tree_user.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageInfo.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/index/status.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/index/tree.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/misc/errorPanel.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/misc/help.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/userPrefs/userPrefsEdit.xhtml
Log:
Modified: trunk/examples/photoalbum/source/web/environment/dev/environment.properties
===================================================================
--- trunk/examples/photoalbum/source/web/environment/dev/environment.properties 2009-05-12 16:18:17 UTC (rev 14124)
+++ trunk/examples/photoalbum/source/web/environment/dev/environment.properties 2009-05-12 16:18:36 UTC (rev 14125)
@@ -1 +1,2 @@
-environment=development
\ No newline at end of file
+environment=development
+showHelpIconsStrategy=yes
Modified: trunk/examples/photoalbum/source/web/environment/prod/environment.properties
===================================================================
--- trunk/examples/photoalbum/source/web/environment/prod/environment.properties 2009-05-12 16:18:17 UTC (rev 14124)
+++ trunk/examples/photoalbum/source/web/environment/prod/environment.properties 2009-05-12 16:18:36 UTC (rev 14125)
@@ -1 +1,2 @@
-environment=production
\ No newline at end of file
+environment=production
+showHelpIconsStrategy=yes
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Authenticator.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Authenticator.java 2009-05-12 16:18:17 UTC (rev 14124)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Authenticator.java 2009-05-12 16:18:36 UTC (rev 14125)
@@ -42,6 +42,7 @@
import org.richfaces.photoalbum.domain.User;
import org.richfaces.photoalbum.service.Constants;
import org.richfaces.photoalbum.service.IUserAction;
+import org.richfaces.photoalbum.util.Environment;
import org.richfaces.photoalbum.util.HashUtils;
@Name("authenticator")
@@ -78,6 +79,10 @@
user = userAction.login(credentials.getUsername(), HashUtils
.hash(credentials.getPassword()));
if (user != null) {
+ if (Environment.isInProduction() && user.isPreDefined()) {
+ loginFailed();
+ return false;
+ }
identity.addRole(Constants.ADMIN_ROLE);
Events.instance().raiseEvent(Constants.AUTHENTICATED_EVENT,
user);
@@ -85,10 +90,7 @@
return true;
}
} catch (Exception nre) {
- setLoginFailed(true);
- facesMessages.clear();
- facesMessages.add(Constants.INVALID_LOGIN_OR_PASSWORD);
- FacesContext.getCurrentInstance().renderResponse();
+ loginFailed();
return false;
}
return false;
@@ -147,6 +149,13 @@
Events.instance().raiseEvent(Constants.START_REGISTER_EVENT);
}
+ public String startConversation() {
+ Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
+ NavigationEnum.ANONYM);
+ setConversationStarted(true);
+ return "";
+ }
+
private boolean checkUserExist(User user) {
if (userAction.isUserExist(user.getLogin())) {
addFacesMessage(Constants.REGISTER_LOGIN_NAME_ID,
@@ -186,11 +195,11 @@
return false;
}
- public String startConversation() {
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
- NavigationEnum.ANONYM);
- setConversationStarted(true);
- return "";
+ private void loginFailed() {
+ setLoginFailed(true);
+ facesMessages.clear();
+ facesMessages.add(Constants.INVALID_LOGIN_OR_PASSWORD);
+ FacesContext.getCurrentInstance().renderResponse();
}
public boolean isLoginFailed() {
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/Help.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/Help.java 2009-05-12 16:18:17 UTC (rev 14124)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/Help.java 2009-05-12 16:18:36 UTC (rev 14125)
@@ -4,6 +4,7 @@
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
+import org.richfaces.photoalbum.util.Environment;
@Name("help")
@Scope(ScopeType.EVENT)
@@ -23,4 +24,8 @@
public void navigateTo(String src){
this.setPage(src);
}
+
+ public boolean isShowHelp(){
+ return Environment.isShowHelp();
+ }
}
Added: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Environment.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Environment.java (rev 0)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Environment.java 2009-05-12 16:18:36 UTC (rev 14125)
@@ -0,0 +1,67 @@
+package org.richfaces.photoalbum.util;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.jboss.seam.contexts.ServletLifecycle;
+
+public class Environment {
+
+ private static final String SHOW_HELP_ICONS_STRATEGY = "showHelpIconsStrategy";
+
+ public static final String ENVIRONMENT_PROPERTIES = "environment.properties";
+
+ public static final String ENVIRONMENT = "environment";
+ public static final String DEVELOPMENT = "development";
+ public static final String PRODUCTION = "production";
+ public static final String SHOW = "yes";
+ public static final String NOT_SHOW = "no";
+
+ private static String getEnvironment() {
+ try {
+ final Properties props = new Properties();
+ props.load(new FileInputStream(ServletLifecycle.getServletContext()
+ .getRealPath("WEB-INF/classes/" + ENVIRONMENT_PROPERTIES)));
+ return props.getProperty(ENVIRONMENT);
+ } catch (FileNotFoundException e) {
+ // Do nothing.
+ } catch (IOException e) {
+ // Do nothing.
+ }
+
+ return null;
+ }
+
+ private static String getShowHelpIconsStrategy() {
+ try {
+ final Properties props = new Properties();
+ props.load(new FileInputStream(ServletLifecycle.getServletContext()
+ .getRealPath("WEB-INF/classes/" + ENVIRONMENT_PROPERTIES)));
+ return props.getProperty(SHOW_HELP_ICONS_STRATEGY);
+ } catch (FileNotFoundException e) {
+ // Do nothing.
+ } catch (IOException e) {
+ // Do nothing.
+ }
+
+ return null;
+ }
+
+ public static boolean isInProduction(){
+ final String environment = getEnvironment();
+ if (DEVELOPMENT.equals(environment)) {
+ return false;
+ }
+ return true;
+ }
+
+ public static boolean isShowHelp(){
+ final String environment = getShowHelpIconsStrategy();
+ if (SHOW.equals(environment)) {
+ return true;
+ }
+ return false;
+ }
+}
Property changes on: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/Environment.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionListener.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionListener.java 2009-05-12 16:18:17 UTC (rev 14124)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/util/SessionListener.java 2009-05-12 16:18:36 UTC (rev 14125)
@@ -1,16 +1,10 @@
package org.richfaces.photoalbum.util;
import java.util.List;
-import java.util.Properties;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.FileNotFoundException;
import javax.persistence.EntityManager;
-import javax.servlet.ServletContext;
import org.jboss.seam.ScopeType;
-import org.jboss.seam.contexts.ServletLifecycle;
import org.jboss.seam.annotations.Destroy;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@@ -28,13 +22,7 @@
@Name("sessionListener")
@Startup
public class SessionListener {
- public static final String ENVIRONMENT_PROPERTIES = "environment.properties";
-
- public static final String ENVIRONMENT = "environment";
- public static final String DEVELOPMENT = "development";
- public static final String PRODUCTION = "production";
-
-
+
@In(required=false)
private User user;
@@ -47,8 +35,7 @@
@Transactional
@Observer("org.jboss.seam.sessionExpired")
public void onDestroy(){
- final String environment = getEnviroment();
- if (DEVELOPMENT.equals(environment)) {
+ if (!Environment.isInProduction()) {
return;
}
@@ -65,18 +52,5 @@
}
}
- private String getEnviroment() {
- try {
- final Properties props = new Properties();
- props.load(new FileInputStream(ServletLifecycle.getServletContext()
- .getRealPath("WEB-INF/classes/" + ENVIRONMENT_PROPERTIES)));
- return props.getProperty(ENVIRONMENT);
- } catch (FileNotFoundException e) {
- // Do nothing.
- } catch (IOException e) {
- // Do nothing.
- }
-
- return null;
- }
+
}
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/error.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/fileUpload/uploadResult.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/buttonHelp.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/fileUploadHelp.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/tree_user.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml 2009-05-12 16:18:17 UTC (rev 14124)
+++ trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml 2009-05-12 16:18:36 UTC (rev 14125)
@@ -35,7 +35,7 @@
</a4j:outputPanel>
</a4j:repeat>
</h:panelGrid>
- <a4j:commandLink style="position: absolute; right: -65px; top: 80px;" actionListener="#{help.navigateTo('/includes/help/imageScrollerHelp.xhtml')}" oncomplete="#{rich:component('helpPanel')}.show()"
+ <a4j:commandLink rendered="#{help.isShowHelp()}" style="position: absolute; right: -65px; top: 80px;" actionListener="#{help.navigateTo('/includes/help/imageScrollerHelp.xhtml')}" oncomplete="#{rich:component('helpPanel')}.show()"
reRender="helpPanel">
<h:panelGroup style="width: 34px; height: 34px; display: inline-block; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/icons/help_sign.png',sizingMethod='scale');">
<h:graphicImage style="border:none;" height="34" width="34" border="0" styleClass="ie6transparency" value="img/icons/help_sign.png"></h:graphicImage>
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml 2009-05-12 16:18:17 UTC (rev 14124)
+++ trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml 2009-05-12 16:18:36 UTC (rev 14125)
@@ -12,7 +12,7 @@
step="40" width="100">
<a4j:support event="onchange" reRender="userAlbumImages" />
</rich:inputNumberSlider>
- <a4j:commandLink actionListener="#{help.navigateTo('/includes/help/inputSliderHelp.xhtml')}" oncomplete="#{rich:component('helpPanel')}.show()"
+ <a4j:commandLink rendered="#{help.isShowHelp()}" actionListener="#{help.navigateTo('/includes/help/inputSliderHelp.xhtml')}" oncomplete="#{rich:component('helpPanel')}.show()"
reRender="helpPanel">
<h:panelGroup style="width: 34px; height: 34px; display: inline-block; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/icons/help_sign.png',sizingMethod='scale');">
<h:graphicImage style="border:none;" border="0" width="34" height="34" styleClass="ie6transparency" value="img/icons/help_sign.png"></h:graphicImage>
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/index/status.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/index/tree.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/misc/errorPanel.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/misc/help.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/userPrefs/userPrefsEdit.xhtml
===================================================================
(Binary files differ)
15 years, 8 months
JBoss Rich Faces SVN: r14123 - in trunk/examples/photoalbum/source/web/src/main/webapp/includes: index and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-05-12 11:29:55 -0400 (Tue, 12 May 2009)
New Revision: 14123
Modified:
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageInfo.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/index/status.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/index/tree.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/search/searchWidget.xhtml
Log:
ie6 png fix
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml 2009-05-12 15:12:39 UTC (rev 14122)
+++ trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml 2009-05-12 15:29:55 UTC (rev 14123)
@@ -34,11 +34,14 @@
action="#{controller.showImage(img)}" />
</a4j:outputPanel>
</a4j:repeat>
- <a4j:commandLink actionListener="#{help.navigateTo('/includes/help/imageScrollerHelp.xhtml')}" oncomplete="#{rich:component('helpPanel')}.show()"
+ </h:panelGrid>
+ <a4j:commandLink style="position: absolute; right: -65px; top: 80px;" actionListener="#{help.navigateTo('/includes/help/imageScrollerHelp.xhtml')}" oncomplete="#{rich:component('helpPanel')}.show()"
reRender="helpPanel">
- <h:graphicImage style="border:none;" value="/img/icons/help_sign.png"></h:graphicImage>
- </a4j:commandLink>
- </h:panelGrid>
+ <h:panelGroup style="width: 34px; height: 34px; display: inline-block; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/icons/help_sign.png',sizingMethod='scale');">
+ <h:graphicImage style="border:none;" height="34" width="34" border="0" styleClass="ie6transparency" value="img/icons/help_sign.png"></h:graphicImage>
+ </h:panelGroup>
+ </a4j:commandLink>
+
<rich:datascroller page="#{controller.page}" styleClass="image-scroller" lastPageMode="full"
for="repeat" reRender="imagesTable" boundaryControls="hide"
stepControls="hide">
@@ -46,20 +49,27 @@
<h:outputText />
</f:facet>
<f:facet name="fastforward">
- <h:graphicImage styleClass="image-scroller-right-arrow"
- value="img/shell/arr_right.png" />
+ <h:panelGroup styleClass="image-scroller-right-arrow" style="width: 56px; height:34px; display: inline-block; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/shell/arr_right.png',sizingMethod='scale');">
+ <h:graphicImage
+ value="img/shell/arr_right.png" styleClass="ie6transparency" height="34" width="56" border="0"/>
+ </h:panelGroup>
</f:facet>
<f:facet name="fastforward_disabled">
- <h:graphicImage styleClass="image-scroller-right-arrow"
- value="img/shell/arr_right_dis.png" />
+ <h:panelGroup styleClass="image-scroller-right-arrow" style="width: 56px; height:34px; display: inline-block; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/shell/arr_right_dis.png',sizingMethod='scale');">
+ <h:graphicImage styleClass="ie6transparency" value="img/shell/arr_right_dis.png" />
+ </h:panelGroup>
</f:facet>
<f:facet name="fastrewind">
- <h:graphicImage styleClass="image-scroller-left-arrow"
- value="img/shell/arr_left.png" />
+ <h:panelGroup styleClass="image-scroller-left-arrow" style="width: 56px; height:34px; display: inline-block; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/shell/arr_left.png',sizingMethod='scale');">
+ <h:graphicImage styleClass="ie6transparency"
+ value="img/shell/arr_left.png" />
+ </h:panelGroup>
</f:facet>
<f:facet name="fastrewind_disabled">
- <h:graphicImage styleClass="image-scroller-left-arrow"
- value="img/shell/arr_left_dis.png" />
+ <h:panelGroup styleClass="image-scroller-left-arrow" style="width: 56px; height:34px; display: inline-block; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/shell/arr_left_dis.png',sizingMethod='scale');">
+ <h:graphicImage styleClass="ie6transparency"
+ value="img/shell/arr_left_dis.png" />
+ </h:panelGroup>
</f:facet>
</rich:datascroller>
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml 2009-05-12 15:12:39 UTC (rev 14122)
+++ trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml 2009-05-12 15:29:55 UTC (rev 14123)
@@ -11,9 +11,12 @@
showArrows="false" showBoundaryValues="true" showInput="false"
step="40" width="100">
<a4j:support event="onchange" reRender="userAlbumImages" />
- </rich:inputNumberSlider><a4j:commandLink actionListener="#{help.navigateTo('/includes/help/inputSliderHelp.xhtml')}" oncomplete="#{rich:component('helpPanel')}.show()"
+ </rich:inputNumberSlider>
+ <a4j:commandLink actionListener="#{help.navigateTo('/includes/help/inputSliderHelp.xhtml')}" oncomplete="#{rich:component('helpPanel')}.show()"
reRender="helpPanel">
- <h:graphicImage style="border:none;" value="/img/icons/help_sign.png"></h:graphicImage>
+ <h:panelGroup style="width: 34px; height: 34px; display: inline-block; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='img/icons/help_sign.png',sizingMethod='scale');">
+ <h:graphicImage style="border:none;" border="0" width="34" height="34" styleClass="ie6transparency" value="img/icons/help_sign.png"></h:graphicImage>
+ </h:panelGroup>
</a4j:commandLink>
</h:panelGrid></div>
</ui:composition>
\ No newline at end of file
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/index/status.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/index/tree.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/search/searchWidget.xhtml
===================================================================
(Binary files differ)
15 years, 8 months
JBoss Rich Faces SVN: r14122 - trunk/examples/photoalbum/source/web/src/main/webapp/stylesheet.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-05-12 11:12:39 -0400 (Tue, 12 May 2009)
New Revision: 14122
Modified:
trunk/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css
Log:
ie6 style
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css 2009-05-12 14:40:45 UTC (rev 14121)
+++ trunk/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css 2009-05-12 15:12:39 UTC (rev 14122)
@@ -972,4 +972,8 @@
.rich-inplace {
font-size: inherit;
-}
\ No newline at end of file
+}
+
+.ie6transparency {
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
+}
\ No newline at end of file
15 years, 8 months
JBoss Rich Faces SVN: r14121 - in trunk/examples/photoalbum/source/web/src/main/webapp: includes/image and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-05-12 10:40:45 -0400 (Tue, 12 May 2009)
New Revision: 14121
Modified:
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/slideshow.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/slideshow.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css
Log:
https://jira.jboss.org/jira/browse/RF-7103
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/slideshow.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/slideshow.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css 2009-05-12 14:22:06 UTC (rev 14120)
+++ trunk/examples/photoalbum/source/web/src/main/webapp/stylesheet/photoalbum.css 2009-05-12 14:40:45 UTC (rev 14121)
@@ -953,8 +953,9 @@
}
.slideshow-table{
- width: 100%;
- height: 100%;
+ /* images have max dimension 600 + 25 reserved for borders etc */
+ width: 625px;
+ height: 625px;
}
.slideshow-table-col{
15 years, 8 months
JBoss Rich Faces SVN: r14120 - in trunk/examples/photoalbum/tests/src/test: java/org/richfaces/photoalbum/testng and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-05-12 10:22:06 -0400 (Tue, 12 May 2009)
New Revision: 14120
Modified:
trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java
trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/DnDUseCasesTest.java
trunk/examples/photoalbum/tests/src/test/resources/testng.xml
Log:
RF-6909
Modified: trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java
===================================================================
--- trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java 2009-05-12 13:52:00 UTC (rev 14119)
+++ trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/RealWorldHelper.java 2009-05-12 14:22:06 UTC (rev 14120)
@@ -99,6 +99,7 @@
String DESCRIPTION_PATH = HEADER_PATH + "/following-sibling::p";
String PREVIEW_PATH = "//*[@class='preview_box_album_120']";
String PREVIEW_LINK_PATH_SUFFIX = "//a";
+ String PREVIEW_DRAG_PATH_SUFFIX = PREVIEW_LINK_PATH_SUFFIX + "/img";
String PREVIEW_NAME_PATH_SUFFIX = "/*[@class='album_name']";
String CONTROLS_PATH = "//*[@class='album-header-table-col2']";
String EDIT_PATH = CONTROLS_PATH + "/a[1]";
@@ -118,6 +119,7 @@
String DESCRIPTION_PATH = HEADER_PATH + "/following-sibling::p";
String PREVIEW_PATH = "//*[@class='preview_box_photo_120']";
String PREVIEW_LINK_PATH_SUFFIX = "//a";
+ String PREVIEW_DRAG_PATH_SUFFIX = PREVIEW_LINK_PATH_SUFFIX + "/img";
String PREVIEW_NAME_PATH_SUFFIX = "/*[@class='photo_name']";
String CONTROLS_PATH = "//*[@class='mainImage-table-col3']";
String EDIT_PATH = CONTROLS_PATH + "/div[1]/input";
@@ -238,6 +240,9 @@
Assert.assertTrue(selenium.isVisible(HtmlConstants.FilesUploadArea.FILE_UPLOAD_ID));
}
+ public static void openShelf(Selenium selenium) {
+ openShelf(selenium, selenium.getText(HtmlConstants.ShelfArea.HEADER_PATH + "[2]" + HtmlConstants.ShelfArea.HEADER_NAME_PATH_SUFFIX));
+ }
public static void openShelf(Selenium selenium, String shelfName) {
boolean presented = false;
int xpathCount = selenium.getXpathCount(HtmlConstants.ShelfArea.HEADER_PATH).intValue();
Modified: trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/DnDUseCasesTest.java
===================================================================
--- trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/DnDUseCasesTest.java 2009-05-12 13:52:00 UTC (rev 14119)
+++ trunk/examples/photoalbum/tests/src/test/java/org/richfaces/photoalbum/testng/DnDUseCasesTest.java 2009-05-12 14:22:06 UTC (rev 14120)
@@ -19,8 +19,8 @@
public void testDnDAlbumFromTree() {
renderPage();
RealWorldHelper.login(selenium);
- String fromShelfName = selenium.getText(HtmlConstants.ShelfArea.HEADER_PATH + "[2]" + HtmlConstants.ShelfArea.HEADER_NAME_PATH_SUFFIX);
- String toShelfName = selenium.getText(HtmlConstants.ShelfArea.HEADER_PATH + "[3]" + HtmlConstants.ShelfArea.HEADER_NAME_PATH_SUFFIX);
+ String toShelfName = selenium.getText(HtmlConstants.ShelfArea.HEADER_PATH + "[2]" + HtmlConstants.ShelfArea.HEADER_NAME_PATH_SUFFIX);
+ String fromShelfName = selenium.getText(HtmlConstants.ShelfArea.HEADER_PATH + "[3]" + HtmlConstants.ShelfArea.HEADER_NAME_PATH_SUFFIX);
RealWorldHelper.openShelf(selenium, fromShelfName);
RealWorldHelper.openAlbumFromPreview(selenium);
String albumName = selenium.getText(RealWorldHelper.HtmlConstants.AlbumArea.HEADER_NAME_PATH);
@@ -37,4 +37,47 @@
RealWorldHelper.openShelf(selenium, toShelfName);
Assert.assertTrue(RealWorldHelper.isAlbumPresentOnPage(selenium, albumName));
}
+
+ @Test
+ public void testDnDAlbumFromPreview() {
+ renderPage();
+ RealWorldHelper.login(selenium);
+ String fromShelfName = selenium.getText(HtmlConstants.ShelfArea.HEADER_PATH + "[2]" + HtmlConstants.ShelfArea.HEADER_NAME_PATH_SUFFIX);
+ String toShelfName = selenium.getText(HtmlConstants.ShelfArea.HEADER_PATH + "[3]" + HtmlConstants.ShelfArea.HEADER_NAME_PATH_SUFFIX);
+ RealWorldHelper.openShelf(selenium, fromShelfName);
+ String albumName = selenium.getText(HtmlConstants.AlbumArea.PREVIEW_PATH + HtmlConstants.AlbumArea.PREVIEW_NAME_PATH_SUFFIX);
+ String shelfTextPath = RealWorldHelper.getShelfTextPathInTree(selenium, toShelfName);
+ selenium.dragAndDropToObject(HtmlConstants.AlbumArea.PREVIEW_PATH + HtmlConstants.AlbumArea.PREVIEW_DRAG_PATH_SUFFIX, shelfTextPath);
+ waitForAjaxCompletion();
+ selenium.click(HtmlConstants.ToolBarArea.VIEW_SHELFS_PATH);
+ waitForAjaxCompletion();
+ RealWorldHelper.openShelf(selenium, fromShelfName);
+ Assert.assertFalse(RealWorldHelper.isAlbumPresentOnPage(selenium, albumName));
+ selenium.click(HtmlConstants.ToolBarArea.VIEW_SHELFS_PATH);
+ waitForAjaxCompletion();
+ RealWorldHelper.openShelf(selenium, toShelfName);
+ Assert.assertTrue(RealWorldHelper.isAlbumPresentOnPage(selenium, albumName));
+ }
+
+ @Test
+ public void testDnDImage() {
+ renderPage();
+ RealWorldHelper.login(selenium);
+ RealWorldHelper.openShelf(selenium);
+ String fromAlbumName = selenium.getText(HtmlConstants.AlbumArea.PREVIEW_PATH + HtmlConstants.AlbumArea.PREVIEW_NAME_PATH_SUFFIX);
+ String toAlbumName = selenium.getText(HtmlConstants.AlbumArea.PREVIEW_PATH + "[2]" + HtmlConstants.AlbumArea.PREVIEW_NAME_PATH_SUFFIX);
+ RealWorldHelper.openAlbumFromPreview(selenium);
+ String imageName = selenium.getText(HtmlConstants.ImageArea.PREVIEW_PATH + HtmlConstants.ImageArea.PREVIEW_NAME_PATH_SUFFIX);
+ String albumTextPath = RealWorldHelper.getAlbumTextPathInTree(selenium, toAlbumName);
+ selenium.dragAndDropToObject(HtmlConstants.ImageArea.PREVIEW_PATH + HtmlConstants.ImageArea.PREVIEW_DRAG_PATH_SUFFIX, albumTextPath);
+ waitForAjaxCompletion();
+ selenium.click(HtmlConstants.ToolBarArea.VIEW_ALBUMS_PATH);
+ waitForAjaxCompletion();
+ RealWorldHelper.openAlbumFromPreview(selenium, fromAlbumName);
+ Assert.assertFalse(RealWorldHelper.isImagePresentOnPage(selenium, imageName));
+ selenium.click(HtmlConstants.ToolBarArea.VIEW_ALBUMS_PATH);
+ waitForAjaxCompletion();
+ RealWorldHelper.openAlbumFromPreview(selenium, toAlbumName);
+ Assert.assertTrue(RealWorldHelper.isImagePresentOnPage(selenium, imageName));
+ }
}
Modified: trunk/examples/photoalbum/tests/src/test/resources/testng.xml
===================================================================
--- trunk/examples/photoalbum/tests/src/test/resources/testng.xml 2009-05-12 13:52:00 UTC (rev 14119)
+++ trunk/examples/photoalbum/tests/src/test/resources/testng.xml 2009-05-12 14:22:06 UTC (rev 14120)
@@ -3,10 +3,18 @@
<!-- test name="IEFunctionalTests">
<parameter name="browser" value="*iexplore"/>
</test-->
- <test name="FireFoxFunctionalTestsDANe">
+ <test name="FireFoxFunctionalTestsDANe1">
<parameter name="browser" value="*firefox"/>
+ <classes>
+ <class name="org.richfaces.photoalbum.testng.DnDUseCasesTest" />
+ </classes>
+ </test>
+ <test name="FireFoxFunctionalTestsDANe2">
+ <parameter name="browser" value="*firefox"/>
<packages>
- <package name="org.richfaces.photoalbum.testng" />
+ <package name="org.richfaces.photoalbum.testng" >
+ <exclude name="DnDUseCasesTest"></exclude>
+ </package>
</packages>
</test>
</suite>
15 years, 8 months
JBoss Rich Faces SVN: r14119 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-05-12 09:52:00 -0400 (Tue, 12 May 2009)
New Revision: 14119
Modified:
trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml
Log:
corrected a mistake
Modified: trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml 2009-05-12 12:54:04 UTC (rev 14118)
+++ trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml 2009-05-12 13:52:00 UTC (rev 14119)
@@ -97,9 +97,9 @@
</emphasis> wraps multiple input components and validates the data received from
them. </para>
- <para>The following example demonstrate a pattern of how the <emphasis role="bold">
+ <para>The following example demonstrates a pattern of how the <emphasis role="bold">
<property><rich:graphValidator></property>
- </emphasis> can be used.</para>
+ </emphasis> can be used:</para>
<programlisting role="XML"><![CDATA[...
<rich:graphValidator>
<h:panelGrid columns="3">
@@ -125,7 +125,7 @@
<para>The components's architecture provides an option to bind the component to a
managed bean, which is done with the <emphasis>
- <property><value></property>
+ <property>"value"</property>
</emphasis> attribute. The attribute ensures that the entered data is valid
after the model is updated by revalidating the bean properties.</para>
<para>Please look at the example below.</para>
15 years, 8 months
JBoss Rich Faces SVN: r14118 - trunk/examples/photoalbum/source/web/src/main/webapp/includes/image.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-12 08:54:04 -0400 (Tue, 12 May 2009)
New Revision: 14118
Modified:
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml
Log:
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml 2009-05-12 12:44:33 UTC (rev 14117)
+++ trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/inputNumberSlider.xhtml 2009-05-12 12:54:04 UTC (rev 14118)
@@ -5,8 +5,8 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:richx="http://richfaces.org/richx">
- <div><h:panelGrid columns="3">
- <h:outputText value="Image Dimension:"/><rich:inputNumberSlider rendered="#{model.images.size > 0}" enableManualInput="false"
+ <div><h:panelGrid columns="3" rendered="#{model.images.size > 0}">
+ <h:outputText value="Image Dimension:"/><rich:inputNumberSlider enableManualInput="false"
value="#{imageSizeHelper.value}" minValue="80" maxValue="200"
showArrows="false" showBoundaryValues="true" showInput="false"
step="40" width="100">
15 years, 8 months
JBoss Rich Faces SVN: r14117 - in trunk/examples/photoalbum/source/web/src/main: webapp/includes/userPrefs and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-12 08:44:33 -0400 (Tue, 12 May 2009)
New Revision: 14117
Modified:
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserPrefsHelper.java
trunk/examples/photoalbum/source/web/src/main/webapp/includes/userPrefs/userPrefsEdit.xhtml
Log:
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserPrefsHelper.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserPrefsHelper.java 2009-05-12 12:27:19 UTC (rev 14116)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/ui/UserPrefsHelper.java 2009-05-12 12:44:33 UTC (rev 14117)
@@ -48,17 +48,13 @@
avatarData = item.getFile();
}
- public Date getDefaultDate(){
+ /*public Date getDefaultDate(){
if(calendar == null){
calendar = new GregorianCalendar(1980, Calendar.DECEMBER, 25);
}
return calendar.getTime();
- }
+ }*/
- public void setDefaultDate(Date date){
-
- }
-
public File getAvatarData() {
return avatarData;
}
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/userPrefs/userPrefsEdit.xhtml
===================================================================
(Binary files differ)
15 years, 8 months
JBoss Rich Faces SVN: r14116 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-05-12 08:27:19 -0400 (Tue, 12 May 2009)
New Revision: 14116
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-7108
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml 2009-05-12 12:27:08 UTC (rev 14115)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep1.xhtml 2009-05-12 12:27:19 UTC (rev 14116)
@@ -19,7 +19,7 @@
<h:inputText id="comp" value="#{profile.company}" label="Company" required="true" />
<rich:message for="comp"/>
</h:panelGrid>
- <div class="navPanel">
+ <div class="navPanel" style="width:100%;">
<a4j:commandButton style="float:right" action="next" value="Next >>"/>
</div>
</div>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml 2009-05-12 12:27:08 UTC (rev 14115)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/include/examples/wstep2.xhtml 2009-05-12 12:27:19 UTC (rev 14116)
@@ -11,7 +11,7 @@
<h:inputTextarea cols="20" rows="4" id="notes" value="#{profile.notes}" label="Notes" required="true" />
<rich:message for="notes" />
</h:panelGrid>
- <div class="navPanel">
+ <div class="navPanel" style="width:100%;">
<a4j:commandButton value="<<Previous" style="float:left" immediate="true" action="previous"/>
<a4j:commandButton value="Next >>" style="float:right" action="next"/>
</div>
15 years, 8 months