You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by lg...@apache.org on 2005/12/25 16:30:43 UTC

svn commit: r358976 - /cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl

Author: lgawron
Date: Sun Dec 25 07:30:23 2005
New Revision: 358976

URL: http://svn.apache.org/viewcvs?rev=358976&view=rev
Log:
<input> element (although hidden) being a child of <table> introduces unnecessary line break 

Modified:
    cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl

Modified: cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl
URL: http://svn.apache.org/viewcvs/cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl?rev=358976&r1=358975&r2=358976&view=diff
==============================================================================
--- cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl (original)
+++ cocoon/blocks/forms/trunk/java/org/apache/cocoon/forms/resources/forms-field-styling.xsl Sun Dec 25 07:30:23 2005
@@ -37,11 +37,11 @@
     <xsl:copy-of select="@*"/>
     <xsl:attribute name="onload">forms_onload();<xsl:value-of select="@onload"/></xsl:attribute>
   </xsl:template>
-  
+
   <xsl:template match="body" mode="forms-afterload">
     <script language="Javascript">
        forms_afterLoad();
-    </script>   
+    </script>
   </xsl:template>
 
   <!--+
@@ -92,12 +92,12 @@
     <xsl:if test="@listening = 'true' and not(fi:styling/@submit-on-change = 'false') and not(fi:styling/@onchange)">
       <xsl:attribute name="onchange">forms_submitForm(this)</xsl:attribute>
     </xsl:if>
-   
+
   	<xsl:if test="@state = 'disabled'">
   		<xsl:attribute name="disabled">disabled</xsl:attribute>
   	</xsl:if>
 
-    <!--+ 
+    <!--+
         | @listbox-size needs to be handled separately as even if it is not
         | specified some output (@size) must be generated.
         +-->
@@ -132,7 +132,7 @@
   </xsl:template>
 
   <xsl:template match="fi:styling/@type" mode="styling" priority="1">
-    <!--+ 
+    <!--+
         | Do we have a duplicate semantic usage of @type?
         | @type is only a marker for the stylesheet in general, but some of the
         | types must/should be in the HTML output too.
@@ -153,7 +153,7 @@
         <xsl:value-of select="substring-before($text,$pattern)"/>
         <xsl:text>\'</xsl:text>
         <xsl:call-template name="apos-replace">
-          <xsl:with-param name="text" 
+          <xsl:with-param name="text"
             select="substring-after($text,$pattern)"/>
         </xsl:call-template>
       </xsl:when>
@@ -338,7 +338,7 @@
 
   <!--+
       | fi:booleanfield : produce a checkbox
-      | A hidden booleanfield is not a checkbox, so 'value' contains 
+      | A hidden booleanfield is not a checkbox, so 'value' contains
       | the value and not the checked attribute
       +-->
   <xsl:template match="fi:booleanfield">
@@ -384,13 +384,13 @@
     </input>
   </xsl:template>
 
-  <!--+ 
-      | fi:action, link-style 	 
-      +--> 	 
-  <xsl:template match="fi:action[fi:styling/@type = 'link']" priority="1"> 	 
-    <a id="{@id}" title="{fi:hint}" href="#" onclick="forms_submitForm(this, '{@id}'); return false"> 	 
-      <xsl:apply-templates select="." mode="styling"/> 	 
-      <xsl:copy-of select="fi:label/node()"/> 	 
+  <!--+
+      | fi:action, link-style
+      +-->
+  <xsl:template match="fi:action[fi:styling/@type = 'link']" priority="1">
+    <a id="{@id}" title="{fi:hint}" href="#" onclick="forms_submitForm(this, '{@id}'); return false">
+      <xsl:apply-templates select="." mode="styling"/>
+      <xsl:copy-of select="fi:label/node()"/>
     </a>
   </xsl:template>
 
@@ -500,7 +500,7 @@
   <xsl:template match="fi:upload[@state='output']" priority="3">
       <span id="{@id}"><xsl:copy-of select="fi:value/node()"/></span>
   </xsl:template>
-  
+
   <!--+
       | fi:imagemap
       +-->
@@ -508,13 +508,13 @@
       <input type ="image" name="{@id}" src="{@imageuri}" title="{fi:hint}" ismap="true">
           <xsl:apply-templates select="." mode="styling"/>
       </input>
-  </xsl:template>  
+  </xsl:template>
   <!--+
       | fi:repeater
       +-->
   <xsl:template match="fi:repeater">
+    <input type="hidden" name="{@id}.size" value="{@size}"/>
     <table id="{@id}" border="1">
-      <input type="hidden" name="{@id}.size" value="{@size}"/>
       <tr>
         <xsl:for-each select="fi:headings/fi:heading">
           <th><xsl:value-of select="."/></th>
@@ -545,7 +545,7 @@
   </xsl:template>
 
   <!--+
-      | fi:form-template|fi:form-generated 
+      | fi:form-template|fi:form-generated
       +-->
   <xsl:template match="fi:form-template|fi:form-generated">
     <form>
@@ -557,7 +557,7 @@
         <script type="text/javascript">cocoon.forms.ajax = true;</script>
       </xsl:if>
       <xsl:apply-templates/>
-      
+
       <!-- TODO: consider putting this in the xml stream from the generator? -->
       <xsl:if test="self::fi:form-generated">
         <input type="submit"/>
@@ -664,19 +664,19 @@
       </div>
     </xsl:if>
   </xsl:template>
-  
+
   <xsl:template match="fi:union">
     <div id="{@id}">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
-  
+
   <xsl:template match="fi:repeater-template">
     <div id="{@id}">
       <xsl:apply-templates/>
     </div>
   </xsl:template>
-  
+
   <!--+
       | fi:placeholder - used to represent invisible widgets so that AJAX updates
       | know where to insert the widget if it becomes visible
@@ -684,7 +684,7 @@
   <xsl:template match="fi:placeholder">
     <span id="{@id}"/>
   </xsl:template>
-  
+
   <!--+
       | fi:struct - has no visual representation by default
       +-->