portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/xdocs changes.xml
Date Tue, 13 Aug 2002 22:24:54 GMT
taylor      2002/08/13 15:24:53

  Modified:    docs/site changes.html
               src/java/org/apache/jetspeed/modules/actions/portlets
                        CustomizeAction.java
               webapp/WEB-INF/conf JetspeedSecurity.properties
               webapp/WEB-INF/templates/vm/portlets/html
                        customizer-portlet.vm
               xdocs    changes.xml
  Log:
  Patch from Mark Orciuch , enhacement for customizing the portle title
  
  Revision  Changes    Path
  1.42      +6 -0      jakarta-jetspeed/docs/site/changes.html
  
  Index: changes.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/docs/site/changes.html,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- changes.html	8 Aug 2002 03:05:41 -0000	1.41
  +++ changes.html	13 Aug 2002 22:24:53 -0000	1.42
  @@ -130,6 +130,12 @@
   -->
         </ul>
                                                   <li>
  +  Add - 2002/08/13 - Bug fixes: enhancement to customizing portlet title, DB-PSML User
update bug fixed
  +</li>
  +                                                <li>
  +  Add - 2002/08/13 - Export-To-File-System Feature Added to PSML Browser 
  +</li>
  +                                                <li>
     Add - 2002/08/07 - Customizer can now add a reference.
   </li>
                                                   <li>
  
  
  
  1.13      +46 -1     jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeAction.java
  
  Index: CustomizeAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeAction.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- CustomizeAction.java	5 Jul 2002 18:14:12 -0000	1.12
  +++ CustomizeAction.java	13 Aug 2002 22:24:53 -0000	1.13
  @@ -78,6 +78,7 @@
   import org.apache.jetspeed.services.PortalToolkit;
   import org.apache.jetspeed.services.security.PortalResource;
   import org.apache.jetspeed.portal.PortletInstance;
  +import org.apache.jetspeed.util.MetaData;
   
   // Turbine stuff
   import org.apache.turbine.util.Log;
  @@ -166,6 +167,14 @@
           if (p.getPortletConfig().getSkin() != null)
               context.put("current_skin", p.getPortletConfig().getPortletSkin().getName());
   
  +        Profile profile = ((JetspeedRunData)rundata).getProfile();
  +        String currentTitle = profile.getDocument().getEntryById(p.getID()).getTitle();
  +        if (currentTitle == null && p.getPortletConfig().getMetainfo() != null)

  +        {
  +            currentTitle = p.getPortletConfig().getMetainfo().getTitle();
  +        }
  +        context.put("current_title", currentTitle);        
  +
       }
   
       /** Clean up the customization state */
  @@ -188,8 +197,9 @@
           List params = (List)rundata.getSession().getAttribute("parameters");
           String newSecurityParent = rundata.getParameters().getString("_security_ref");
           String newSkinName = (String) rundata.getParameters().getString("_skin");
  +        String newTitle = (String) rundata.getParameters().getString("current_title");
   
  -        boolean changeRequested = ( (params == null) || (newSkinName == null) || (newSecurityParent
== null));
  +        boolean changeRequested = ( (params == null) || (newSkinName == null) || (newSecurityParent
== null) || (newTitle == null));
           boolean madePsChange = false;
           boolean madePcChange = false;
   
  @@ -275,6 +285,41 @@
                       entry.setSkin(null);
                   }
                   madePcChange = true;
  +            }
  +        }
  +
  +        // Only update the title if the title changed
  +        if (newTitle != null)
  +        {
  +            boolean titleChanged = false;
  +            String currentTitle = entry.getTitle();
  +            
  +            MetaData md = pc.getMetainfo();
  +            if  (currentTitle == null && md != null && md.getTitle() !=
null)
  +                currentTitle = md.getTitle();
  +
  +            if (currentTitle != null)
  +            {
  +                titleChanged = (newTitle.equals(currentTitle) == false);
  +            }
  +            else
  +            {
  +                titleChanged = (newTitle.trim().length() > 0);
  +            }
  +
  +            if (titleChanged == true)
  +            {
  +
  +                if ((newTitle.trim().length() > 0))
  +                {
  +                    if (md == null) {
  +                        md = new MetaData();
  +                        pc.setMetainfo(md);
  +                    }
  +                    md.setTitle(newTitle);
  +                    entry.setTitle(newTitle);
  +                    madePcChange = true;
  +                }
               }
           }
   
  
  
  
  1.28      +0 -0      jakarta-jetspeed/webapp/WEB-INF/conf/JetspeedSecurity.properties
  
  Index: JetspeedSecurity.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/JetspeedSecurity.properties,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  
  
  
  1.10      +9 -0      jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/customizer-portlet.vm
  
  Index: customizer-portlet.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/customizer-portlet.vm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- customizer-portlet.vm	23 Jul 2002 00:03:56 -0000	1.9
  +++ customizer-portlet.vm	13 Aug 2002 22:24:53 -0000	1.10
  @@ -16,6 +16,15 @@
     <br>
   #end
     <table width="100%" cellpadding="1" cellspacing="0">
  +    <tr>
  +       <td><b>Title</b></td>
  +       <td><input type="text" name="current_title" value="$current_title" size="50"></td>
  +    </tr>
  +    <tr>   
  +       <td colspan="2">
  +         <hr/>
  +       </td>
  +    </tr>
   #parse ("/portlets/html/customize-skin_row.vm")
       <tr>
         <td colspan="2">
  
  
  
  1.60      +7 -1      jakarta-jetspeed/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/xdocs/changes.xml,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- changes.xml	8 Aug 2002 03:05:41 -0000	1.59
  +++ changes.xml	13 Aug 2002 22:24:53 -0000	1.60
  @@ -24,6 +24,12 @@
   -->
         </ul>
   <li>
  +  Add - 2002/08/13 - Bug fixes: enhancement to customizing portlet title, DB-PSML User
update bug fixed
  +</li>
  +<li>
  +  Add - 2002/08/13 - Export-To-File-System Feature Added to PSML Browser 
  +</li>
  +<li>
     Add - 2002/08/07 - Customizer can now add a reference.
   </li>
   <li>
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message