[portal-commits] JBoss Portal SVN: r13023 - in branches/JBoss_Portal_Branch_2_7: core/src/bin/portal-core-war/themes/renewal and 7 other directories.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Fri Mar 13 06:23:22 EDT 2009


Author: chris.laprun at jboss.com
Date: 2009-03-13 06:23:21 -0400 (Fri, 13 Mar 2009)
New Revision: 13023

Modified:
   branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
   branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css
   branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java
   branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
   branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
   branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
   branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
   branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java
   branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
   branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css
   branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
Log:
- Updated from 2.7.2
- Slightly modified styles (green instead of red for DnD zones, re-added bigger tab menu with less padding)
- Minor improvements.

Modified: branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/build/build-thirdparty.xml	2009-03-13 10:23:21 UTC (rev 13023)
@@ -67,7 +67,7 @@
       <componentref name="jboss-portal/modules/common" version="1.2.4"/>
       <componentref name="jboss-portal/modules/web" version="1.2.3"/>
       <componentref name="jboss-portal/modules/test" version="1.0.4"/>
-      <componentref name="jboss-portal/modules/portlet" version="2.0.6"/>
+      <componentref name="jboss-portal/modules/portlet" version="2.0.5"/>
       <componentref name="jboss-portal/modules/identity" version="1.0.8"/>
       <componentref name="jboss-portal/modules/cms" version="1.2.4"/>
       <componentref name="antlr" version="2.7.6-brew"/>

Modified: branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/bin/portal-core-war/themes/renewal/portal_style.css	2009-03-13 10:23:21 UTC (rev 13023)
@@ -237,7 +237,7 @@
    bottom: 0px;
    left: 0;
    min-width: 550px;
-   z-index: 10;
+   z-index: 1;
 }
 
 * html ul#tabsHeader {
@@ -321,7 +321,6 @@
    margin: 0px;
    padding: 0px;
    margin-top: 28px;
-   z-index: 10;
 }
 
 ul#tabsHeader ul a {
@@ -481,10 +480,8 @@
 /* wrapper for floating portlet window modes */
 .portlet-mode-container {
    white-space: nowrap;
-   float: right;
-   padding: 2px 0 0 0;
-   /*position: relative;*/
-   /*z-index: 1;*/
+   float: right; /*position: relative;*/
+/*z-index: 1;*/
 }
 
 .mode-button {

Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxCommandFactory.java	2009-03-13 10:23:21 UTC (rev 13023)
@@ -1,6 +1,6 @@
 /******************************************************************************
  * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual                    *
  * contributors as indicated by the @authors tag. See the                     *
  * copyright.txt in the distribution for a full listing of                    *
  * individual contributors.                                                   *
@@ -53,7 +53,7 @@
          int toPosInt = Integer.parseInt(toPos);
 
          //
-         PortalObjectId tmp = PortalObjectId.parse(windowId, PortalObjectPath.LEGACY_BASE64_FORMAT);
+         PortalObjectId tmp = PortalObjectId.parse(windowId, PortalObjectPath.SAFEST_FORMAT);
 
          //
          return new MoveWindowCommand(tmp, fromPosInt, fromRegion, toPosInt, toRegion);

Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java	2009-03-13 10:23:21 UTC (rev 13023)
@@ -121,7 +121,7 @@
 
    public HandlerResponse processCommandResponse(
       ControllerContext controllerContext,
-      ControllerCommand commeand,
+      ControllerCommand command,
       ControllerResponse controllerResponse) throws ResponseHandlerException
    {
       if (controllerResponse instanceof PortletWindowActionResponse)

Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java	2009-03-13 10:23:21 UTC (rev 13023)
@@ -20,6 +20,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
  ******************************************************************************/
+
 package org.jboss.portal.core.model.portal;
 
 import org.jboss.portal.common.util.Base64;
@@ -567,4 +568,36 @@
          }
       }
    };
+
+   /** Should only use a-z0-9_ */
+   public static final Format SAFEST_FORMAT = new PortalObjectPath.LegacyFormat()
+   {
+
+      private final String EQUALS = "_e";
+      private final String SLASH = "_s";
+      private final String DOT = "_d";
+      private final String PLUS = "_p";
+
+      @Override
+      public String[] parse(String value)
+      {
+         String uncoded = value.replace(EQUALS, "=");
+         uncoded = uncoded.replace(SLASH, "/");
+         uncoded = uncoded.replace(DOT, ".");
+         uncoded = uncoded.replace(PLUS, "+");
+         return LEGACY_BASE64_FORMAT.parse(uncoded);
+      }
+
+      @Override
+      public String toString(String[] names, int from, int to)
+      {
+         String encoded = LEGACY_BASE64_FORMAT.toString(names, from, to);
+         encoded = encoded.replace("=", EQUALS);
+         encoded = encoded.replace("/", SLASH);
+         encoded = encoded.replace(".", DOT);
+         encoded = encoded.replace("+", PLUS);
+         return encoded;
+      }
+   };
+
 }

Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java	2009-03-13 10:23:21 UTC (rev 13023)
@@ -20,6 +20,7 @@
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
  ******************************************************************************/
+
 package org.jboss.portal.core.model.portal;
 
 import org.jboss.portal.common.NotYetImplemented;
@@ -55,7 +56,7 @@
 public class PortalObjectResponseHandler extends AbstractResponseHandler
 {
 
-   public HandlerResponse processCommandResponse(ControllerContext controllerContext, ControllerCommand ceommand, ControllerResponse controllerResponse) throws ResponseHandlerException
+   public HandlerResponse processCommandResponse(ControllerContext controllerContext, ControllerCommand command, ControllerResponse controllerResponse) throws ResponseHandlerException
    {
       if (controllerResponse instanceof UpdateWindowResponse)
       {

Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/command/action/InvokePortletWindowActionCommand.java	2009-03-13 10:23:21 UTC (rev 13023)
@@ -1,6 +1,6 @@
 /******************************************************************************
  * JBoss, a division of Red Hat                                               *
- * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual                    *
  * contributors as indicated by the @authors tag. See the                     *
  * copyright.txt in the distribution for a full listing of                    *
  * individual contributors.                                                   *
@@ -38,21 +38,19 @@
 import org.jboss.portal.core.model.instance.Instance;
 import org.jboss.portal.core.model.portal.PortalObjectId;
 import org.jboss.portal.core.model.portal.Window;
-import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
 import org.jboss.portal.core.model.portal.navstate.PageNavigationalState;
 import org.jboss.portal.core.navstate.NavigationalStateContext;
 import org.jboss.portal.identity.User;
 import org.jboss.portal.portlet.PortletInvokerException;
 import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.info.PortletInfo;
 import org.jboss.portal.portlet.controller.PortletController;
-import org.jboss.portal.portlet.controller.request.PortletActionRequest;
 import org.jboss.portal.portlet.controller.request.ContainerRequest;
+import org.jboss.portal.portlet.controller.request.PortletActionRequest;
 import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
 import org.jboss.portal.portlet.controller.response.PortletResponse;
-import org.jboss.portal.portlet.controller.response.ResourceResponse;
 import org.jboss.portal.portlet.controller.state.PortletPageNavigationalState;
 import org.jboss.portal.portlet.controller.state.PortletWindowNavigationalState;
+import org.jboss.portal.portlet.info.PortletInfo;
 
 /**
  * @author <a href="mailto:julien at jboss.org">Julien Viet</a>
@@ -154,7 +152,7 @@
          pageNS
       );
    }
-   
+
    public ControllerResponse execute() throws ControllerException
    {
       try
@@ -186,18 +184,18 @@
 
          if (cr instanceof PageUpdateResponse)
          {
-        	 //
-        	 PageUpdateResponse pageUpdate = (PageUpdateResponse)cr;
+            //
+            PageUpdateResponse pageUpdate = (PageUpdateResponse)cr;
 
-        	 //
-        	 ControllerPageNavigationalState pageNavigationalState = (ControllerPageNavigationalState)pageUpdate.getPageNavigationalState();
+            //
+            ControllerPageNavigationalState pageNavigationalState = (ControllerPageNavigationalState)pageUpdate.getPageNavigationalState();
 
-        	 // Flush all NS
-        	 pageNavigationalState.flushUpdates();
+            // Flush all NS
+            pageNavigationalState.flushUpdates();
          }
          // Populate the parameters
          NavigationalStateContext ctx = (NavigationalStateContext)cpcc.getControllerContext().getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
-         
+
          PageNavigationalState pns = ctx.getPageNavigationalState(page.getId().toString());
 
          //

Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java	2009-03-13 10:23:21 UTC (rev 13023)
@@ -25,11 +25,11 @@
 import org.jboss.portal.Mode;
 import org.jboss.portal.WindowState;
 import org.jboss.portal.core.controller.ControllerContext;
+import org.jboss.portal.core.model.portal.PortalObjectPath;
 import org.jboss.portal.core.model.portal.Window;
 import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
 import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
 import org.jboss.portal.core.model.portal.content.WindowRendition;
-import org.jboss.portal.portlet.impl.jsr168.PortletUtils;
 import org.jboss.portal.server.ServerInvocationContext;
 import org.jboss.portal.server.request.URLContext;
 import org.jboss.portal.server.request.URLFormat;
@@ -84,7 +84,7 @@
 
       //
       return new WindowContext(
-         PortletUtils.generateNamespaceFrom(window.getId().toString()),
+         window.getId().toString(PortalObjectPath.SAFEST_FORMAT),
          region,
          order,
          windowResult);

Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectTestCase.java	2009-03-13 10:23:21 UTC (rev 13023)
@@ -164,7 +164,7 @@
       page = portal.createPage("page");
       int nbPages = 200;
       int nbWindows = 100;
-      for(int j = 0; j < nbPages; j++)
+      for (int j = 0; j < nbPages; j++)
       {
          page.createPage("page" + j);
       }
@@ -198,10 +198,10 @@
       int nbPortals = 5;
       int nbPages = 20;
       int nbWindows = 20;
-      for(int i = 0; i < nbPortals; i++)
+      for (int i = 0; i < nbPortals; i++)
       {
          portal = root.createPortal("p" + i);
-         for(int j = 0; j < nbPages; j++)
+         for (int j = 0; j < nbPages; j++)
          {
             String name = "p" + i + "pa" + j;
             page = portal.createPage(name);
@@ -218,24 +218,28 @@
 
 
       time = System.currentTimeMillis();
-      int portalIndex = (int) (nbPortals * Math.random());
+      int portalIndex = (int)(nbPortals * Math.random());
       assertEquals(nbPortals, root.getChildren().size());
       assertEquals(nbPortals, root.getChildren(PortalObject.PORTAL_MASK).size());
+      TransactionAssert.beginTransaction();
       assertEquals(nbPages, root.getChild("p" + portalIndex).getChildren().size());
       assertEquals(nbPages, root.getChild("p" + portalIndex).getChildren(PortalObject.PAGE_MASK).size());
+      TransactionAssert.commitTransaction();
 
-      for (int i = 0; i < 1000000; i++)
+      for (int i = 0; i < 1000; i++)
       {
-         portalIndex = (int) (nbPortals * Math.random());
+         portalIndex = (int)(nbPortals * Math.random());
          String portalName = "p" + portalIndex;
+         TransactionAssert.beginTransaction();
          PortalObject child = root.getChild(portalName);
          assertNotNull(child);
-         int pageIndex = (int) (nbPages * Math.random());
+         int pageIndex = (int)(nbPages * Math.random());
          child = child.getChild(portalName + "pa" + pageIndex);
          assertNotNull(child);
          assertEquals(2 + nbWindows, child.getChildren().size());
          assertEquals(2, child.getChildren(PortalObject.PAGE_MASK).size());
          assertEquals(nbWindows, child.getChildren(PortalObject.WINDOW_MASK).size());
+         TransactionAssert.commitTransaction();
       }
       System.out.println("Tests time = " + (System.currentTimeMillis() - time));
    }*/

Modified: branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/style.css	2009-03-13 10:23:21 UTC (rev 13023)
@@ -8,23 +8,17 @@
 }
 
 /*
-Add height to handle div so that we can drag from the whole bar instead of just the title.
+Add height to handle div so that we can drag from the whole bar instead of just the title. Should work in IE as well,
+though it hasn't been tested.
 */
 .dnd-handle {
    cursor: move;
-   min-height: 21px;
-   position: absolute;
-   top: 10px;
-   width: 70%;
-   z-index: 1;
+   position: relative;
+   min-height: 1.2em;
    height: auto !important;
-   height: 21px;
+   height: 1.2em;
 }
 
-.dyna-decoration {
-   position: relative;
-}
-
 .dnd-droppable {
    border: green 1px dashed;
    background-color: Transparent;

Modified: branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java	2009-03-12 19:51:43 UTC (rev 13022)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/main/org/jboss/portal/theme/impl/render/dynamic/DynaDecorationRenderer.java	2009-03-13 10:23:21 UTC (rev 13023)
@@ -66,13 +66,15 @@
             DynaWindowRenderer.handleProvided.set(Boolean.TRUE);
 
             //
+            markup.print("<div class=\"dnd-handle\">");
             markup.print("<div class=\"dyna-decoration\">\n");
-            markup.print("<div class=\"dnd-handle\"></div>");
 
             delegate.render(rendererContext, drc);
 
             // Close dnd-decoration
             markup.print("</div>");
+            // Close dnd-handle
+            markup.print("</div>");
 
          }
          else




More information about the portal-commits mailing list