cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/woody/samples/resources woody-page-styling.xsl woody-field-styling.xsl woody-calendar-styling.xsl woody-advanced-field-styling.xsl
Date Mon, 26 Jan 2004 17:33:57 GMT
joerg       2004/01/26 09:33:57

  Modified:    src/blocks/woody/samples/resources woody-page-styling.xsl
                        woody-field-styling.xsl woody-calendar-styling.xsl
                        woody-advanced-field-styling.xsl
  Log:
  - no styling in the HTML code (@align, @valign) - we should introduce CSS classes for it
  - removed deprecated attribute @language on script elements
  - separated label template
  - no label output for wi:action for not only @layout="columns"
  
  Revision  Changes    Path
  1.19      +29 -26    cocoon-2.1/src/blocks/woody/samples/resources/woody-page-styling.xsl
  
  Index: woody-page-styling.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/samples/resources/woody-page-styling.xsl,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- woody-page-styling.xsl	23 Jan 2004 13:03:57 -0000	1.18
  +++ woody-page-styling.xsl	26 Jan 2004 17:33:57 -0000	1.19
  @@ -1,10 +1,8 @@
   <?xml version="1.0"?>
  -
   <xsl:stylesheet version="1.0"
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns:wi="http://apache.org/cocoon/woody/instance/1.0"
                   exclude-result-prefixes="wi">
  -
     <!--+
         | This stylesheet is designed to be included by 'woody-samples-styling.xsl'.
         +-->
  @@ -159,7 +157,7 @@
       Group items layout : default is no layout
     -->
     <xsl:template match="wi:group" mode="group-layout">
  -    <xsl:apply-templates select="wi:items/node()"/>
  +    <xsl:apply-templates select="wi:items/*"/>
     </xsl:template>
   
     <!--
  @@ -178,13 +176,19 @@
     -->
     <xsl:template match="wi:*" mode="group-column-content">
       <tr>
  -      <td valign="top"><label for="{@id}" title="{wi:hint}"><xsl:copy-of
select="wi:label/node()"/></label></td>
  +      <td><xsl:apply-templates select="." mode="label"/></td>
       </tr>
       <tr>
         <td><xsl:apply-templates select="."/></td>
       </tr>
     </xsl:template>
   
  +  <xsl:template match="wi:action" mode="group-column-content">
  +    <tr>
  +      <td><xsl:apply-templates select="."/></td>
  +    </tr>
  +  </xsl:template>
  +
     <!--
       Columns group items layout
     -->
  @@ -200,8 +204,8 @@
       Default columns layout : label left and input right
     -->
     <xsl:template match="wi:*" mode="group-columns-content">
  -    <tr valign="baseline">
  -      <td valign="top"><label for="{@id}" title="{wi:hint}"><xsl:copy-of
select="wi:label/node()"/></label></td>
  +    <tr>
  +      <td><xsl:apply-templates select="." mode="label"/></td>
         <td><xsl:apply-templates select="."/></td>
       </tr>
     </xsl:template>
  @@ -223,14 +227,13 @@
       Default row layout : label left and input right
     -->
     <xsl:template match="wi:*" mode="group-row-content">
  -    <td valign="top">
  -      <label for="{@id}" title="{wi:hint}">
  -        <xsl:copy-of select="wi:label/node()"/>
  -      </label>
  -    </td>
  +    <td><xsl:apply-templates select="." mode="label"/></td>
       <td><xsl:apply-templates select="."/></td>
     </xsl:template>
   
  +  <xsl:template match="wi:action" mode="group-row-content">
  +    <td><xsl:apply-templates select="."/></td>
  +  </xsl:template>
     <!--
       Rows group items layout
     -->
  @@ -251,11 +254,11 @@
       Default rows layout : label above and input below
     -->
     <xsl:template match="wi:*" mode="group-rows-labels">
  -    <td valign="top">
  -      <label for="{@id}" title="{wi:hint}">
  -        <xsl:copy-of select="wi:label/node()"/>
  -      </label>
  -    </td>
  +    <td><xsl:apply-templates select="." mode="label"/></td>
  +  </xsl:template>
  +
  +  <xsl:template match="wi:action" mode="group-rows-labels">
  +    <td>&#160;</td>
     </xsl:template>
   
     <xsl:template match="wi:*" mode="group-rows-content">
  @@ -267,9 +270,7 @@
       <tr>
         <td colspan="2">
           <xsl:apply-templates select="."/>
  -        <label for="{@id}">
  -          <xsl:copy-of select="wi:label/node()"/>
  -        </label>
  +        <xsl:apply-templates select="." mode="label"/>
         </td>
       </tr>
     </xsl:template>
  @@ -291,14 +292,10 @@
     <!-- double-list multivaluefield : lists under the label -->
     <xsl:template match="wi:multivaluefield[wi:styling/@list-type='double-listbox']"
                   mode="group-columns-content">
  -    <tr align="center">
  -      <td colspan="2">
  -        <label for="{@id}">
  -          <xsl:copy-of select="wi:label/node()"/>
  -        </label>
  -      </td>
  +    <tr>
  +      <td colspan="2"><xsl:apply-templates select="." mode="label"/></td>
       </tr>
  -    <tr align="center">
  +    <tr>
         <td colspan="2"><xsl:apply-templates select="."/></td>
       </tr>
     </xsl:template>
  @@ -308,6 +305,12 @@
       <tr>
         <td colspan="2"><xsl:apply-templates select="."/></td>
       </tr>
  +  </xsl:template>
  +
  +  <xsl:template match="wi:*" mode="label">
  +    <label for="{@id}" title="{wi:hint}">
  +      <xsl:copy-of select="wi:label/node()"/>
  +    </label>
     </xsl:template>
   
     <xsl:template match="@*|node()" priority="-1">
  
  
  
  1.38      +8 -10     cocoon-2.1/src/blocks/woody/samples/resources/woody-field-styling.xsl
  
  Index: woody-field-styling.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/samples/resources/woody-field-styling.xsl,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- woody-field-styling.xsl	23 Jan 2004 16:19:11 -0000	1.37
  +++ woody-field-styling.xsl	26 Jan 2004 17:33:57 -0000	1.38
  @@ -1,10 +1,8 @@
   <?xml version="1.0"?>
  -
   <xsl:stylesheet version="1.0"
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns:wi="http://apache.org/cocoon/woody/instance/1.0"
                   exclude-result-prefixes="wi">
  -
     <!--+
         | This stylesheet is designed to be included by 'woody-samples-styling.xsl'.
         +-->
  @@ -13,9 +11,9 @@
     <xsl:param name="resources-uri">resources</xsl:param>
   
     <xsl:template match="head" mode="woody-field">
  -    <script src="{$resources-uri}/mattkruse-lib/AnchorPosition.js" language="JavaScript"
type="text/javascript"/>
  -    <script src="{$resources-uri}/mattkruse-lib/PopupWindow.js" language="JavaScript"
type="text/javascript"/>
  -    <script src="{$resources-uri}/woody-lib.js" language="JavaScript" type="text/javascript"/>
  +    <script src="{$resources-uri}/mattkruse-lib/AnchorPosition.js" type="text/javascript"/>
  +    <script src="{$resources-uri}/mattkruse-lib/PopupWindow.js" type="text/javascript"/>
  +    <script src="{$resources-uri}/woody-lib.js" type="text/javascript"/>
       <link rel="stylesheet" type="text/css" href="{$resources-uri}/woody.css"/>
     </xsl:template>
   
  @@ -105,7 +103,7 @@
       <div class="woody-help" id="help{generate-id()}" style="visibility:hidden; position:absolute;">
         <xsl:apply-templates select="node()"/>
       </div>
  -    <script language="JavaScript" type="text/javascript">
  +    <script type="text/javascript">
         var helpWin<xsl:value-of select="generate-id()"/> = woody_createPopupWindow('help<xsl:value-of
select="generate-id()"/>');
       </script>
       <a id="{generate-id()}" href="#" onclick="helpWin{generate-id()}.showPopup('{generate-id()}');return
false;"><img border="0" src="resources/help.gif"/></a>
  @@ -412,23 +410,23 @@
           <tr>
             <xsl:choose>
               <xsl:when test="self::wi:repeater">
  -              <td valign="top" colspan="2">
  +              <td colspan="2">
                   <xsl:apply-templates select="."/>
                 </td>
               </xsl:when>
               <xsl:when test="self::wi:booleanfield">
                 <td>&#160;</td>
  -              <td valign="top">
  +              <td>
                   <xsl:apply-templates select="."/>
                   <xsl:text> </xsl:text>
                   <xsl:copy-of select="wi:label"/>
                 </td>
               </xsl:when>
               <xsl:otherwise>
  -              <td valign="top">
  +              <td>
                   <xsl:copy-of select="wi:label"/>
                 </td>
  -              <td valign="top">
  +              <td>
                   <xsl:apply-templates select="."/>
                 </td>
               </xsl:otherwise>
  
  
  
  1.9       +3 -5      cocoon-2.1/src/blocks/woody/samples/resources/woody-calendar-styling.xsl
  
  Index: woody-calendar-styling.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/samples/resources/woody-calendar-styling.xsl,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- woody-calendar-styling.xsl	23 Jan 2004 14:47:13 -0000	1.8
  +++ woody-calendar-styling.xsl	26 Jan 2004 17:33:57 -0000	1.9
  @@ -1,10 +1,8 @@
   <?xml version="1.0"?>
  -
   <xsl:stylesheet version="1.0"
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns:wi="http://apache.org/cocoon/woody/instance/1.0"
                   exclude-result-prefixes="wi">
  -
     <!--+
         | This stylesheet is designed to be included by 'woody-advanced-styling.xsl'.
         +-->
  @@ -13,9 +11,9 @@
     <xsl:param name="resources-uri">resources</xsl:param>
   
     <xsl:template match="head" mode="woody-calendar">
  -    <script src="{$resources-uri}/mattkruse-lib/CalendarPopup.js" language="JavaScript"
type="text/javascript"/>
  -    <script src="{$resources-uri}/mattkruse-lib/date.js" language="JavaScript" type="text/javascript"/>
  -    <script language="JavaScript" type="text/javascript">
  +    <script src="{$resources-uri}/mattkruse-lib/CalendarPopup.js" type="text/javascript"/>
  +    <script src="{$resources-uri}/mattkruse-lib/date.js" type="text/javascript"/>
  +    <script type="text/javascript">
         // Setup calendar
         var woody_calendar = CalendarPopup('woody_calendarDiv');
         woody_calendar.setWeekStartDay(1);
  
  
  
  1.6       +4 -6      cocoon-2.1/src/blocks/woody/samples/resources/woody-advanced-field-styling.xsl
  
  Index: woody-advanced-field-styling.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/woody/samples/resources/woody-advanced-field-styling.xsl,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- woody-advanced-field-styling.xsl	22 Jan 2004 18:02:38 -0000	1.5
  +++ woody-advanced-field-styling.xsl	26 Jan 2004 17:33:57 -0000	1.6
  @@ -1,10 +1,8 @@
   <?xml version="1.0"?>
  -
   <xsl:stylesheet version="1.0"
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                   xmlns:wi="http://apache.org/cocoon/woody/instance/1.0"
                   exclude-result-prefixes="wi">
  -
     <!--+
         | This stylesheet is designed to be included by 'woody-samples-styling.xsl'.
         | It extends the 'woody-field-styling.xsl' with additional stylings.
  @@ -19,8 +17,8 @@
   
     <xsl:template match="head" mode="woody-field">
       <xsl:apply-imports/>
  -    <script src="{$resources-uri}/mattkruse-lib/OptionTransfer.js" language="JavaScript"
type="text/javascript"/>
  -    <script src="{$resources-uri}/mattkruse-lib/selectbox.js" language="JavaScript"
type="text/javascript"/>
  +    <script src="{$resources-uri}/mattkruse-lib/OptionTransfer.js" type="text/javascript"/>
  +    <script src="{$resources-uri}/mattkruse-lib/selectbox.js" type="text/javascript"/>
       <xsl:apply-templates select="." mode="woody-calendar"/>
     </xsl:template>
   
  @@ -75,7 +73,7 @@
                 </xsl:for-each>
               </select>
             </td>
  -          <td align="center" valign="middle">
  +          <td>
               <!-- command buttons -->
               <!-- strangely, IE adds an extra blank line if there only a button on a
line. So we surround it with nbsp -->
               <xsl:text>&#160;</xsl:text>
  @@ -113,7 +111,7 @@
             </td>
           </tr>
         </table>
  -      <script language="JavaScript" type="text/javascript">
  +      <script type="text/javascript">
           var opt<xsl:value-of select="generate-id()"/> = woody_createOptionTransfer('<xsl:value-of
select="@id"/>');
         </script>
       </span>
  
  
  

Mime
View raw message