Author: andrei_exadel
Date: 2009-01-29 06:54:16 -0500 (Thu, 29 Jan 2009)
New Revision: 12479
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/linkPanel.xhtml
Log:
Add modal panel validation for add album popup.
Enable default context menu for links management popup.
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-01-29
08:27:36 UTC (rev 12478)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-01-29
11:54:16 UTC (rev 12479)
@@ -86,7 +86,7 @@
conversationState.setSelectedAlbum(albumItem.getAlbum());
}
imageAction.editImage(image, parentChanged);
- oncomplete = "$('imageModalPanel').component.hide()";
+ setOncomplete();
}
@Observer(Constants.ADD_IMAGE_EVENT)
@@ -95,6 +95,7 @@
TreeAlbumItem albumItem =
(TreeAlbumItem)treeMyAlbumsItem.getNode(image.getAlbumName());
conversationState.setSelectedAlbum(albumItem.getAlbum());
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.IMAGE_PREVIEW);
+ //setOncomplete();
}
public void editComment(Comment comment) {
@@ -124,6 +125,10 @@
imageAction.vote(image,
Long.valueOf(ratingBinder.getInputSlider().getValue().toString()));
}
+ private void setOncomplete() {
+ oncomplete = "$('imageModalPanel').component.hide()";
+ }
+
private boolean parentChanged(Image image, TreeAlbumItem parent) {
return !parent.getAlbum().getName().equals(image.getAlbumName());
}
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java
===================================================================
---
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java 2009-01-29
08:27:36 UTC (rev 12478)
+++
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java 2009-01-29
11:54:16 UTC (rev 12479)
@@ -87,11 +87,6 @@
private void setOncomplete() {
oncomplete = "$('albumModalPanel').component.hide()";
-// FacesContext context = FacesContext.getCurrentInstance();
-// AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
-// if (ajaxContext.isAjaxRequest()) {
-// ajaxContext.setOncomplete(new
JSLiteral("$('albumModalPanel').component.hide()"));
-// }
}
public String getCaption() {
@@ -113,6 +108,7 @@
public void addAlbum(ActionEvent event){
this.album.setParent(parent);
albumManager.addAlbum();
+ setOncomplete();
}
public Album getParent() {
Modified:
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/linkPanel.xhtml
===================================================================
(Binary files differ)
Show replies by date