portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r603790 - in /portals/jetspeed-2/branches/JETSPEED-2.1.3: layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java src/webapp/WEB-INF/templates/layout/html/columns/layout.vm
Date Thu, 13 Dec 2007 00:51:49 GMT
Author: ate
Date: Wed Dec 12 16:51:46 2007
New Revision: 603790

URL: http://svn.apache.org/viewvc?rev=603790&view=rev
Log:
Fixing broken /portal PageCustomizer action "Change Portlets Theme"

Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
    portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java?rev=603790&r1=603789&r2=603790&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/layout-portlets/src/java/org/apache/jetspeed/portlets/layout/MultiColumnPortlet.java
Wed Dec 12 16:51:46 2007
@@ -926,68 +926,68 @@
                     }
                     return;
                 }
-                // evlach
+            }
+            // change style for all pages in user folder 
+            String jsChangeUserPagesTheme = request.getParameter("jsChangeUserPagesTheme");
+            if ( jsChangeUserPagesTheme != null )
+            {
+               String user_pages_theme = request.getParameter("user_pages_theme");
+               try
+                {
+                   Folder f = pageManager.getUserFolder(request.getRemoteUser());
+                   applyStyle(f,user_pages_theme,Fragment.LAYOUT);
+                }
+                catch (Exception e)
+                {
+                   throw new PortletException("Unable to update folder for defUserLayoutDeco
decorator: "+e.getMessage(), e);
+                }
+                return;
+            }                
+            String jsChangeUserPortletsDeco = request.getParameter("jsChangeUserPortletsDeco");
+            if ( jsChangeUserPortletsDeco != null )
+            {                  
+               String user_portlets_deco = request.getParameter("user_portlets_deco");
+               try
+                {
+                   Folder f = pageManager.getUserFolder(request.getRemoteUser());
+                   applyStyle(f,user_portlets_deco,Fragment.PORTLET);
+                }
+               catch (Exception e)
+                {
+                    throw new PortletException("Unable to update folder for defUserPortletDeco
decorator: "+e.getMessage(), e);
+                }
+               return;
+            }                                
+            
+            String jsChangeThemeAll = request.getParameter("jsChangeThemeAll");
+            if (jsChangeThemeAll != null)
+            {
                 String decorators = request.getParameter("decorators");                
-                // change style for all pages in user folder 
-                String jsChangeUserPagesTheme = request.getParameter("jsChangeUserPagesTheme");
-                if ( jsChangeUserPagesTheme != null )
+                Iterator fragmentsIter = requestPage.getRootFragment().getFragments().iterator();
+                while(fragmentsIter.hasNext())
                 {
-                   String user_pages_theme = request.getParameter("user_pages_theme");
-                   try
+                    Fragment fragment = (Fragment) fragmentsIter.next();
+                    if ( fragment == null )
                     {
-                       Folder f = pageManager.getUserFolder(request.getRemoteUser());
-                       applyStyle(f,user_pages_theme,Fragment.LAYOUT);
-                       decorators=null;
+                        // ignore no longer consistent page definition
+                        return;
                     }
-                    catch (Exception e)
-                    {
-                       throw new PortletException("Unable to update folder for defUserLayoutDeco
decorator: "+e.getMessage(), e);
-                    }
-                }                
-                String jsChangeUserPortletsDeco = request.getParameter("jsChangeUserPortletsDeco");
-                if ( jsChangeUserPortletsDeco != null )
-                {                  
-                   String user_portlets_deco = request.getParameter("user_portlets_deco");
-                   try
-                    {
-                       Folder f = pageManager.getUserFolder(request.getRemoteUser());
-                       applyStyle(f,user_portlets_deco,Fragment.PORTLET);
-                        decorators = null; //do insert next if
-                    }
-                   catch (Exception e)
-                    {
-                        throw new PortletException("Unable to update folder for defUserPortletDeco
decorator: "+e.getMessage(), e);
-                    }
-                }                                
-                
-                if ( decorators != null && decorators.length() > 1)
+                    
+                    if (decorators.trim().length() == 0)
+                        fragment.setDecorator(null);
+                    else
+                        fragment.setDecorator(decorators);
+                }
+                try
                 {
-                    Iterator fragmentsIter = requestPage.getRootFragment().getFragments().iterator();
-                    while(fragmentsIter.hasNext())
-                    {
-                    	Fragment fragment = (Fragment) fragmentsIter.next();
-                    	if ( fragment == null )
-                        {
-                            // ignore no longer consistent page definition
-                            return;
-                        }
-                        
-                        if (decorators.trim().length() == 0)
-                            fragment.setDecorator(null);
-                        else
-                            fragment.setDecorator(decorators);
-                    }
-                    try
-                    {
-                        pageManager.updatePage(requestPage);
-                    }
-                    catch (Exception e)
-                    {
-                        throw new PortletException("Unable to update page for fragment decorator:
"+e.getMessage(), e);
-                    }
-                    return;
-                }                
-            }
+                    pageManager.updatePage(requestPage);
+                }
+                catch (Exception e)
+                {
+                    throw new PortletException("Unable to update page for fragment decorator:
"+e.getMessage(), e);
+                }
+                return;
+            }                
             
             String portlets = request.getParameter("portlets");
             if ( portlets != null && portlets.length() > 0 )

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm?rev=603790&r1=603789&r2=603790&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/src/webapp/WEB-INF/templates/layout/html/columns/layout.vm
Wed Dec 12 16:51:46 2007
@@ -186,7 +186,7 @@
             <option value='$pd' #if ($pd == $fd) SELECTED #end>$pd
         	    #end
           </select>
-          <input type="submit" name="jsSubmitTheme" value="$messages.getString("portal.page.editing.changethemeall")"/>
+          <input type="submit" name="jsChangeThemeAll" value="$messages.getString("portal.page.editing.changethemeall")"/>
         </div>
         #end	   
         #if($allowAddLayout||$allowChangeLayout)



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