portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/velocity JetspeedPowerTool.java
Date Sun, 14 Mar 2004 05:10:01 GMT
weaver      2004/03/13 21:10:01

  Modified:    portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/css
                        styles.css
               portal/src/webapp/WEB-INF/pages default-page.psml
               portal/src/java/org/apache/jetspeed/velocity
                        JetspeedPowerTool.java
  Added:       portal/src/webapp/WEB-INF/decorations/portlet/html/metal/images
                        contentleft.gif bottomright.gif bottom.gif
                        bottomleft.gif titleright.gif title.gif
                        titleleft.gif contentright.gif
               portal/src/webapp/WEB-INF/decorations/portlet/html/metal
                        decorator.vm decorator.properties
  Log:
  - added "metal" portlet decorator (skin).
  - changed default-page.psml to have the  preference portlet use the "metal" decorator
  
  Revision  Changes    Path
  1.2       +53 -64    jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/css/styles.css
  
  Index: styles.css
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/layout/html/jetspeed/css/styles.css,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- styles.css	14 Mar 2004 00:02:43 -0000	1.1
  +++ styles.css	14 Mar 2004 05:10:00 -0000	1.2
  @@ -76,89 +76,78 @@
   	background:  url(content/jetspeed/images/bottomright.gif);
   }
   
  -.Jetspeed .TabLeft
  -{
  -	width:12px;
  -	height:25px;
  -	background:  url(content/jetspeed/images/tableft.gif);
  -}
  -
  -.Jetspeed .TabMiddle
  -{
  -	font-weight:bold;
  -	font-size: 9pt;
  -	background:  url(content/jetspeed/images/tabmiddle.gif);	
  -}
  -
  -.Jetspeed .TabRight
  -{
  -	width:12px;
  -	background:  url(content/jetspeed/images/tabright.gif);
  -}
  -
  -
  -.Jetspeed .TabLeftLow
  -{
  -	width:12px;
  -	background:  url(content/jetspeed/images/tableft_low.gif);
  -}
  -
  -.Jetspeed .TabMiddleLow
  -{
  -	font-weight:bold;
  -	background:  url(content/jetspeed/images/tabmiddle_low.gif);	
  -}
  -
  -.Jetspeed .TabRightLow
  -{
  -	width:12px;
  -	background:  url(content/jetspeed/images/tabright_low.gif);
  +/**
  +	Metal Skin that uses the cascading capability of CSS
  +**/
  +
  +.Metal .PTitleLeft
  +{
  +	/**
  +	Needs to specify the width of image used
  +	otherwise it won't show !
  +	**/
  +	width:10px;
  +	
  +	/** Always use relative path ! **/
  +	background:  url(content/metal/images/titleleft.gif);
  +}
  +
  +.Metal .PTitle
  +{
  +	/**
  +	Specify the height of the image used
  +	else it will use the text height	
  +	**/
  +	height:16px;
  +	color:#FFFFFF;
  +	background:  url(content/metal/images/title.gif);
   }
    
  -.Jetspeed .TabLink
  +.Metal .PTitleRight
   {
  -	text-decoration:none;
  -	font-size:6pt;
  +	/**
  +	Needs to specify the width of image used
  +	otherwise it won't show !
  +	**/
  +	width:10px;
  +	background:  url(content/metal/images/titleright.gif);
   }
   
  -a:link.TabLink { color:black;font-size:9pt;font-weight:normal; }
  -a:visited.TabLink { color:black;font-size:9pt;font-weight:normal; }
  -a:hover.TabLink { color:#6F6F6F;font-size:9pt;font-weight:normal; }
  -
  -
  -.Jetspeed .MenuLeft
  +.Metal .PContentLeft
   {
  -	width:12px;
  -	background:  url(content/jetspeed/images/tabmiddle.gif);
  +	width:10px;
  +	background:  url(content/metal/images/contentleft.gif);
   }
   
  -
  -.Jetspeed .MenuMiddle
  +.Metal .PContent
   {
  -	font-size:9pt;
  -	font-weight:bold;
  -	background:  url(content/jetspeed/images/tabmiddle.gif);
  +
   }
   
  -.Jetspeed .MenuRight
  +.Metal .PContentRight
   {
  -	background:  url(content/jetspeed/images/tabmiddle.gif);
  +	width:10px;
  +	background:  url(content/metal/images/contentright.gif);
   }
   
  -.Jetspeed .MenuLeftLow
  +.Metal .PBottomLeft
   {
  -	width:12px;
  -	background:  url(content/jetspeed/images/tabmiddle_low.gif);
  +	width:10px;
  +	background:  url(content/metal/images/bottomleft.gif);
   }
   
  -
  -.Jetspeed .MenuMiddleLow
  +.Metal .PBottom
   {
  -	font-size:8pt;
  -	background:  url(content/jetspeed/images/tabmiddle_low.gif);
  +	/**
  +	Specify the height of the image used
  +	else it won't appear
  +	**/
  +	height:13px;
  +	background:  url(content/metal/images/bottom.gif);
   }
   
  -.Jetspeed .MenuRightLow
  +.Metal .PBottomRight
   {
  -	background:  url(content/jetspeed/images/tabmiddle_low.gif);
  +	width:10px;
  +	background:  url(content/metal/images/bottomright.gif);
   }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/portlet/html/metal/images/contentleft.gif
  
  	<<Binary file>>
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/portlet/html/metal/images/bottomright.gif
  
  	<<Binary file>>
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/portlet/html/metal/images/bottom.gif
  
  	<<Binary file>>
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/portlet/html/metal/images/bottomleft.gif
  
  	<<Binary file>>
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/portlet/html/metal/images/titleright.gif
  
  	<<Binary file>>
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/portlet/html/metal/images/title.gif
  
  	<<Binary file>>
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/portlet/html/metal/images/titleleft.gif
  
  	<<Binary file>>
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/portlet/html/metal/images/contentright.gif
  
  	<<Binary file>>
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/portlet/html/metal/decorator.vm
  
  Index: decorator.vm
  ===================================================================
  #set($myPage = $jetspeed.page)
  
  #set($myF = $jetspeed.currentFragment)
  
  #set($myPE = $jetspeed.currentPortletEntity)
  
  
  <!-- Begin portlet/html/jetspeed/decorator.vm  -->
  
  <div class="Metal" >
  <table border="0" cellpadding="0" cellspacing="0" width="100%" >
  ##
  ## Portlet Title Bar
  ##
  #set ($cspan = 2)
  
    <tr>
      <td class="PTitleLeft" style="font-size:1pt;" nowrap="true">&nbsp;</td>
  
      <td align="left" valign="middle" class="PTitle" >
         ${myPE.portletDefinition.name}
      </td>
      
      <td class="PTitleRight" style="font-size:1pt;" nowrap="true">&nbsp;</td>
    </tr>
  
  
  ##
  ## Portlet Content
  ##
  #if (!$jetspeed.isHidden($myF))
    <tr>
      <td  nowrap="nowrap"><div class="PContentLeft" >&nbsp;</div></td>
      
      <td class="PContent" >
         $jetspeed.include($myF)
      </td>   
      
      <td class="PContentRight"  ><div class="PContentRight" >&nbsp;</div></td>
     
    </tr>
  #end
  
  
  ##
  ## Portlet Bottom
  ##
    <tr>
      <td class="PBottomLeft" style="font-size:1pt;" nowrap="true">&nbsp;</td>
      <td class="PBottom" style="font-size:1pt;" nowrap="true">&nbsp;</td>
      <td class="PBottomRight" style="font-size:1pt;" nowrap="true">&nbsp;</td>
    </tr>
  </table>
  </div>
  
  <!--  portlet/html/jetspeed/decorator.vm -->
  
  
  
  
  
  
  
  
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/decorations/portlet/html/metal/decorator.properties
  
  Index: decorator.properties
  ===================================================================
  id=metal
  template.type=velocity
  template.extension=.vm
  decorates=portlet
  
  
  1.11      +5 -1      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/default-page.psml
  
  Index: default-page.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/default-page.psml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- default-page.psml	14 Mar 2004 00:01:02 -0000	1.10
  +++ default-page.psml	14 Mar 2004 05:10:00 -0000	1.11
  @@ -10,7 +10,11 @@
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="0" />
       </fragment>                                
  -    <fragment id="pe002" entity="5" type="portlet" name="HW_App::PreferencePortlet">
  +    <fragment id="pe002" 
  +     entity="5" 
  +     type="portlet" 
  +     name="HW_App::PreferencePortlet"
  +     decorator="metal">
         <property layout="TwoColumns" name="row" value="0" />
         <property layout="TwoColumns" name="column" value="1" />
       </fragment>
  
  
  
  1.9       +12 -5     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerTool.java
  
  Index: JetspeedPowerTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/velocity/JetspeedPowerTool.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JetspeedPowerTool.java	14 Mar 2004 00:03:44 -0000	1.8
  +++ JetspeedPowerTool.java	14 Mar 2004 05:10:01 -0000	1.9
  @@ -460,11 +460,18 @@
           setCurrentFragment(f);
   
           String decoratorPath = decorator + "/" + DECORATOR_TYPE + ext;
  -        TemplateDescriptor template = getTemplate(decoratorPath, fragmentType, decorationLocator,
decorationLocatorDescriptor); 
  -        // Not found specifcally for the fragmentType, then try the generic type
  -        if(template == null)
  +        TemplateDescriptor template = null;
  +        try
           {
  -            template = getTemplate(decoratorPath, GENERIC_TEMPLATE_TYPE, decorationLocator,
decorationLocatorDescriptor);
  +            template = getDecoration(decoratorPath, fragmentType);
  +        }
  +        catch (TemplateLocatorException e)
  +        {
  +            String parent = decoConf.getString("extends");
  +            if(parent != null)
  +            {
  +                template = getDecoration(parent + "/" + DECORATOR_TYPE + ext, fragmentType);
  +            }
           }
           PortletRequestDispatcher prd = portletConfig.getPortletContext().getRequestDispatcher(template.getAppRelativePath());
           prd.include(renderRequest, renderResponse);
  
  
  

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


Mime
View raw message