You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by wo...@apache.org on 2009/11/25 11:18:30 UTC

svn commit: r884017 - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/ applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/ applications/jetspeed/src/main/webapp/decorations/portlet/ components/jetspeed-portal/src...

Author: woonsan
Date: Wed Nov 25 10:17:40 2009
New Revision: 884017

URL: http://svn.apache.org/viewvc?rev=884017&view=rev
Log:
JS2-1086: Reverting the changes in the portlet decorator templates which filter out 'preview' decoration action. Instead, the filtering is done in the CustomDecoratorActionsFactory.

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetspeed_macros.vm
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui-portlet.jsp
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorations_portlet_init.jsp
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/CustomDecoratorActionsFactory.java

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetspeed_macros.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetspeed_macros.vm?rev=884017&r1=884016&r2=884017&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetspeed_macros.vm (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetspeed_macros.vm Wed Nov 25 10:17:40 2009
@@ -152,13 +152,11 @@
 #macro(PortletActionBar $_decoration)
  #set($_actions = $_decoration.actions)
   
-  <div class="PActionBar">
+ <div class="PActionBar">
     #foreach ($_action in $_actions)
-      #if (${_action.ActionName} != "preview")
-        <a href="${_action.Action}" title="${_action.Name}" class="action portlet-action" #if($_action.target)target="$_action.target"#end><img src="$request.contextPath/${_action.link}" alt="${_action.Alt}" border="0" /></a>
-      #end
+     <a href="${_action.Action}" title="${_action.Name}" class="action portlet-action" #if($_action.target)target="$_action.target"#end><img src="$request.contextPath/${_action.link}" alt="${_action.Alt}" border="0" /></a>
     #end    
-  </div>
+ </div>
 #end
 
 

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui-portlet.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui-portlet.jsp?rev=884017&r1=884016&r2=884017&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui-portlet.jsp (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui-portlet.jsp Wed Nov 25 10:17:40 2009
@@ -30,46 +30,43 @@
 <%@ page import="org.apache.jetspeed.decoration.DecoratorAction" %>
 <%@ page import="org.apache.jetspeed.PortalReservedParameters" %>
 <%
-	String content = (String)request.getAttribute("content");
-	String decorator = (String)request.getAttribute("decorator");
-	ContentFragment fragment = (ContentFragment)request.getAttribute("fragment");
-	LayoutCoordinate coordinate = (LayoutCoordinate)request.getAttribute("coordinate");
-	String title = "";
-	boolean showTitle = fragment.getDecoration().getTitleOption() == Decoration.TitleOption.SHOW; 	
-	if (showTitle && fragment.getPortletContent() != null)
-	    title = fragment.getPortletContent().getTitle();
+    String content = (String)request.getAttribute("content");
+    String decorator = (String)request.getAttribute("decorator");
+    ContentFragment fragment = (ContentFragment)request.getAttribute("fragment");
+    LayoutCoordinate coordinate = (LayoutCoordinate)request.getAttribute("coordinate");
+    String title = "";
+    boolean showTitle = fragment.getDecoration().getTitleOption() == Decoration.TitleOption.SHOW;   
+    if (showTitle && fragment.getPortletContent() != null)
+        title = fragment.getPortletContent().getTitle();
 %>
-	<div class="portal-layout-cell" id="<%=fragment.getId()%>" name="<%=fragment.getName()%>" column="<%=coordinate.getX()%>" row="<%=coordinate.getY()%>">
-		<div class="portlet <%=decorator%>">
-		    <div class="PTitle" >
-	          <div class="PTitleContent"><%=title%></div>
-		  	    <div class="PActionBar">
+    <div class="portal-layout-cell" id="<%=fragment.getId()%>" name="<%=fragment.getName()%>" column="<%=coordinate.getX()%>" row="<%=coordinate.getY()%>">
+        <div class="portlet <%=decorator%>">
+            <div class="PTitle" >
+              <div class="PTitleContent"><%=title%></div>
+                <div class="PActionBar">
 <%
-					Decoration.ActionsOption option = fragment.getDecoration().getActionsOption(); 	
-					if (option != Decoration.ActionsOption.HIDE) // TODO: HOVER, DROP DOWN not yet implemented
-					{
-						for(DecoratorAction action : (List<DecoratorAction>)fragment.getDecoration().getActions())
-					    {			        
-                            if ("preview".equals(action.getActionName()))
-                                continue;
-                            
-					        String target = "target='"+ action.getTarget() + "'";
-					        if (action.getTarget() == null)
-					            target = "";
- %>			    
-			     <a href="<%=action.getAction()%>" title="<%=action.getName()%>" class="action portlet-action" <%=target%>><img src="<%=request.getContextPath()%>/<%=action.getLink()%>" alt="<%=action.getAlt()%>" border="0" /></a>
-<%                  } // for loop				
+                    Decoration.ActionsOption option = fragment.getDecoration().getActionsOption();  
+                    if (option != Decoration.ActionsOption.HIDE) // TODO: HOVER, DROP DOWN not yet implemented
+                    {
+                        for(DecoratorAction action : (List<DecoratorAction>)fragment.getDecoration().getActions())
+                        {                   
+                            String target = "target='"+ action.getTarget() + "'";
+                            if (action.getTarget() == null)
+                                target = "";
+ %>             
+                 <a href="<%=action.getAction()%>" title="<%=action.getName()%>" class="action portlet-action" <%=target%>><img src="<%=request.getContextPath()%>/<%=action.getLink()%>" alt="<%=action.getAlt()%>" border="0" /></a>
+<%                  } // for loop               
 // FIXME: integrate close into standard actions, use security constraints on close action
 if (request.getUserPrincipal() != null && fragment.getDecoration().getActions().size() > 0)
 {
 %>
-				 <span style='cursor: pointer; z-index: 1000;' id='jetspeed-close-<%=fragment.getId()%>' title="close" class="portlet-action-close"><img src="<%=request.getContextPath()%>/decorations/portlet/jetspeed/images/close.gif" alt="Close" border="0" /></span>				 
+                 <span style='cursor: pointer; z-index: 1000;' id='jetspeed-close-<%=fragment.getId()%>' title="close" class="portlet-action-close"><img src="<%=request.getContextPath()%>/decorations/portlet/jetspeed/images/close.gif" alt="Close" border="0" /></span>              
 <% }  } %>
-			    </div>
-		      </div>
-		       <div class="PContentBorder">
-		         <div class="PContent"><%=content%></div>
-		       </div>
-		    </div>
+                </div>
+              </div>
+               <div class="PContentBorder">
+                 <div class="PContent"><%=content%></div>
+               </div>
+            </div>
           </div>
      

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorations_portlet_init.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorations_portlet_init.jsp?rev=884017&r1=884016&r2=884017&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorations_portlet_init.jsp (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/decorations/portlet/decorations_portlet_init.jsp Wed Nov 25 10:17:40 2009
@@ -26,9 +26,9 @@
 <portlet:defineObjects/>
 
 <%
-	/**
-	 * @author <a href="mailto:kmoh.raj@gmail.com">Mohan Kannapareddy</a>
-	 */
+    /**
+     * @author <a href="mailto:kmoh.raj@gmail.com">Mohan Kannapareddy</a>
+     */
 
   int DEFAULT_SCOPE = PageContext.PAGE_SCOPE;
 
@@ -54,14 +54,12 @@
   
                         <div class="PActionBar"> <!-- B: div portal-page-actions --> 
                           <c:forEach var="_action" items="${actions}">
-                            <c:if test="${_action.actionName != 'preview'}">
-                              <a href="<c:out value='${_action.action}'/>" 
-                                title="<c:out value='${_action.name}'/>" 
-                                class="action portlet-action"
-                                <c:if test="${_action.target}"> target="<c:out value='${_action.target}'/>"</c:if>>
-                                <img src="<c:out value='${requestScope.cPath}/${_action.link}'/>" alt="<c:out value='${_action.alt}'/>" border="0" />
-                              </a>
-                            </c:if>
+                            <a href="<c:out value='${_action.action}'/>" 
+                               title="<c:out value='${_action.name}'/>" 
+                               class="action portlet-action"
+                               <c:if test="${_action.target}"> target="<c:out value='${_action.target}'/>"</c:if>>
+                              <img src="<c:out value='${requestScope.cPath}/${_action.link}'/>" alt="<c:out value='${_action.alt}'/>" border="0" />
+                            </a>
                           </c:forEach>
                         </div> <!-- E: div portal-page-actions --> 
   

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/CustomDecoratorActionsFactory.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/CustomDecoratorActionsFactory.java?rev=884017&r1=884016&r2=884017&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/CustomDecoratorActionsFactory.java (original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/CustomDecoratorActionsFactory.java Wed Nov 25 10:17:40 2009
@@ -48,7 +48,6 @@
         list.add(JetspeedActions.ABOUT_MODE);
         list.add(JetspeedActions.CONFIG_MODE);
         list.add(JetspeedActions.EDIT_DEFAULTS_MODE);
-        list.add(JetspeedActions.PREVIEW_MODE);
         list.add(JetspeedActions.PRINT_MODE);
         list.addAll(JetspeedActions.getStandardWindowStates());
         list.add(JetspeedActions.SOLO_STATE);



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org