You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by sy...@apache.org on 2006/03/14 16:57:08 UTC
svn commit: r385819 -
/cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl
Author: sylvain
Date: Tue Mar 14 07:56:50 2006
New Revision: 385819
URL: http://svn.apache.org/viewcvs?rev=385819&view=rev
Log:
Add "inplace-area" styling for text areas
Modified:
cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl
Modified: cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl?rev=385819&r1=385818&r2=385819&view=diff
==============================================================================
--- cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl (original)
+++ cocoon/trunk/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl Tue Mar 14 07:56:50 2006
@@ -225,8 +225,11 @@
<!--+
| Field with in-place editing
+ | Reacts to 2 different types:
+ | - 'inplace' for a single line input
+ | - 'inplace-area' for a textarea
+-->
- <xsl:template match="fi:field[fi:styling/@type='inplace' and @state='active']">
+ <xsl:template match="fi:field[fi:styling[@type='inplace' or @type='inplace-area'] and @state='active']">
<span id="{@id}">
<span dojoType="InlineEditBox" onSave="dojo.byId('{@id}:input').value = arguments[0]">
<xsl:attribute name="onSave">
@@ -239,6 +242,11 @@
<xsl:text>:input'))</xsl:text>
</xsl:if>
</xsl:attribute>
+ <xsl:if test="fi:styling/@type='inplace-area'">
+ <xsl:attribute name="mode">
+ <xsl:text>textarea</xsl:text>
+ </xsl:attribute>
+ </xsl:if>
<xsl:choose>
<xsl:when test="fi:value">
<xsl:value-of select="fi:value"/>