Author: alevkovsky
Date: 2009-02-27 06:20:24 -0500 (Fri, 27 Feb 2009)
New Revision: 12767
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfImagesPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfsPreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userAlbum.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userShelfs.xhtml
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.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/resources/messages_en.properties
trunk/test-applications/realworld2/web/src/main/resources/messages_ru.properties
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imagePreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/mainImage.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/slideshow.xhtml
Log:
Realworld: add user shelfs and user album markups
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-02-27
10:27:25 UTC (rev 12766)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-02-27
11:20:24 UTC (rev 12767)
@@ -119,7 +119,7 @@
conversationState.setSelectedAlbum(null);
conversationState.setSelectedImage(null);
conversationState.setSelectedShelf(null);
- Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,NavigationEnum.IMAGE_PREVIEW);
+ Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.ALL_SHELFS);
return true;
}
} catch (Exception nre) {
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-02-27
10:27:25 UTC (rev 12766)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/navigation/NavigationEnum.java 2009-02-27
11:20:24 UTC (rev 12767)
@@ -27,8 +27,8 @@
SEARCH("includes/search.xhtml"),
WHAT_NEW("includes/recent.xhtml"),
ALBUM_PREVIEW("includes/albumPreview.xhtml"),
- SHELF_PREVIEW("includes/shelfPreview.xhtml"),
- ALL_SHELFS("includes/shelfs.xhtml"),
+ SHELF_PREVIEW("/includes/userAlbum.xhtml"),
+ ALL_SHELFS("/includes/userShelfs.xhtml"),
TAGS("includes/tags.xhtml"),
ALL_ALBUMS("includes/albums.xhtml"),
ALL_IMAGES("includes/images.xhtml");
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-02-27
10:27:25 UTC (rev 12766)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-02-27
11:20:24 UTC (rev 12767)
@@ -120,9 +120,14 @@
Integer index = getSelectedAlbum().getIndex(getSelectedImage());
System.out.println("Slideshow execute");
if(index == -1){
- Events.instance().raiseEvent("stopSlideshow");
- System.out.println("Slideshow stop");
- return;
+ if(getSelectedAlbum().getImages() != null &&
getSelectedAlbum().getImages().size() > 1){
+ System.out.println("Slideshow index will be index of first image");
+ index = getSelectedAlbum().getIndex(getSelectedAlbum().getImages().get(1));
+ }else{
+ Events.instance().raiseEvent("stopSlideshow");
+ System.out.println("Slideshow stop");
+ return;
+ }
}
UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
UIDatascroller scroller =
(UIDatascroller)component.findComponent(Constants.DATASCROLLER2_ID);
@@ -208,6 +213,18 @@
setSelectedShelf(album.getParent());
setSelectedUser(album.getOwner());
}
+
+ public void showAlbumFromShelf(Album album){
+ if(!album.isShared() && !album.getOwner().equals(user)){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception(HAVENT_ACCESS));
+ return;
+ }
+ Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.SHELF_PREVIEW);
+ setSelectedAlbum(album);
+ setSelectedImage(null);
+ setSelectedShelf(album.getParent());
+ setSelectedUser(album.getOwner());
+ }
public void selectMyAlbums(){
setSelectedAlbum(null);
Modified:
trunk/test-applications/realworld2/web/src/main/resources/messages_en.properties
===================================================================
---
trunk/test-applications/realworld2/web/src/main/resources/messages_en.properties 2009-02-27
10:27:25 UTC (rev 12766)
+++
trunk/test-applications/realworld2/web/src/main/resources/messages_en.properties 2009-02-27
11:20:24 UTC (rev 12767)
@@ -322,4 +322,6 @@
show_history=Show message history
author=Author
linkManagement=Link management
-close=Close
\ No newline at end of file
+close=Close
+myAlbumShelfs=My album shelfs
+newPhotos=New photos
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/resources/messages_ru.properties
===================================================================
---
trunk/test-applications/realworld2/web/src/main/resources/messages_ru.properties 2009-02-27
10:27:25 UTC (rev 12766)
+++
trunk/test-applications/realworld2/web/src/main/resources/messages_ru.properties 2009-02-27
11:20:24 UTC (rev 12767)
@@ -263,4 +263,6 @@
show_history=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C
\u0438\u0441\u0442\u043E\u0440\u0438\u044E
\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439
author=\u0410\u0432\u0442\u043E\u0440
linkManagement=\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435
\u0441\u0441\u044B\u043B\u043A\u0430\u043C\u0438
-close=\u0417\u0430\u043A\u0440\u044B\u0442\u044C
\ No newline at end of file
+close=\u0417\u0430\u043A\u0440\u044B\u0442\u044C
+myAlbumShelfs=\u041C\u043E\u0438 \u043A\u043E\u043B\u043B\u0435\u043A\u0446\u0438\u0438
\u0430\u043B\u044C\u0431\u043E\u043C\u043E\u0432
+newPhotos=\u041D\u043E\u0432\u044B\u0435
\u0444\u043E\u0442\u043E\u0433\u0440\u0430\u0444\u0438\u0438
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imagePreview.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/mainImage.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/slideshow.xhtml
===================================================================
(Binary files differ)
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfImagesPreview.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfImagesPreview.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfsPreview.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfsPreview.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld2/web/src/main/webapp/includes/userAlbum.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userAlbum.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld2/web/src/main/webapp/includes/userShelfs.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userShelfs.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Show replies by date