portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r834770 - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/
Date Wed, 11 Nov 2009 04:56:44 GMT
Author: taylor
Date: Wed Nov 11 04:56:43 2009
New Revision: 834770

URL: http://svn.apache.org/viewvc?rev=834770&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-1080
Breadcrumbs for Jet UI
jetui.jsp, jetui-portlet.jsp

https://issues.apache.org/jira/browse/JS2-1081
A Page without portlets breaks CSS in Jet UI
PageTheme.java
jetui.jsp, jetui-portlet.jsp

Modified:
    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/WEB-INF/jetui/yui/jetui.jsp
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/PageTheme.java

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=834770&r1=834769&r2=834770&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 11 04:56:43 2009
@@ -30,7 +30,7 @@
 <%@ page import="org.apache.jetspeed.PortalReservedParameters" %>
 <%
 	String content = (String)request.getAttribute("content");
-	String pageDec = (String)request.getAttribute("pageDec");
+	String decorator = (String)request.getAttribute("decorator");
 	ContentFragment fragment = (ContentFragment)request.getAttribute("fragment");
 	LayoutCoordinate coordinate = (LayoutCoordinate)request.getAttribute("coordinate");
 	String title = "";
@@ -38,7 +38,7 @@
 	    title = fragment.getPortletContent().getTitle();
 %>
 	<div class="portal-layout-cell" id="<%=fragment.getId()%>" name="<%=fragment.getName()%>"
column="<%=coordinate.getX()%>" row="<%=coordinate.getY()%>">
-		<div class="portlet <%=pageDec%>">
+		<div class="portlet <%=decorator%>">
 		    <div class="PTitle" >
 	          <div class="PTitleContent"><%=title%></div>               
 		  	    <div class="PActionBar">

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp?rev=834770&r1=834769&r2=834770&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
Wed Nov 11 04:56:43 2009
@@ -37,13 +37,14 @@
   String navContent = jetui.renderPortletWindow("_PageNavigator", "j2-admin::PageNavigator",
rc);
   String spacesNavContent = jetui.renderPortletWindow("_SpaceNavigator", "j2-admin::SpaceNavigator",
rc);
   String tbContent = jetui.renderPortletWindow("_JetspeedToolbox", "j2-admin::JetspeedToolbox",
rc);
+  String breadcrumbs = jetui.renderPortletWindow("_BreadcrumbMenu", "j2-admin::BreadcrumbMenu",
rc);
   String encoding = "text/html"; 
   if (response.getCharacterEncoding() != null)
   {
       encoding += "; charset=" + response.getCharacterEncoding();
   }
   String baseUrl = jetui.getBaseURL(rc);
-  String pageDec = jetui.getTheme(rc).getPageLayoutDecoration().getName();
+  String pageDec = jetui.getTheme(rc).getPageLayoutDecoration().getName();  
 %>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html>
@@ -100,6 +101,7 @@
 </div>
 </td>
 <td id='jsMainarea' class='jsMainarea'>
+<div class="PContent"><span style="line-height:0.005px;">&nbsp;</span><%=breadcrumbs%></div>
 <div id="jsFragments" class="portal-nested-layout portal-nested-layout-TwoColumns">
 <%
     ContentFragment maximized = (ContentFragment)request.getAttribute(PortalReservedParameters.MAXIMIZED_FRAGMENT_ATTRIBUTE);
@@ -107,9 +109,12 @@
     {
         String content = jetui.getRenderedContent(maximized, rc);
         request.setAttribute("content", content);
-        request.setAttribute("pageDec", pageDec);
+        String decorator = maximized.getDecorator();
+		if (decorator == null)
+		    decorator = pageDec;
+        request.setAttribute("decorator", decorator);
         request.setAttribute("fragment", maximized);
-		request.setAttribute("coordinate", columnLayout.getCoordinate(maximized));		
+		request.setAttribute("coordinate", columnLayout.getCoordinate(maximized));
 %>
 <div id="column_id_0>" 
      class="portal-layout-column" 
@@ -139,8 +144,11 @@
                 {
                     //String content = jetui.renderPortletWindow(fragment.getId(), fragment.getName(),
rc);
                     String content = jetui.getRenderedContent((ContentFragment)fragment,
rc);
-                    request.setAttribute("content", content);
-                    request.setAttribute("pageDec", pageDec);
+                    request.setAttribute("content", content);                    
+                    String decorator = fragment.getDecorator(); 
+            		if (decorator == null)
+            		    decorator = pageDec;
+                    request.setAttribute("decorator", decorator);                    
                     request.setAttribute("fragment", fragment);      
                     request.setAttribute("coordinate", columnLayout.getCoordinate(fragment));
 %>

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/PageTheme.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/PageTheme.java?rev=834770&r1=834769&r2=834770&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/PageTheme.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/decoration/PageTheme.java
Wed Nov 11 04:56:43 2009
@@ -73,6 +73,13 @@
                 }
             }
         }
+        if (!portletDecorationNames.containsKey(this.layoutDecoration.getName()))
+        {
+            portletDecorationNames.put(this.layoutDecoration.getName(), this.layoutDecoration.getName());
+            Decoration decoration = decorationFactory.getPortletDecoration(this.layoutDecoration.getName(),
requestContext);
+            this.styleSheets.add(decoration.getStyleSheet());
+            this.styleSheets.add(decoration.getStyleSheetPortal());            
+        }
         this.portletDecorationNames = Collections.unmodifiableCollection( new ArrayList(
portletDecorationNames.keySet() ) );
     }
 



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


Mime
View raw message