JBoss Rich Faces SVN: r14215 - trunk/examples/photoalbum/source/web/src/main/webapp/includes/misc.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-14 11:21:26 -0400 (Thu, 14 May 2009)
New Revision: 14215
Modified:
trunk/examples/photoalbum/source/web/src/main/webapp/includes/misc/modalPanels.xhtml
Log:
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/misc/modalPanels.xhtml
===================================================================
(Binary files differ)
15 years, 1 month
JBoss Rich Faces SVN: r14214 - in trunk/ui: layout/src/main/resources/org/richfaces/renderkit/html/css and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-05-14 10:42:00 -0400 (Thu, 14 May 2009)
New Revision: 14214
Removed:
trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.xcss
Modified:
trunk/ui/assembly/pom.xml
Log:
RF-7076
Modified: trunk/ui/assembly/pom.xml
===================================================================
--- trunk/ui/assembly/pom.xml 2009-05-14 14:32:33 UTC (rev 14213)
+++ trunk/ui/assembly/pom.xml 2009-05-14 14:42:00 UTC (rev 14214)
@@ -62,7 +62,7 @@
<!--
<templateXpath>/*[local-name()='template']/*</templateXpath>
-->
- <excludeXcss>**/basic.xcss, **/basic_classes.xcss, **/basic_both.xcss, **/extended.xcss, **/extended_classes.xcss, **/extended_both.xcss, **/skin*.xcss, **/tiny_mce/**, **/org/richfaces/renderkit/html/css/simple.xcss, **/org/richfaces/renderkit/html/css/violetRays.xcss, **/layout/**/fonts.xcss </excludeXcss>
+ <excludeXcss>**/basic.xcss, **/basic_classes.xcss, **/basic_both.xcss, **/extended.xcss, **/extended_classes.xcss, **/extended_both.xcss, **/skin*.xcss, **/tiny_mce/**, **/org/richfaces/renderkit/html/css/simple.xcss, **/org/richfaces/renderkit/html/css/violetRays.xcss</excludeXcss>
<commonStyle>org/richfaces/skin.xcss</commonStyle>
</configuration>
<executions>
Deleted: trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.xcss
===================================================================
--- trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.xcss 2009-05-14 14:32:33 UTC (rev 14213)
+++ trunk/ui/layout/src/main/resources/org/richfaces/renderkit/html/css/fonts.xcss 2009-05-14 14:42:00 UTC (rev 14214)
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<f:template xmlns:f='http:/jsf.exadel.com/template'
- xmlns:u='http:/jsf.exadel.com/template/util'
- xmlns="http://www.w3.org/1999/xhtml">
-
-<u:selector name="body" >
- <u:style name="font" value="13px/1.231 arial,helvetica,clean,sans-serif" />
- <u:style name="*font-size" value="small" /> /* for IE */
- <u:style name="*font" value="x-small" /> /* for IE in quirks mode */
-</u:selector>
-
-/**
- * Nudge down to get to 13px equivalent for these form elements
- */
-<u:selector name="select,input,button,textarea" >
- <u:style name="font" value="99% arial,helvetica,clean,sans-serif" />
-</u:selector>
-
-/**
- * To help tables remember to inherit
- */
-<u:selector name="table" >
- <u:style name="font-size" value="inherit" />
- <u:style name="font" value="100%" />
-</u:selector>
-
-/**
- * Bump up IE to get to 13px equivalent for these fixed-width elements
- */
-<u:selector name="pre,code,kbd,samp,tt">
- <u:style name="font-family" value="monospace" />
- <u:style name="*font-size" value="108%" />
- <u:style name="line-height" value="100%" />
-</u:selector>
-</f:template>
\ No newline at end of file
15 years, 1 month
JBoss Rich Faces SVN: r14213 - in trunk/examples/photoalbum/source/ejb: sql/short and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-14 10:32:33 -0400 (Thu, 14 May 2009)
New Revision: 14213
Modified:
trunk/examples/photoalbum/source/ejb/sql/full/import.sql
trunk/examples/photoalbum/source/ejb/sql/short/import.sql
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Comment.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Shelf.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IImageAction.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IShelfAction.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/ImageAction.java
Log:
Modified: trunk/examples/photoalbum/source/ejb/sql/full/import.sql
===================================================================
--- trunk/examples/photoalbum/source/ejb/sql/full/import.sql 2009-05-14 14:32:19 UTC (rev 14212)
+++ trunk/examples/photoalbum/source/ejb/sql/full/import.sql 2009-05-14 14:32:33 UTC (rev 14213)
@@ -1,6 +1,6 @@
-INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (1, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'amarkhel', '8cb2237d0679ca88db6464eac60da96345513964', '1985-01-08', 0, 0, true);
-INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (2, 'Nick', 'Curtis', 'nkurtis(a)iba.com', 'Viking', '8cb2237d0679ca88db6464eac60da96345513964', '1978-01-08', 1, 0, true);
-INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (3, 'John', 'Smith', 'jsmith(a)jboss.com', 'Noname', '8cb2237d0679ca88db6464eac60da96345513964', '1970-01-08', 1, 0, true);
+INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (1, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'amarkhel', '8cb2237d0679ca88db6464eac60da96345513964', '1985-01-08', 0, false, true);
+INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (2, 'Nick', 'Curtis', 'nkurtis(a)iba.com', 'Viking', '8cb2237d0679ca88db6464eac60da96345513964', '1978-01-08', 1, false, true);
+INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (3, 'John', 'Smith', 'jsmith(a)jboss.com', 'Noname', '8cb2237d0679ca88db6464eac60da96345513964', '1970-01-08', 1, false, true);
INSERT INTO Shelf(id, name, description, owner_id, created, shared) VALUES (1, 'Nature', 'Nature pictures', 1, '2009-12-18', true);
INSERT INTO Shelf(id, name, description, owner_id, created, shared) VALUES (2, 'Sport & Cars', 'Sport & Cars pictures', 1, '2009-12-18', true);
Modified: trunk/examples/photoalbum/source/ejb/sql/short/import.sql
===================================================================
--- trunk/examples/photoalbum/source/ejb/sql/short/import.sql 2009-05-14 14:32:19 UTC (rev 14212)
+++ trunk/examples/photoalbum/source/ejb/sql/short/import.sql 2009-05-14 14:32:33 UTC (rev 14213)
@@ -1,6 +1,6 @@
-INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (1, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'amarkhel', '8cb2237d0679ca88db6464eac60da96345513964', '1985-01-08', 0, 0, true);
-INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (2, 'Nick', 'Curtis', 'nkurtis(a)iba.com', 'Viking', '8cb2237d0679ca88db6464eac60da96345513964', '1978-01-08', 1, 0, true);
-INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (3, 'John', 'Smith', 'jsmith(a)jboss.com', 'Noname', '8cb2237d0679ca88db6464eac60da96345513964', '1970-01-08', 1, 0, true);
+INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (1, 'Andrey', 'Markhel', 'amarkhel(a)exadel.com', 'amarkhel', '8cb2237d0679ca88db6464eac60da96345513964', '1985-01-08', 0, false, true);
+INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (2, 'Nick', 'Curtis', 'nkurtis(a)iba.com', 'Viking', '8cb2237d0679ca88db6464eac60da96345513964', '1978-01-08', 1, false, true);
+INSERT INTO User(id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (3, 'John', 'Smith', 'jsmith(a)jboss.com', 'Noname', '8cb2237d0679ca88db6464eac60da96345513964', '1970-01-08', 1, false, true);
INSERT INTO Shelf(id, name, description, owner_id, created, shared) VALUES (1, 'Nature', 'Nature pictures', 1, '2009-12-18', true);
INSERT INTO Shelf(id, name, description, owner_id, created, shared) VALUES (2, 'Sport & Cars', 'Sport & Cars pictures', 1, '2009-12-18', true);
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Comment.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Comment.java 2009-05-14 14:32:19 UTC (rev 14212)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Comment.java 2009-05-14 14:32:33 UTC (rev 14213)
@@ -23,7 +23,6 @@
import java.io.Serializable;
import java.util.Date;
-import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java 2009-05-14 14:32:19 UTC (rev 14212)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java 2009-05-14 14:32:33 UTC (rev 14213)
@@ -74,6 +74,10 @@
query = "select i from Image i where i.path = :path and i.album = :album"
),
@NamedQuery(
+ name = "image-countIdenticalImages",
+ query = "select count(i) from Image i where i.path like :path and i.album = :album"
+ ),
+ @NamedQuery(
name = "tag-suggest",
query = "select m from MetaTag m where lower(m.tag) like :tag"
)})
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Shelf.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Shelf.java 2009-05-14 14:32:19 UTC (rev 14212)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Shelf.java 2009-05-14 14:32:33 UTC (rev 14213)
@@ -1,30 +1,30 @@
package org.richfaces.photoalbum.domain;
-import org.hibernate.annotations.OrderBy;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotEmpty;
-import org.hibernate.validator.NotNull;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
+import java.io.File;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
-import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
-import java.io.File;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import org.hibernate.annotations.OrderBy;
+import org.hibernate.validator.Length;
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
@Entity
@Name("shelf")
@Scope(ScopeType.CONVERSATION)
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-05-14 14:32:19 UTC (rev 14212)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-05-14 14:32:33 UTC (rev 14213)
@@ -86,7 +86,7 @@
@Scope(ScopeType.SESSION)
@Name("user")
@AutoCreate
-@Table(uniqueConstraints = {
+@Table(name="User", uniqueConstraints = {
@UniqueConstraint(columnNames = "login"),
@UniqueConstraint(columnNames = "email")
}
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java 2009-05-14 14:32:19 UTC (rev 14212)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java 2009-05-14 14:32:33 UTC (rev 14213)
@@ -53,6 +53,7 @@
public static final String USER_DELETED_EVENT = "userDeletedEvent";
//Errors(Internationalization pending)
+ public static final String YOU_ALREADY_DOWNLOAD_MANY_COPIES_OF_THIS_IMAGE_ERROR = "You already download 256 copies of this image. Please specify another name for uploaded image";
public static final String SAME_IMAGE_EXIST_ERROR = "You already have an image with the given name in selected album";
public static final String SAME_ALBUM_EXIST_ERROR = "You already have an album with the given name in selected shelf";
public static final String SAME_SHELF_EXIST_ERROR = "You already have a shelf with the given name.";
@@ -116,6 +117,7 @@
public static final String ADMIN_ROLE = "admin";
//misc
+ public static final int NUMBER_OF_IMAGE_COPIES = 256;
public static final String AVATAR_JPG = "avatar.jpg";
public static final int AVATAR_SIZE = 80;
public static final int DEFAULT_IMAGE_SIZEVALUE = 120;
@@ -171,6 +173,7 @@
public static final String SHELF_PARAMETER = "shelf";
public static final String PATH_PARAMETER = "path";
public static final String IMAGE_PATH_EXIST_QUERY = "image-exist";
+ public static final String IMAGE_IDENTICAL_QUERY = "image-countIdenticalImages";
public static final String SEARCH_NO_OPTIONS_ERROR = "You must select at least one search option";
public static final String TREE_ID = "treeform";
public static final String USER_COMMENTS_QUERY = "user-comments";
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IImageAction.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IImageAction.java 2009-05-14 14:32:19 UTC (rev 14212)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IImageAction.java 2009-05-14 14:32:33 UTC (rev 14213)
@@ -24,6 +24,7 @@
import javax.ejb.Local;
+import org.richfaces.photoalbum.domain.Album;
import org.richfaces.photoalbum.domain.Comment;
import org.richfaces.photoalbum.domain.Image;
import org.richfaces.photoalbum.domain.MetaTag;
@@ -54,7 +55,9 @@
public List<MetaTag> getTagsLikeString(String suggest);
- public boolean isImageWithThisPathExist(Image image);
+ public boolean isImageWithThisPathExist(Album album, String path);
+
+ public Long getCountIdenticalImages(Album album, String path);
public List<Comment> findAllUserComments(User user);
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IShelfAction.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IShelfAction.java 2009-05-14 14:32:19 UTC (rev 14212)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/IShelfAction.java 2009-05-14 14:32:33 UTC (rev 14213)
@@ -26,7 +26,6 @@
import javax.ejb.Local;
import org.richfaces.photoalbum.domain.Shelf;
-import org.richfaces.photoalbum.domain.User;
/**
* Interface for manipulating with shelf entity
*
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/ImageAction.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/ImageAction.java 2009-05-14 14:32:19 UTC (rev 14212)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/ImageAction.java 2009-05-14 14:32:33 UTC (rev 14213)
@@ -36,7 +36,6 @@
import org.richfaces.photoalbum.domain.Comment;
import org.richfaces.photoalbum.domain.Image;
import org.richfaces.photoalbum.domain.MetaTag;
-import org.richfaces.photoalbum.domain.Shelf;
import org.richfaces.photoalbum.domain.User;
/**
* Class for manipulating with image entity. Analogous to DAO pattern.
@@ -226,22 +225,38 @@
}
/**
- * Check if image with specified path already exist
+ * Check if image with specified path already exist in specified album
+ * @param album - album to check
+ * @param path - path to check
* @return is image with specified path already exist
*/
- public boolean isImageWithThisPathExist(Image image) {
+ public boolean isImageWithThisPathExist(Album album, String path) {
return em.createNamedQuery(Constants.IMAGE_PATH_EXIST_QUERY)
- .setParameter(Constants.PATH_PARAMETER, image.getPath())
- .setParameter(Constants.ALBUM_PARAMETER, image.getAlbum())
+ .setParameter(Constants.PATH_PARAMETER, path)
+ .setParameter(Constants.ALBUM_PARAMETER, album)
.getResultList().size() != 0;
}
+
+ /**
+ * Return count of images with path, that started from specified path already exist in specified album
+ * @param album - album to check
+ * @param path - path to check
+ * @return count of images
+ */
+ public Long getCountIdenticalImages(Album album, String path) {
+ return (Long)em.createNamedQuery(Constants.IMAGE_IDENTICAL_QUERY)
+ .setParameter(Constants.PATH_PARAMETER, path + Constants.PERCENT)
+ .setParameter(Constants.ALBUM_PARAMETER, album)
+ .getSingleResult();
+ }
/**
* Retrieve all cooments posted by given user.
* @return list of comments
*/
+ @SuppressWarnings("unchecked")
public List<Comment> findAllUserComments(User user) {
- return em.createNamedQuery(Constants.USER_COMMENTS_QUERY)
+ return (List<Comment>)em.createNamedQuery(Constants.USER_COMMENTS_QUERY)
.setParameter(Constants.AUTHOR_PARAMETER, user)
.getResultList();
}
15 years, 1 month
JBoss Rich Faces SVN: r14212 - in trunk/examples/photoalbum/source/web/src/main: webapp/includes/help and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-14 10:32:19 -0400 (Thu, 14 May 2009)
New Revision: 14212
Modified:
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/FileUploadManager.java
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ImageManager.java
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/buttonHelp.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/errorHelp.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/fileUploadHelp.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/imageScrollerHelp.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/inputSliderHelp.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/slideshow.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/statusHelp.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/tree_predefined.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/tree_user.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/validationHelp.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageInfo.xhtml
Log:
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java 2009-05-14 14:10:29 UTC (rev 14211)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java 2009-05-14 14:32:19 UTC (rev 14212)
@@ -69,7 +69,7 @@
public void addAlbum(Album album){
//Shelf must be not-null
if(album.getShelf() == null){
- facesMessages.addToControl(Constants.SHELF_ID, Constants.SHELF_MUST_BE_NOT_NULL_ERROR, null);
+ facesMessages.addToControl(Constants.SHELF_ID, Constants.SHELF_MUST_BE_NOT_NULL_ERROR, new Object[0]);
Contexts.getConversationContext().set(Constants.ALBUM_VARIABLE, album);
return;
}
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/FileUploadManager.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/FileUploadManager.java 2009-05-14 14:10:29 UTC (rev 14211)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/FileUploadManager.java 2009-05-14 14:32:19 UTC (rev 14212)
@@ -39,6 +39,7 @@
import org.richfaces.photoalbum.domain.Image;
import org.richfaces.photoalbum.service.Constants;
import org.richfaces.photoalbum.service.IImageAction;
+import org.richfaces.photoalbum.service.PhotoAlbumException;
import org.richfaces.photoalbum.ui.FileWrapper;
import com.drew.imaging.jpeg.JpegMetadataReader;
@@ -92,10 +93,11 @@
}
try{
//Check if image with given name already exist
- if(imageAction.isImageWithThisPathExist(image)){
+ if(imageAction.isImageWithThisPathExist(image.getAlbum(), image.getPath())){
//If exist generate new path for image
- image.setPath(generateNewPath(image.getPath()));
- image.setName(generateNewPath(image.getPath()));
+ String newPath = generateNewPath(image);
+ image.setPath(newPath);
+ image.setName(newPath);
}
//Save to database
imageAction.addImage(image);
@@ -115,8 +117,11 @@
item.getFile().delete();
}
- private String generateNewPath(String path) {
- return fileManager.transformPath(path, "_1");
+ private String generateNewPath(Image image) throws PhotoAlbumException{
+ String path = image.getPath().substring(0, image.getPath().lastIndexOf(Constants.DOT));
+ Long countCopies = imageAction.getCountIdenticalImages(image.getAlbum(), path) + 1;
+ String newPath = fileManager.transformPath(image.getPath(), "_" + countCopies);
+ return newPath;
}
private void addError(UploadItem item, Image image, String error) {
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ImageManager.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ImageManager.java 2009-05-14 14:10:29 UTC (rev 14211)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ImageManager.java 2009-05-14 14:32:19 UTC (rev 14212)
@@ -43,7 +43,6 @@
import org.richfaces.photoalbum.domain.Comment;
import org.richfaces.photoalbum.domain.Image;
import org.richfaces.photoalbum.domain.MetaTag;
-import org.richfaces.photoalbum.domain.Shelf;
import org.richfaces.photoalbum.domain.User;
import org.richfaces.photoalbum.service.Constants;
import org.richfaces.photoalbum.service.IImageAction;
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/errorHelp.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/imageScrollerHelp.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/inputSliderHelp.xhtml
===================================================================
(Binary files differ)
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/help/statusHelp.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/help/tree_predefined.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/help/validationHelp.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageInfo.xhtml
===================================================================
(Binary files differ)
15 years, 1 month
JBoss Rich Faces SVN: r14211 - in trunk: samples/richfaces-demo/src/main/webapp/richfaces/layouts/page and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2009-05-14 10:10:29 -0400 (Thu, 14 May 2009)
New Revision: 14211
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/page/template.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/usage.xhtml
trunk/ui/assembly/pom.xml
Log:
https://jira.jboss.org/jira/browse/RF-7066
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/page/template.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/page/template.xhtml 2009-05-14 12:50:25 UTC (rev 14210)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/page/template.xhtml 2009-05-14 14:10:29 UTC (rev 14211)
@@ -32,10 +32,10 @@
<rich:layoutPanel position="top" width="100%">
<ui:include src="/richfaces/layouts/page/includes/gridtop.xhtml" />
</rich:layoutPanel>
- <rich:layoutPanel position="left" width="50">
+ <rich:layoutPanel position="left" width="50%">
<ui:include src="/richfaces/layouts/page/includes/gridleft.xhtml" />
</rich:layoutPanel>
- <rich:layoutPanel position="center" width="50">
+ <rich:layoutPanel position="center" width="50%">
<ui:include src="/richfaces/layouts/page/includes/gridcenter.xhtml" />
</rich:layoutPanel>
<rich:layoutPanel position="bottom">
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/usage.xhtml 2009-05-14 12:50:25 UTC (rev 14210)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/layouts/usage.xhtml 2009-05-14 14:10:29 UTC (rev 14211)
@@ -1,29 +1,29 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns: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 template="/templates/component-sample.xhtml">
- <ui:define name="sample">
- <p>A set of layout components designed based on <h:outputLink
- target="blank" value="http://developer.yahoo.com/yui/layout/">Yahoo layouts</h:outputLink>.
- </p>
- <p>
- The component set consists of three components. A <b>Page </b>component for page
- layout definition and <b>Layout/LayoutPanel</b> components for nesting layout
- grids creation.
- </p>
- <p>
- Since these components are designed to create full page layouts, click on the link
- below to open a page template sample based on them and read
- detailed descriptions.
- </p>
- <h:outputLink target="blank"
- value="#{facesContext.externalContext.requestContextPath}/richfaces/layouts/page/template.jsf">Open a sample built with layouts components</h:outputLink>
-
- </ui:define>
-
-</ui:composition>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns: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 template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+ <p>A set of layout components designed based on <h:outputLink
+ target="blank" value="http://developer.yahoo.com/yui/layout/">Yahoo layouts</h:outputLink>.
+ </p>
+ <p>
+ The component set consists of three components. A <b>Page </b>component for page
+ layout definition and <b>Layout/LayoutPanel</b> components for nesting layout
+ grids creation.
+ </p>
+ <p>
+ Since these components are designed to create full page layouts, click on the link
+ below to open a page template sample based on them and read
+ detailed descriptions.
+ </p>
+ <h:outputLink target="blank"
+ value="#{facesContext.externalContext.requestContextPath}/richfaces/layouts/page/template.jsf">Open a sample built with layouts components</h:outputLink>
+<br/>
+ </ui:define>
+
+</ui:composition>
+</html>
Modified: trunk/ui/assembly/pom.xml
===================================================================
--- trunk/ui/assembly/pom.xml 2009-05-14 12:50:25 UTC (rev 14210)
+++ trunk/ui/assembly/pom.xml 2009-05-14 14:10:29 UTC (rev 14211)
@@ -62,7 +62,7 @@
<!--
<templateXpath>/*[local-name()='template']/*</templateXpath>
-->
- <excludeXcss>**/basic.xcss, **/basic_classes.xcss, **/basic_both.xcss, **/extended.xcss, **/extended_classes.xcss, **/extended_both.xcss, **/skin*.xcss, **/tiny_mce/**, **/org/richfaces/renderkit/html/css/simple.xcss, **/org/richfaces/renderkit/html/css/violetRays.xcss </excludeXcss>
+ <excludeXcss>**/basic.xcss, **/basic_classes.xcss, **/basic_both.xcss, **/extended.xcss, **/extended_classes.xcss, **/extended_both.xcss, **/skin*.xcss, **/tiny_mce/**, **/org/richfaces/renderkit/html/css/simple.xcss, **/org/richfaces/renderkit/html/css/violetRays.xcss, **/layout/**/fonts.xcss </excludeXcss>
<commonStyle>org/richfaces/skin.xcss</commonStyle>
</configuration>
<executions>
15 years, 1 month
JBoss Rich Faces SVN: r14210 - in trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum: service and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-14 08:50:25 -0400 (Thu, 14 May 2009)
New Revision: 14210
Modified:
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/ImageAction.java
Log:
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java 2009-05-14 12:50:18 UTC (rev 14209)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/Image.java 2009-05-14 12:50:25 UTC (rev 14210)
@@ -25,27 +25,14 @@
*/
package org.richfaces.photoalbum.domain;
-import org.hibernate.annotations.Cascade;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.LazyCollectionOption;
-import org.hibernate.annotations.OrderBy;
-import org.hibernate.annotations.Table;
-import org.hibernate.annotations.ForeignKey;
-import org.hibernate.annotations.OnDelete;
-import org.hibernate.annotations.OnDeleteAction;
-import org.hibernate.validator.Length;
-import org.hibernate.validator.NotEmpty;
-import org.hibernate.validator.NotNull;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.richfaces.photoalbum.service.ActionTools;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
-import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
@@ -56,11 +43,19 @@
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
+import org.hibernate.annotations.OnDelete;
+import org.hibernate.annotations.OnDeleteAction;
+import org.hibernate.annotations.OrderBy;
+import org.hibernate.validator.Length;
+import org.hibernate.validator.NotEmpty;
+import org.hibernate.validator.NotNull;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.photoalbum.service.ActionTools;
+
@NamedQueries({
@NamedQuery(
name = "tag-byName",
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-05-14 12:50:18 UTC (rev 14209)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-05-14 12:50:25 UTC (rev 14210)
@@ -39,15 +39,14 @@
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
-import javax.persistence.FetchType;
+import org.hibernate.annotations.LazyCollection;
+import org.hibernate.annotations.LazyCollectionOption;
+import org.hibernate.annotations.OrderBy;
import org.hibernate.validator.Email;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
import org.hibernate.validator.NotNull;
-import org.hibernate.annotations.LazyCollection;
-import org.hibernate.annotations.OrderBy;
-import org.hibernate.annotations.LazyCollectionOption;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/ImageAction.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/ImageAction.java 2009-05-14 12:50:18 UTC (rev 14209)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/ImageAction.java 2009-05-14 12:50:25 UTC (rev 14210)
@@ -127,7 +127,12 @@
if (!image.equals(image.getAlbum().getCoveringImage())) {
image.getAlbum().setCoveringImage(image);
}
+ }else{
+ if (image.equals(image.getAlbum().getCoveringImage())) {
+ image.getAlbum().setCoveringImage(image.getAlbum().getImages().get(0));
+ }
}
+
}
em.flush();
}
15 years, 1 month
JBoss Rich Faces SVN: r14209 - trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-14 08:50:18 -0400 (Thu, 14 May 2009)
New Revision: 14209
Modified:
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/SlideshowManager.java
Log:
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/SlideshowManager.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/SlideshowManager.java 2009-05-14 09:33:24 UTC (rev 14208)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/SlideshowManager.java 2009-05-14 12:50:18 UTC (rev 14209)
@@ -78,6 +78,7 @@
*/
public void startSlideshow(){
active = true;
+ errorDetected = false;
this.slideshowIndex = 0;
this.startSlideshowIndex = 0;
if(model.getImages() == null || model.getImages().size() < 1){
@@ -106,6 +107,7 @@
*@param selectedImage - first image to show during slideshow
*/
public void startSlideshow(Image selectedImage){
+ errorDetected = false;
active = true;
if(model.getImages() == null || model.getImages().size() < 1){
stopSlideshow();
15 years, 1 month
JBoss Rich Faces SVN: r14207 - in trunk/examples/photoalbum: source and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-05-13 19:14:45 -0400 (Wed, 13 May 2009)
New Revision: 14207
Modified:
trunk/examples/photoalbum/readme.txt
trunk/examples/photoalbum/source/readme.txt
Log:
Typos corrected
Modified: trunk/examples/photoalbum/readme.txt
===================================================================
--- trunk/examples/photoalbum/readme.txt 2009-05-13 22:52:07 UTC (rev 14206)
+++ trunk/examples/photoalbum/readme.txt 2009-05-13 23:14:45 UTC (rev 14207)
@@ -1,4 +1,4 @@
-The Photo Album application: sort description
+The Photo Album application: short description
Modified: trunk/examples/photoalbum/source/readme.txt
===================================================================
--- trunk/examples/photoalbum/source/readme.txt 2009-05-13 22:52:07 UTC (rev 14206)
+++ trunk/examples/photoalbum/source/readme.txt 2009-05-13 23:14:45 UTC (rev 14207)
@@ -1,4 +1,4 @@
-The Photo Album application: sort description
+The Photo Album application: short description
15 years, 1 month
JBoss Rich Faces SVN: r14206 - trunk/examples/photoalbum/assembly.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-05-13 18:52:07 -0400 (Wed, 13 May 2009)
New Revision: 14206
Modified:
trunk/examples/photoalbum/assembly/photoalbum.xml
Log:
https://jira.jboss.org/jira/browse/RF-7082
Modified: trunk/examples/photoalbum/assembly/photoalbum.xml
===================================================================
--- trunk/examples/photoalbum/assembly/photoalbum.xml 2009-05-13 22:35:43 UTC (rev 14205)
+++ trunk/examples/photoalbum/assembly/photoalbum.xml 2009-05-13 22:52:07 UTC (rev 14206)
@@ -11,6 +11,10 @@
<file>
<source>../../lgpl.txt</source>
</file>
+ <file>
+ <source>../readme.txt</source>
+ <outputDirectory>photoalbum</outputDirectory>
+ </file>
</files>
<fileSets>
@@ -36,8 +40,10 @@
<include>**/*build.xml</include>
<include>**/build.properties</include>
<include>**/pom.xml</include>
+ <include>**/readme.txt</include>
</includes>
<excludes>
+ <exclude>**/target</exclude>
<exclude>*/src/main/images/full</exclude>
<exclude>*/src/main/images/full/**</exclude>
</excludes>
15 years, 1 month