Author: amarkhel
Date: 2009-03-25 13:40:23 -0400 (Wed, 25 Mar 2009)
New Revision: 13195
Modified:
trunk/test-applications/realworld2/web/pom.xml
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/help/tree_build_descr.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/slideshow.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/images.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/index/tree.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/misc/errorPanel.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelfUnvisited.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userSharedAlbums.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userSharedImages.xhtml
Log:
Fix some bugs
Modified: trunk/test-applications/realworld2/web/pom.xml
===================================================================
--- trunk/test-applications/realworld2/web/pom.xml 2009-03-25 17:40:09 UTC (rev 13194)
+++ trunk/test-applications/realworld2/web/pom.xml 2009-03-25 17:40:23 UTC (rev 13195)
@@ -34,6 +34,11 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>com.uwyn</groupId>
+ <artifactId>jhighlight</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-03-25
17:40:09 UTC (rev 13194)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-03-25
17:40:23 UTC (rev 13195)
@@ -85,7 +85,7 @@
String string = album.getId().toString();
albumAction.deleteAlbum(album, flushStrategy.isDatabaseStoreStrategy());
deleteDirectory(string);
- model.resetModel(model.getMainArea(), model.getSelectedUser(),
model.getSelectedShelf(), null, null);
+ model.resetModel(NavigationEnum.ALL_ALBUMS, model.getSelectedUser(),
model.getSelectedShelf(), null, null);
Events.instance().raiseEvent("albumDeleted");
Events.instance().raiseEvent("clearTree");
}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java 2009-03-25
17:40:09 UTC (rev 13194)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java 2009-03-25
17:40:23 UTC (rev 13195)
@@ -53,6 +53,7 @@
private static final String _SMALL160 = "_small160";
private static final String _SMALL120 = "_small120";
private static final String _SMALL80 = "_small80";
+ private static final String _SMALL200 = "_small200";
private static final String _MEDIUM = "_medium";
private static final String _MINI = "_mini";
@@ -164,6 +165,7 @@
writeFile(fileName, tempFilePath, _SMALL80, 80, true);
writeFile(fileName, tempFilePath, _SMALL120, 120, true);
writeFile(fileName, tempFilePath, _SMALL160, 160, true);
+ writeFile(fileName, tempFilePath, _SMALL200, 200, true);
writeFile(fileName, tempFilePath, _MINI, 150, true);
writeFile(fileName, tempFilePath, _MEDIUM, 600, true);
return true;
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-03-25
17:40:09 UTC (rev 13194)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-03-25
17:40:23 UTC (rev 13195)
@@ -65,6 +65,7 @@
public void deleteImage(Image image) {
String imagePath = image.getPath();
+ model.resetModel(NavigationEnum.ALBUM_PREVIEW, image.getAlbum().getOwner(),
image.getAlbum().getShelf(), image.getAlbum(), null);
imageAction.deleteImage(image, flushStrategy.isDatabaseStoreStrategy());
fileManager.deleteImage(imagePath);
Events.instance().raiseEvent("imageDeleted");
@@ -87,6 +88,9 @@
if (null == user.getLogin()) {
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception("For vote on this picture you must login"));
return;
+ }if(message.trim().equals("")){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception("Comment must be not-null"));
+ return;
}
Comment comment = new Comment();
comment.setAuthor(user);
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java 2009-03-25
17:40:09 UTC (rev 13194)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java 2009-03-25
17:40:23 UTC (rev 13195)
@@ -117,6 +117,7 @@
image.setDescription(SAMPLE_DESCRIPTION);
image.setName(SAMPLE_NAME);
image.setSize(item.getFileSize());
+ image.setAllowComments(true);
return image;
}
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumInfo.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/help/tree_build_descr.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageInfo.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/slideshow.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/images.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/index/tree.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/misc/errorPanel.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelfUnvisited.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userSharedAlbums.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userSharedImages.xhtml
===================================================================
(Binary files differ)