You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by je...@apache.org on 2008/09/11 20:20:26 UTC

svn commit: r694392 - /cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/resources/forms-samples-styling.xsl

Author: jeremy
Date: Thu Sep 11 11:20:25 2008
New Revision: 694392

URL: http://svn.apache.org/viewvc?rev=694392&view=rev
Log:
add dojo theme to body, remove resources-uri parameter from xslt, replaced by several params, to allow easier adaption to Cocoon 2.2 which specifies the location of each lib seperately.

Modified:
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/resources/forms-samples-styling.xsl

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/resources/forms-samples-styling.xsl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/resources/forms-samples-styling.xsl?rev=694392&r1=694391&r2=694392&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/resources/forms-samples-styling.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/samples/resources/forms-samples-styling.xsl Thu Sep 11 11:20:25 2008
@@ -22,13 +22,12 @@
       | 'forms-field-styling.xsl' the latter one is imported there. If you don't
       | want advanced styling of widgets, change it here!
       | See xsl:include as composition and xsl:import as extension/inheritance.
+      |
+      | @version $Id$
       +-->
   <xsl:include href="resource://org/apache/cocoon/forms/resources/forms-page-styling.xsl"/>
   <xsl:include href="resource://org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl"/>
-
-  <!-- Location of the resources directory, where JS libs and icons are stored -->
-  <xsl:param name="resources-uri">resources</xsl:param>
-  
+ 
   <xsl:template match="head">
     <head>
       <xsl:apply-templates select="." mode="forms-page"/>
@@ -38,7 +37,13 @@
   </xsl:template>
 
   <xsl:template match="body">
-    <body>
+    <xsl:variable name="class">
+      <xsl:choose>
+        <xsl:when test="@class != ''"><xsl:value-of select="concat($dojo-theme, ' ', @class)"/></xsl:when><!-- append the dojo-theme to existing classes -->
+        <xsl:otherwise><xsl:value-of select="$dojo-theme"/></xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <body class="{$class}"><!-- ensure we get a dojo-theme setup -->
       <!--+ !!! If template with mode 'forms-page' adds text or elements
           |        template with mode 'forms-field' can no longer add attributes!!!
           +-->