Author: thomas.heute(a)jboss.com
Date: 2007-03-16 06:43:24 -0400 (Fri, 16 Mar 2007)
New Revision: 6708
Added:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/confirm.xhtml
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
Log:
Added a confirmation step on delete
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-03-16
02:27:26 UTC (rev 6707)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/faces-config.xml 2007-03-16
10:43:24 UTC (rev 6708)
@@ -333,6 +333,10 @@
<from-outcome>dashboard</from-outcome>
<to-view-id>/WEB-INF/jsf/dashboard/dashboard.xhtml</to-view-id>
</navigation-case>
+ <navigation-case>
+ <from-outcome>confirm</from-outcome>
+ <to-view-id>/WEB-INF/jsf/common/confirm.xhtml</to-view-id>
+ </navigation-case>
</navigation-rule>
<lifecycle>
Added: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/confirm.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/confirm.xhtml
(rev 0)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/common/confirm.xhtml 2007-03-16
10:43:24 UTC (rev 6708)
@@ -0,0 +1,47 @@
+<div
+
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:jbp="http://www.jboss.org/portal"
+
xmlns:c="http://java.sun.com/jstl/core"
+ class="admin-ui">
+
+ <p class="portlet-class">WARNING ! You are about to delete the
following element of the portal:</p>
+ <ul class="objectpath">
+ <c:forEach items="#{portalobjectmgr.selectedObjectPath}"
var="node">
+ <li>
+ >
+ </li>
+ <c:choose>
+ <c:when test="#{node.id ==
portalobjectmgr.selectedObject.id}">
+ <li class="selected">
+ <c:if test="#{node.name ==
''}">root</c:if>
+ <c:if test="#{node.name !=
''}">#{node.name}</c:if>
+ </li>
+ </c:when>
+ <c:otherwise>
+ <li>
+ <c:if test="#{node.name ==
''}">root</c:if>
+ <c:if test="#{node.name !=
''}">#{node.name}</c:if>
+ </li>
+ </c:otherwise>
+ </c:choose>
+ </c:forEach>
+ </ul>
+
+ <p class="portlet-class">Are you sure ?</p>
+
+ <h:form>
+ <h:commandLink action="objects"
actionListener="#{portalobjectmgr.destroyObject}">
+ <h:outputText value="Yes"/>
+ <f:param name="id"
value="#{portalobjectmgr.selectedObject.id}"/>
+ </h:commandLink>
+ <h:outputText value=" | "/>
+ <h:commandLink action="objects"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="No"/>
+ <f:param name="id"
value="#{portalobjectmgr.selectedObject.parent.id}"/>
+ </h:commandLink>
+
+ </h:form>
+</div>
\ No newline at end of file
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-03-16
02:27:26 UTC (rev 6707)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/objectNavigation.xhtml 2007-03-16
10:43:24 UTC (rev 6708)
@@ -34,10 +34,10 @@
actionListener="#{portalobjectmgr.selectObject}">
<h:outputText value="Theme"/>
<f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="objects"
actionListener="#{portalobjectmgr.destroyObject}">
- <h:outputText value="Destroy"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
+ </h:commandLink> | <h:commandLink action="confirm"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Destroy"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
</td>
</tr>
</c:forEach>
@@ -71,7 +71,7 @@
</h:commandLink> | <h:commandLink action="editPageTheme"
actionListener="#{portalobjectmgr.selectObject}">
<h:outputText value="Theme"/>
<f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="objects"
actionListener="#{portalobjectmgr.destroyObject}">
+ </h:commandLink> | <h:commandLink action="confirm"
actionListener="#{portalobjectmgr.selectObject}">
<h:outputText value="Destroy"/>
<f:param name="id" value="#{object.id}"/>
</h:commandLink>
@@ -101,10 +101,10 @@
<h:commandLink action="editWindowTheme"
actionListener="#{portalobjectmgr.selectObject}">
<h:outputText value="Theme"/>
<f:param name="id" value="#{object.id}"/>
- </h:commandLink> | <h:commandLink action="portals"
actionListener="#{portalobjectmgr.destroyObject}">
- <h:outputText value="Destroy"/>
- <f:param name="id" value="#{object.id}"/>
- </h:commandLink>
+ </h:commandLink> | <h:commandLink action="confirm"
actionListener="#{portalobjectmgr.selectObject}">
+ <h:outputText value="Destroy"/>
+ <f:param name="id" value="#{object.id}"/>
+ </h:commandLink>
</td>
</tr>
</c:forEach>