portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r891498 - /portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java
Date Thu, 17 Dec 2009 00:49:59 GMT
Author: taylor
Date: Thu Dec 17 00:49:59 2009
New Revision: 891498

URL: http://svn.apache.org/viewvc?rev=891498&view=rev
Log:
https://issues.apache.org/jira/browse/JS2-1084
respect container fragment size properties

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/ui/Jetui.java

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=891498&r1=891497&r2=891498&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
Thu Dec 17 00:49:59 2009
@@ -81,25 +81,32 @@
                 // need to have a better algorithm to determine number of columns and fragment
column sizes
                 int numberOfColumns = 1;
                 String layoutType = "OneColumn";
-                String fragmentColumnSizes = "100%";
+                String fragmentColumnSizes = rootFragment.getProperty("sizes");
                 if (jetspeedLayout.indexOf("Two") > -1)
                 {
                     numberOfColumns = 2;
                     layoutType = "TwoColumn";
-                    fragmentColumnSizes = "50%,50%";
+                    if (fragmentColumnSizes == null)
+                    	fragmentColumnSizes = "50%,50%";
                 }
                 else if (jetspeedLayout.indexOf("Three") > -1)
                 {
                     numberOfColumns = 3;
                     layoutType = "ThreeColumn";
-                    fragmentColumnSizes = "33%,34%,33%";                
+                    if (fragmentColumnSizes == null)                    
+                    	fragmentColumnSizes = "33%,34%,33%";                
                 }                
                 else if (jetspeedLayout.indexOf("Four") > -1)
                 {
                     numberOfColumns = 4;
                     layoutType = "FourColumn";
-                    fragmentColumnSizes = "25%,25%,25%,25%";                            
   
-                }                
+                    if (fragmentColumnSizes == null)                    
+                    	fragmentColumnSizes = "25%,25%,25%,25%";                           
    
+                }      
+                else
+                {
+                    fragmentColumnSizes = "100%";
+                }
                 String [] fragmentColumnSizesArray = fragmentColumnSizes.split("\\,");
                 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                 ColumnLayout columnLayout = new ColumnLayout(numberOfColumns, layoutType,
rootFragment.getFragments(), fragmentColumnSizesArray);



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