Author: alevkovsky
Date: 2009-03-06 06:51:05 -0500 (Fri, 06 Mar 2009)
New Revision: 12855
Added:
trunk/test-applications/realworld2/web/src/main/webapp/img/shell/button.png
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/userAlbumsPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImageEditBlock.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImageMainBlock.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImagePreviewBlock.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImagesPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userShelfPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userImageEdit.xhtml
Removed:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userAlbumsPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userImagesPreview.xhtml
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/navigation/NavigationEnum.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/userAlbum.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userAlbums.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userImage.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userImages.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userShelf.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userShelfs.xhtml
Log:
Realworld: refactor includes, add image edit markup
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-06
11:17:41 UTC (rev 12854)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-03-06
11:51:05 UTC (rev 12855)
@@ -71,7 +71,7 @@
public void editImage(Image image){
imageAction.editImage(image);
Events.instance().raiseEvent("imageEdited");
- setOncomplete();
+ Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.ALBUM_IMAGE_PREVIEW);
}
@Observer(Constants.ADD_IMAGE_EVENT)
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java 2009-03-06
11:17:41 UTC (rev 12854)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java 2009-03-06
11:51:05 UTC (rev 12855)
@@ -32,8 +32,10 @@
ALL_SHELFS("/includes/userShelfs.xhtml"),
TAGS("includes/tag.xhtml"),
ALL_ALBUMS("/includes/userAlbums.xhtml"),
- ALL_IMAGES("/includes/userImages.xhtml");
+ ALL_IMAGES("/includes/userImages.xhtml"),
+ ALBUM_IMAGE_EDIT("/includes/userImageEdit.xhtml");
+
private NavigationEnum(String t){
template=t;
}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-03-06
11:17:41 UTC (rev 12854)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-03-06
11:51:05 UTC (rev 12855)
@@ -32,7 +32,6 @@
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Synchronized;
-import org.jboss.seam.core.Conversation;
import org.jboss.seam.core.Events;
import org.richfaces.component.UIDatascroller;
import org.richfaces.component.UITree;
@@ -247,6 +246,22 @@
setSelectedImageIndex(index+1);
setSelectedUser(image.getAlbum().getOwner());
}
+
+ public void editImage(Image image){
+ if(!image.getAlbum().isShared() && !image.getAlbum().getOwner().equals(user)){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception(HAVENT_ACCESS));
+ return;
+ }
+ Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.ALBUM_IMAGE_EDIT);
+ }
+
+ public void cancelEditImage(Image image){
+ if(!image.getAlbum().isShared() && !image.getAlbum().getOwner().equals(user)){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception(HAVENT_ACCESS));
+ return;
+ }
+ Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.ALBUM_IMAGE_PREVIEW);
+ }
public void selectMyAlbums(){
setSelectedAlbum(null);
@@ -377,4 +392,5 @@
public void setSelectedTag(MetaTag selectedTag) {
this.selectedTag = selectedTag;
}
+
}
Added: trunk/test-applications/realworld2/web/src/main/webapp/img/shell/button.png
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/realworld2/web/src/main/webapp/img/shell/button.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Copied:
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/userAlbumsPreview.xhtml
(from rev 12852,
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userAlbumsPreview.xhtml)
===================================================================
(Binary files differ)
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImageEditBlock.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImageEditBlock.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImageMainBlock.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImageMainBlock.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImagePreviewBlock.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImagePreviewBlock.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Copied:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/userImagesPreview.xhtml
(from rev 12852,
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userImagesPreview.xhtml)
===================================================================
(Binary files differ)
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfPreview.xhtml
===================================================================
(Binary files differ)
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userAlbumsPreview.xhtml
===================================================================
(Binary files differ)
Deleted:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userImagesPreview.xhtml
===================================================================
(Binary files differ)
Copied:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/userShelfPreview.xhtml
(from rev 12852,
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfPreview.xhtml)
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userAlbum.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userAlbums.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userImage.xhtml
===================================================================
(Binary files differ)
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userImageEdit.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userImageEdit.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userImages.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userShelf.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userShelfs.xhtml
===================================================================
(Binary files differ)
Show replies by date