sgala       01/09/06 04:37:37

  Modified:    webapp/css default.css
               webapp/WEB-INF/conf skins.xreg
               src/java/org/apache/jetspeed/portal PortletSkin.java
                        BasePortletSkin.java
               webapp/WEB-INF/templates/vm/controls/html jetspeed-tab.vm
                        jetspeed.vm
  Log:
  Changes to add more CSS support to the skins. Slightly modified from a patch by 
Chris Kimpton.
  
  Revision  Changes    Path
  1.3       +33 -0     jakarta-jetspeed/webapp/css/default.css
  
  Index: default.css
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/css/default.css,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- default.css       2001/07/29 13:42:52     1.2
  +++ default.css       2001/09/06 11:37:37     1.3
  @@ -30,3 +30,36 @@
           .MESSAGENEW:link {font-family: "Verdana"; font-size: 8pt; color: 
NAVY;font-weight: bold}
           .MESSAGENEW:visited {font-family: "Verdana"; font-size: 8pt; color: 
BLACK;font-weight: bold}
   
  +        .PortletStyleClass
  +        {
  +          padding: 1;
  +          background-color: #AAAAAA;
  +          border: thin gray solid;
  +        }
  +
  +        .TabStyleClass
  +        {
  +          padding: 1;
  +        }
  +
  +        .TitleStyleClass
  +        {
  +          text-transform: uppercase;
  +          font-weight: bold;
  +        }
  +
  +        .TabTitleStyleClass
  +        {
  +          background-color: #FFFFFF;
  +        }
  +
  +        .ContentStyleClass
  +        {
  +          background-color: #FFFFFF;
  +          border-top: thin gray solid;
  +        }
  +
  +        .TabContentStyleClass
  +        {
  +          background-color: #FFFFFF;
  +        }
  
  
  
  1.4       +6 -0      jakarta-jetspeed/webapp/WEB-INF/conf/skins.xreg
  
  Index: skins.xreg
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/skins.xreg,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- skins.xreg        2001/07/23 21:46:44     1.3
  +++ skins.xreg        2001/09/06 11:37:37     1.4
  @@ -18,6 +18,12 @@
       <property name="title-background-color" value="#dddddd"/>
       <property name="highlight-text-color" value="#000000"/>
       <property name="highlight-background-color" value="#FFCC00"/>
  +    <property name="portlet-style-class" value="PortletStyleClass"/>
  +    <property name="title-style-class" value="TitleStyleClass"/>
  +    <property name="content-style-class" value="ContentStyleClass"/>
  +    <property name="tab-style-class" value="TabStyleClass"/>
  +    <property name="tab-title-style-class" value="TabTitleStyleClass"/>
  +    <property name="tab-content-style-class" value="TabContentStyleClass"/>
     </skin-entry>
   
     <skin-entry name="orange-red">
  
  
  
  1.2       +80 -1     
jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletSkin.java
  
  Index: PortletSkin.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/PortletSkin.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PortletSkin.java  2001/05/27 15:34:35     1.1
  +++ PortletSkin.java  2001/09/06 11:37:37     1.2
  @@ -59,7 +59,7 @@
    * specified portlet (and associated control)
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Rapha�l Luta</a>
  - * @version $Id: PortletSkin.java,v 1.1 2001/05/27 15:34:35 raphael Exp $
  + * @version $Id: PortletSkin.java,v 1.2 2001/09/06 11:37:37 sgala Exp $
    */
   public interface PortletSkin extends java.util.Map
   {
  @@ -69,6 +69,13 @@
       public static final String TITLE_BACKGROUND_COLOR = "title-background-color";
       public static final String HIGHLIGHT_TEXT_COLOR = "highlight-text-color";
       public static final String HIGHLIGHT_BACKGROUND_COLOR = 
"highlight-background-color";
  +    public static final String PORTLET_STYLE_CLASS = "portlet-style-class";
  +    public static final String TITLE_STYLE_CLASS = "title-style-class";
  +    public static final String CONTENT_STYLE_CLASS = "content-style-class";
  +    public static final String TAB_STYLE_CLASS = "tab-style-class";
  +    public static final String TAB_TITLE_STYLE_CLASS = "tab-title-style-class";
  +    public static final String TAB_CONTENT_STYLE_CLASS = "tab-content-style-class";
  +    public static final String STYLESHEET = "stylesheet";
   
       /**
        * Returns the name of this color scheme
  @@ -147,5 +154,77 @@
        * @param titleColor the title color value in HTML format (#RRGGBB)
        */
       public void setHighlightBackgroundColor(String titleColor);
  +
  +    /**
  +     * Returns the CSS class to use for the portlet overall
  +     * @return the CSS class to use (PortletStyleClass)
  +     */
  +    public String getPortletStyleClass();
  +
  +    /**
  +     * Sets the CSS class to use for the portlet overall
  +     * @param portletStyleClass the new class to be used
  +     */
  +    public void setPortletStyleClass(String portletStyleClass);
  +
  +    /**
  +     * Returns the CSS class to use for the portlet title
  +     * @return the CSS class to use (TitleStyleClass)
  +     */
  +    public String getTitleStyleClass();
  +
  +    /**
  +     * Sets the CSS class to use for the portlet title
  +     * @param titleStyleClass the new class to be used
  +     */
  +    public void setTitleStyleClass(String titleStyleClass);
  +
  +    /**
  +     * Returns the CSS class to use for the portlet content
  +     * @return the CSS class to use (ContentStyleClass)
  +     */
  +    public String getContentStyleClass();
  +
  +    /**
  +     * Sets the CSS class to use for the portlet content
  +     * @param contentStyleClass the new class to be used
  +     */
  +    public void setContentStyleClass(String contentStyleClass);
  +
  +    /**
  +     * Returns the CSS class to use overall for the tabbed control
  +     * @return the CSS class to use (TabStyleClass)
  +     */
  +    public String getTabStyleClass();
  +
  +    /**
  +     * Sets the CSS class to use for overall for the tabbed control
  +     * @param tabStyleClass the new class to be used
  +     */
  +    public void setTabStyleClass(String tabStyleClass);
  +
  +    /**
  +     * Returns the CSS class to use on the title of the tabbed control
  +     * @return the CSS class to use (TabTitleStyleClass)
  +     */
  +    public String getTabTitleStyleClass();
  +
  +    /**
  +     * Sets the CSS class to use on the title of the tabbed control
  +     * @param tabTitleStyleClass the new class to be used
  +     */
  +    public void setTabTitleStyleClass(String tabTitleStyleClass);
  +
  +    /**
  +     * Returns the CSS class to use on the control of the tabbed control
  +     * @return the CSS class to use (TabContentStyleClass)
  +     */
  +    public String getTabContentStyleClass();
  +
  +    /**
  +     * Sets the CSS class to use on the control of the tabbed control
  +     * @param tabContentStyleClass the new class to be used
  +     */
  +    public void setTabContentStyleClass(String tabContentStyleClass);
   
   }
  
  
  
  1.2       +127 -1    
jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletSkin.java
  
  Index: BasePortletSkin.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/BasePortletSkin.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BasePortletSkin.java      2001/05/27 15:34:35     1.1
  +++ BasePortletSkin.java      2001/09/06 11:37:37     1.2
  @@ -59,7 +59,7 @@
    * as a Map of text properties
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Rapha�l Luta</a>
  - * @version $Id: BasePortletSkin.java,v 1.1 2001/05/27 15:34:35 raphael Exp $
  + * @version $Id: BasePortletSkin.java,v 1.2 2001/09/06 11:37:37 sgala Exp $
    */
   public class BasePortletSkin extends java.util.HashMap implements PortletSkin
   {
  @@ -207,6 +207,132 @@
           if (color!=null)
           {
               put(HIGHLIGHT_BACKGROUND_COLOR,color);
  +        }
  +    }    
  +
  +    /**
  +     * Returns the CSS class to use for the portlet overall
  +     * @return the CSS class to use (PortletStyleClass)
  +     */
  +    public String getPortletStyleClass()
  +    {
  +        return (String)get(PORTLET_STYLE_CLASS);
  +    }
  +
  +    /**
  +     * Sets the CSS class to use for the portlet overall
  +     * @param portletStyleClass the new class to be used
  +     */
  +    public void setPortletStyleClass(String portletStyleClass)
  +    {
  +        if (portletStyleClass!=null)
  +        {
  +            put(PORTLET_STYLE_CLASS,portletStyleClass);
  +        }
  +    }    
  +
  +    /**
  +     * Returns the CSS class to use for the portlet title
  +     * @return the CSS class to use (TitleStyleClass)
  +     */
  +    public String getTitleStyleClass()
  +    {
  +        return (String)get(TITLE_STYLE_CLASS);
  +    }
  +
  +    /**
  +     * Sets the CSS class to use for the portlet title
  +     * @param titleStyleClass the new class to be used
  +     */
  +    public void setTitleStyleClass(String titleStyleClass)
  +    {
  +        if (titleStyleClass!=null)
  +        {
  +            put(TITLE_STYLE_CLASS,titleStyleClass);
  +        }
  +    }    
  +
  +    /**
  +     * Returns the CSS class to use for the portlet content
  +     * @return the CSS class to use (ContentStyleClass)
  +     */
  +    public String getContentStyleClass()
  +    {
  +        return (String)get(CONTENT_STYLE_CLASS);
  +    }
  +
  +    /**
  +     * Sets the CSS class to use for the portlet content
  +     * @param contentStyleClass the new class to be used
  +     */
  +    public void setContentStyleClass(String contentStyleClass)
  +    {
  +        if (contentStyleClass!=null)
  +        {
  +            put(CONTENT_STYLE_CLASS,contentStyleClass);
  +        }
  +    }    
  +
  +    /**
  +     * Returns the CSS class to use overall for the tabbed control
  +     * @return the CSS class to use (TabStyleClass)
  +     */
  +    public String getTabStyleClass()
  +    {
  +        return (String)get(TAB_STYLE_CLASS);
  +    }
  +
  +    /**
  +     * Sets the CSS class to use for overall for the tabbed control
  +     * @param tabStyleClass the new class to be used
  +     */
  +    public void setTabStyleClass(String tabStyleClass)
  +    {
  +        if (tabStyleClass!=null)
  +        {
  +            put(TAB_STYLE_CLASS,tabStyleClass);
  +        }
  +    }    
  +
  +    /**
  +     * Returns the CSS class to use on the title of the tabbed control
  +     * @return the CSS class to use (TabTitleStyleClass)
  +     */
  +    public String getTabTitleStyleClass()
  +    {
  +        return (String)get(TAB_TITLE_STYLE_CLASS);
  +    }
  +
  +    /**
  +     * Sets the CSS class to use on the title of the tabbed control
  +     * @param tabTitleStyleClass the new class to be used
  +     */
  +    public void setTabTitleStyleClass(String tabTitleStyleClass)
  +    {
  +        if (tabTitleStyleClass!=null)
  +        {
  +            put(TAB_TITLE_STYLE_CLASS,tabTitleStyleClass);
  +        }
  +    }    
  +
  +    /**
  +     * Returns the CSS class to use on the control of the tabbed control
  +     * @return the CSS class to use (TabContentStyleClass)
  +     */
  +    public String getTabContentStyleClass()
  +    {
  +        return (String)get(TAB_CONTENT_STYLE_CLASS);
  +    }
  +
  +    /**
  +     * Sets the CSS class to use on the control of the tabbed control
  +     * @param tabContentStyleClass the new class to be used
  +     */
  +    public void setTabContentStyleClass(String tabContentStyleClass)
  +    {
  +        if (tabContentStyleClass!=null)
  +        {
  +            put(TAB_CONTENT_STYLE_CLASS,tabContentStyleClass);
           }
       }    
   
  
  
  
  1.4       +9 -6      
jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/html/jetspeed-tab.vm
  
  Index: jetspeed-tab.vm
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/html/jetspeed-tab.vm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jetspeed-tab.vm   2001/09/04 11:12:15     1.3
  +++ jetspeed-tab.vm   2001/09/06 11:37:37     1.4
  @@ -2,10 +2,10 @@
   #if ( ! $tabs )
   #parse ("jetspeed.vm")
   #else
  -<table cellpadding="0" cellspacing="0" border="0" width="100%">
  +<table cellpadding="0" cellspacing="0" border="0" width="100%" 
class="$!{skin.TabStyleClass}">
   <tr>
     <td valign="top">
  -    <table align="left" cellspacing="0" border="0" cellpadding="0">
  +    <table align="left" cellspacing="0" border="0" cellpadding="0" 
class="$!{skin.TabTitleStyleClass}">
         <tr width="100%">
   #foreach ( $tab in $tabs )
   #if ($tab.isSelected() )
  @@ -16,7 +16,7 @@
     #set ($color = $!{skin.TitleTextColor} )
   #end
           <td valign="middle" bgcolor="$bgcolor">
  -          <b><a #if ($tab.Link && ($tab.isSelected() == false)) href="$tab.Link" 
#end><font color="$color">$tab.Title</font></a>  </b>
  +          <b><a #if ($tab.Link && ($tab.isSelected() == false)) href="$tab.Link" 
#end style="color: $color;">$tab.Title</a>  </b>
   #foreach ($action in $tab.Actions)
            <a href="${action.Link}" title="${action.Name}"><img 
src="images/${action.Name}.gif" border="0"></a>
   #end
  @@ -37,18 +37,21 @@
     </td>
   </tr>
   </table>
  -<table cellspacing="0" width="100%" border="0" cellpadding="0">
  +<table cellspacing="0" width="100%" border="0" cellpadding="0" 
class="$!{skin.TabStyleClass}">
     <tr><td height="2" bgcolor="$!{skin.HighlightBackgroundColor}"><img height="2" 
width="2" src="images/dot.gif" /></td></tr>
     <tr><td height="2" bgcolor="$!{skin.BackgroundColor}"><img height="2" width="2" 
src="images/dot.gif" /></td></tr>
   </table>
  -<table bgcolor="$!{skin.BackgroundColor}" cellspacing="0" width="100%" border="0" 
cellpadding="0">
  +<table cellspacing="0" width="100%" border="0" cellpadding="0" 
class="$!{skin.TabStyleClass}"><tr><td>
  +<table bgcolor="$!{skin.BackgroundColor}" cellspacing="0" width="100%" 
  +       border="0" cellpadding="0" class="$!{skin.TabContentStyleClass}">
   <tr>
     <td valign="top" width="100%">
       $portlet.getContent($data)
     </td>
   </tr>
   </table>
  +</td></tr></table>
   #end
   #else
       $portlet.getContent($data)
  -#end
  \ No newline at end of file
  +#end
  
  
  
  1.4       +8 -7      
jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/html/jetspeed.vm
  
  Index: jetspeed.vm
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/html/jetspeed.vm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jetspeed.vm       2001/09/04 11:12:15     1.3
  +++ jetspeed.vm       2001/09/06 11:37:37     1.4
  @@ -1,21 +1,22 @@
   #if( ! $portlet.isClosed($data) )
  -<table border="0" bgcolor="$!{skin.BackgroundColor}" cellpadding="0" 
cellspacing="0" width="100%">
  -<tr bgcolor="$!{skin.TitleBackgroundColor}">
  -    <td align="left"  bgcolor="$!{skin.TitleBackgroundColor}" nowrap="true" 
valign="middle" width="100%">
  +<table border="0" bgcolor="$!{skin.BackgroundColor}" cellpadding="0" 
cellspacing="0" width="100%" 
  +       class="$!{skin.PortletStyleClass}">
  +<tr bgcolor="$!{skin.TitleBackgroundColor}" class="$!{skin.TitleStyleClass}">
  +    <td align="left"  bgcolor="$!{skin.TitleBackgroundColor}" 
  +        nowrap="true" valign="middle" width="100%">
         <b><font color="$!{skin.TitleTextColor}">$portlet.Title</font><b>
       </td>
       <td align="right" bgcolor="$!{skin.TitleBackgroundColor}" nowrap="true" 
valign="middle">
   #foreach ( $action in $actions )
         <a href="${action.Link}" title="${action.Name}"><img 
src="images/${action.Name}.gif" border="0"></a>
  -
  -
   #end
       </td>
   </tr>
   #if( ! $portlet.isMinimized($data) )
   <tr>
       <td colspan="2" align="center" valign="top" width="100%" >
  -        <table border="0" cellpadding="2" cellspacing="0" width="100%" 
align="center">
  +        <table border="0" cellpadding="2" cellspacing="0" 
  +               width="100%" align="center" class="$!{skin.ContentStyleClass}">
           <tr>
               <td>
                   $!portlet.getContent($data)
  @@ -26,4 +27,4 @@
   </tr>
   #end
   </table>
  -#end
  \ No newline at end of file
  +#end
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to