portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r894279 - in /portals/jetspeed-2/portal/trunk: applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/ applications/jetspeed/src/main/webapp/WEB-INF/pages/ applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/ applications/je...
Date Tue, 29 Dec 2009 00:02:23 GMT
Author: taylor
Date: Tue Dec 29 00:02:22 2009
New Revision: 894279

URL: http://svn.apache.org/viewvc?rev=894279&view=rev
Log:
JS2-1084
integrating new layout apis into jetui

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/jetui/yui/jetui.jsp
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/template.tpsml
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
    portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageLayoutService.java
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
    portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java

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=894279&r1=894278&r2=894279&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
Tue Dec 29 00:02:22 2009
@@ -236,8 +236,8 @@
 <%
 for (ContentFragment fragment : columnLayout.getDetachedPortlets())
 {
-	String x = fragment.getProperty("x");
-	String y = fragment.getProperty("y");
+	String x = fragment.getProperty(ContentFragment.X_PROPERTY_NAME);
+	String y = fragment.getProperty(ContentFragment.Y_PROPERTY_NAME);
     String content = jetui.getRenderedContent((ContentFragment)fragment, rc);
 %>
    <div id='<%=fragment.getId()%>' detached='true' locked='<%=fragment.isLocked()%>'
name='<%=fragment.getName()%>' column='0' row='0' x='<%=x%>' y='<%=y%>'
style='position: absolute; top: <%=x%>px; left: <%=y%>px;'>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml?rev=894279&r1=894278&r2=894279&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/_user/template/navigator.psml
Tue Dec 29 00:02:22 2009
@@ -27,7 +27,6 @@
             <property name="column" value="0"></property>
             <property name="y" value="104.0"></property>
             <property name="x" value="1.0"></property>
-            <property name="jsdesktop" value="staticpos=false;fitheight=false"></property>
                       
     </fragment>
     <fragment id="_jsToolbox-1001" type="portlet" name="j2-admin::JetspeedToolbox">
   	        <property name="z" value="201.0"></property>
@@ -37,7 +36,6 @@
             <property name="column" value="0"></property>
             <property name="y" value="500.0"></property>
             <property name="x" value="1.0"></property>
-            <property name="jsdesktop" value="staticpos=false;fitheight=false"></property>
                       
     </fragment>
 
   </fragment>

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/template.tpsml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/template.tpsml?rev=894279&r1=894278&r2=894279&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/template.tpsml
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/WEB-INF/pages/template.tpsml
Tue Dec 29 00:02:22 2009
@@ -11,7 +11,7 @@
     <fragment id="jsSpaceNavigator" type="portlet" name="j2-admin::SpaceNavigator" decorator='clear'>
             <property name="y" value="300"></property>
             <property name="x" value="20"></property>            
-            <property name="jsdesktop" value="detached=true"></property>    
                   
+            <property name="state" value="detached"></property>             
          
     </fragment>
 
     <fragment id="jsPageNavigator" type="portlet" name="j2-admin::PageNavigator">
@@ -22,7 +22,7 @@
             <property name="column" value="0"></property>
             <property name="y" value="104.0"></property>
             <property name="x" value="1.0"></property>            
-            <property name="jsdesktop" value="staticpos=false;fitheight=false"></property>
                       
+            <property name="state" value="normal"></property>               
        
     </fragment>
     <page-fragment id="page-template">
       <property name="column" value="1"/>
@@ -37,7 +37,7 @@
             <property name="column" value="2"></property>
             <property name="y" value="500.0"></property>
             <property name="x" value="1.0"></property>
-            <property name="jsdesktop" value="staticpos=false;fitheight=false"></property>
                       
+            <property name="state" value="normal"></property>               
        
     </fragment>
     
 <!--    

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js?rev=894279&r1=894278&r2=894279&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/javascript/jetspeed/jetui/jetui-portal.js
Tue Dec 29 00:02:22 2009
@@ -18,7 +18,7 @@
  */
 
 YUI.add('jetui-portal', function(Y) {
-    
+
     /**
      * JetUI Portal JavaScript Framework
      *
@@ -64,8 +64,12 @@
          * @type String
          * @static
          */
-        NAME : 'Portal'
-        
+        NAME : 'Portal',
+    	/**
+    	 * Module Constants
+    	 */
+    	CSRE : 'CSRE',
+    	SSRE : 'SSRE'                
     });
     
     Y.extend(Y.JetUI.Portal, Y.Base, {

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js?rev=894279&r1=894278&r2=894279&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js
(original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed/src/main/webapp/jetui/engine/portal.js
Tue Dec 29 00:02:22 2009
@@ -1,11 +1,19 @@
 //Use loader to grab the modules needed
 YUI(JETUI_YUI).use('jetui-portal', 'console', 'dd', 'anim', 'io', 'datatype-xml', 'dataschema-xml',
'dataschema-json', 'node', 'node-menunav', function(Y) {
 
+    var portal = JETUI_YUI.getPortalInstance();
 	var config = JETUI_YUI.config;
     Y.log("Starting up JETUI " +  config.engine + " engine...");
-	
-    var portal = JETUI_YUI.getPortalInstance();
         
+    if (config.engine == Y.JetUI.Portal.CSRE)
+    {
+    	Y.log("Initializing " + Y.JetUI.Portal.CSRE + " ...");
+    }    
+    else
+    {
+    	Y.log("Initializing " + Y.JetUI.Portal.SSRE + " ...");
+    }
+    	
     ////////////////////////////////////////////////////    
     // Create Navigator Portlet
     var navigator = new Y.JetUI.Portlet();
@@ -80,7 +88,7 @@
     }
     ////////////////////////////////////////////////////       
     // drag and drop
-    var nav = Y.one('#jsNavigator');
+    var nav = Y.one("[id='template-top2.jsPageNavigator']"); 
     if (!Y.Lang.isNull(nav)) {
 	    nav.data = navigator;
 	    var ddNav = new Y.DD.Drag({

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageLayoutService.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageLayoutService.java?rev=894279&r1=894278&r2=894279&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageLayoutService.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/services/rest/PageLayoutService.java
Tue Dec 29 00:02:22 2009
@@ -283,7 +283,7 @@
             }
             else
             {
-                layoutFragment = getParentFragment(pageLayoutComponent.getUnlockedRootFragment(contentPage),
fragmentId);
+                layoutFragment = getParentFragment(pageLayoutComponent.getUnlockedRootFragment(contentPage),
fragmentId );
                 
                 if (layoutFragment == null)
                 {
@@ -306,7 +306,7 @@
                 
                 if (newColumn != oldColumn)
                 {
-                    pageLayoutComponent.updateRowColumn(contentFragment, contentFragment.getLayoutRow(),
newColumn);
+                    pageLayoutComponent.updateRowColumn(contentFragment, contentFragment.getLayoutRow(),
newColumn, PageLayoutComponent.USER_PROPERTY_SCOPE, null);
                     adjustPositionsOfChildFragments(layoutFragment, layoutColumnCount);
                 }
             }
@@ -323,7 +323,7 @@
                 
                 if (newColumn != oldColumn)
                 {
-                    pageLayoutComponent.updateRowColumn(contentFragment, contentFragment.getLayoutRow(),
newColumn);
+                    pageLayoutComponent.updateRowColumn(contentFragment, contentFragment.getLayoutRow(),
newColumn, PageLayoutComponent.USER_PROPERTY_SCOPE, null);
                     adjustPositionsOfChildFragments(layoutFragment, layoutColumnCount);
                 }
             }
@@ -344,8 +344,8 @@
                             int column = contentFragment.getLayoutColumn();
                             int destRow = destFragment.getLayoutRow();
                             int destColumn = destFragment.getLayoutColumn();
-                            pageLayoutComponent.updateRowColumn(contentFragment, destRow,
destColumn);
-                            pageLayoutComponent.updateRowColumn(destFragment, row, column);
+                            pageLayoutComponent.updateRowColumn(contentFragment, destRow,
destColumn, PageLayoutComponent.USER_PROPERTY_SCOPE, null);
+                            pageLayoutComponent.updateRowColumn(destFragment, row, column,
PageLayoutComponent.USER_PROPERTY_SCOPE, null);
                         }
                         
                         break;
@@ -378,7 +378,7 @@
                             int destRow = destFragment.getLayoutRow();
                             int destColumn = destFragment.getLayoutColumn();
                             pageLayoutComponent.updateRowColumn(contentFragment, destRow,
destColumn);
-                            pageLayoutComponent.updateRowColumn(destFragment, row, column);
+                            pageLayoutComponent.updateRowColumn(destFragment, row, column,
PageLayoutComponent.USER_PROPERTY_SCOPE, null);
                         }
                         
                         break;
@@ -435,7 +435,7 @@
   
                         int prevRow = contentFragment.getLayoutRow();
                         boolean movingDown = (prevRow < row);
-                        pageLayoutComponent.updateRowColumn(contentFragment, row, col);
+                        pageLayoutComponent.updateRowColumn(contentFragment, row, col, PageLayoutComponent.USER_PROPERTY_SCOPE,
null);
                         SortedSet<ContentFragment> sscf = this.getSortedChildFragmentSet(set,
movingDown, contentFragment);
                         int rowCount = 0;
                         for (ContentFragment f : sscf)
@@ -443,7 +443,7 @@
                             if (f != contentFragment)
                             {
                                 if (rowCount != f.getLayoutRow())
-                                    pageLayoutComponent.updateRowColumn(f, rowCount, col);
                                   
+                                    pageLayoutComponent.updateRowColumn(f, rowCount, col,
PageLayoutComponent.USER_PROPERTY_SCOPE, null);                                    
                             }
                             rowCount++;
                             
@@ -466,7 +466,8 @@
             
             try
             {
-                pageLayoutComponent.updatePosition(contentFragment, posX, posY, posZ, posWidth,
posHeight);
+                pageLayoutComponent.updatePosition(contentFragment, posX, posY, posZ, posWidth,
posHeight, PageLayoutComponent.USER_PROPERTY_SCOPE, null);
+                pageLayoutComponent.updateStateMode(contentFragment, JetspeedActions.DETACH,
null, PageLayoutComponent.USER_PROPERTY_SCOPE, null);
             }
             catch (Exception e)
             {
@@ -656,7 +657,7 @@
             {
                 if (row != child.getLayoutRow() || -1 == child.getLayoutColumn())
                 {
-                    pageLayoutComponent.updateRowColumn(child, row, column);
+                    pageLayoutComponent.updateRowColumn(child, row, column, PageLayoutComponent.USER_PROPERTY_SCOPE,
null);
                 }
                 
                 ++row;

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java?rev=894279&r1=894278&r2=894279&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
Tue Dec 29 00:02:22 2009
@@ -81,7 +81,7 @@
                 // need to have a better algorithm to determine number of columns and fragment
column sizes
                 int numberOfColumns = 1;
                 String layoutType = "OneColumn";
-                String fragmentColumnSizes = rootFragment.getProperty("sizes");
+                String fragmentColumnSizes = rootFragment.getProperty(ContentFragment.SIZES_PROPERTY_NAME);
                 if (jetspeedLayout.indexOf("Two") > -1)
                 {
                     numberOfColumns = 2;

Modified: portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java?rev=894279&r1=894278&r2=894279&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java
(original)
+++ portals/jetspeed-2/portal/trunk/jetspeed-commons/src/main/java/org/apache/jetspeed/portlets/layout/ColumnLayout.java
Tue Dec 29 00:02:22 2009
@@ -30,6 +30,7 @@
 import java.util.SortedMap;
 import java.util.TreeMap;
 
+import org.apache.jetspeed.JetspeedActions;
 import org.apache.jetspeed.om.page.ContentFragment;
 
 /**
@@ -166,20 +167,13 @@
             while (fragmentsItr.hasNext())
             {
                 ContentFragment fragment = (ContentFragment) fragmentsItr.next();
-                String jsdesktop = fragment.getProperty(NameValueProperty.NAME_VALUE_PROPERTY);
-                if (jsdesktop != null)
+                String windowState = fragment.getState();
+                if (windowState != null && windowState.equals(JetspeedActions.DETACH))
                 {
-                    NameValueProperty nvp = new NameValueProperty(jsdesktop);
-                    if (nvp.isDetached())
-                    {
-                        detachedPortlets.add(fragment);
-                        continue;
-                    }
-                    else if (nvp.isDecoratorRendered())
-                    {
-                        continue;
-                    }
+                    detachedPortlets.add(fragment);
+                    continue;
                 }
+                //else if (nvp.isDecoratorRendered())
                 doAdd(getColumn(fragment), getRow(getColumn(fragment), fragment), fragment);
             }
         }
@@ -766,7 +760,7 @@
      */
     protected final int getRow(int currentColumn, ContentFragment fragment)
     {
-        String propertyValue = fragment.getProperty(ContentFragment.ROW_PROPERTY_NAME);
+        String propertyValue = fragment.getProperty(ContentFragment.ROW_PROPERTY_NAME); 
         if (propertyValue != null)
         {
             return Integer.parseInt(propertyValue);
@@ -792,7 +786,7 @@
      */
     protected final int getColumn(ContentFragment fragment)
     {
-        String propertyValue = fragment.getProperty(ContentFragment.COLUMN_PROPERTY_NAME);
+        String propertyValue = fragment.getProperty(ContentFragment.COLUMN_PROPERTY_NAME);

         if (propertyValue != null)
         {
             int columnNumber = Integer.parseInt(propertyValue);
@@ -842,20 +836,13 @@
         while (fragmentsItr.hasNext())
         {
             ContentFragment fragment = (ContentFragment) fragmentsItr.next();
-            String jsdesktop = fragment.getProperty(NameValueProperty.NAME_VALUE_PROPERTY);
-            if (jsdesktop != null)
+            String windowState = fragment.getState();
+            if (windowState != null && windowState.equals(JetspeedActions.DETACH))
             {
-                NameValueProperty nvp = new NameValueProperty(jsdesktop);
-                if (nvp.isDetached())
-                {
-                    detachedPortlets.add(fragment);
-                    continue;
-                }
-                else if (nvp.isDecoratorRendered())
-                {
-                    continue;
-                }
+                detachedPortlets.add(fragment);
+                continue;
             }
+            //    else if (nvp.isDecoratorRendered())
         }
     }
     



---------------------------------------------------------------------
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