cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r106711 - in cocoon/trunk/src/blocks/forms/samples: flow forms resources
Date Sat, 27 Nov 2004 14:08:24 GMT
Author: reinhard
Date: Sat Nov 27 06:08:24 2004
New Revision: 106711

URL: http://svn.apache.org/viewcvs?view=rev&rev=106711
Log:
remove unnecessary after-load hanlder and use onload-hanlder instead; minor example tweaks
Modified:
   cocoon/trunk/src/blocks/forms/samples/flow/htmlarea.js
   cocoon/trunk/src/blocks/forms/samples/forms/htmlarea.xml
   cocoon/trunk/src/blocks/forms/samples/resources/forms-htmlarea-styling.xsl
   cocoon/trunk/src/blocks/forms/samples/resources/forms-lib.js
   cocoon/trunk/src/blocks/forms/samples/resources/forms-samples-styling.xsl

Modified: cocoon/trunk/src/blocks/forms/samples/flow/htmlarea.js
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/flow/htmlarea.js?view=diff&rev=106711&p1=cocoon/trunk/src/blocks/forms/samples/flow/htmlarea.js&r1=106710&p2=cocoon/trunk/src/blocks/forms/samples/flow/htmlarea.js&r2=106711
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/flow/htmlarea.js	(original)
+++ cocoon/trunk/src/blocks/forms/samples/flow/htmlarea.js	Sat Nov 27 06:08:24 2004
@@ -22,7 +22,7 @@
 
     var model = form.getModel();
     var htmldata = { 
-                      "data1" : new Packages.org.apache.cocoon.xml.StringXMLizable(model.data1),
+                      "data1" : model.data1,
                       "data2" : new Packages.org.apache.cocoon.xml.StringXMLizable(model.data2)
                    }
     cocoon.sendPage("htmlarea-success-pipeline", htmldata);

Modified: cocoon/trunk/src/blocks/forms/samples/forms/htmlarea.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/forms/htmlarea.xml?view=diff&rev=106711&p1=cocoon/trunk/src/blocks/forms/samples/forms/htmlarea.xml&r1=106710&p2=cocoon/trunk/src/blocks/forms/samples/forms/htmlarea.xml&r2=106711
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/forms/htmlarea.xml	(original)
+++ cocoon/trunk/src/blocks/forms/samples/forms/htmlarea.xml	Sat Nov 27 06:08:24 2004
@@ -21,9 +21,7 @@
   <fd:widgets>
     <fd:field id="data1">
       <fd:label>in div; configuration within cForms template</fd:label>
-      <fd:datatype base="string">
-        <fd:convertor type="htmlcleaner" config="resource://org/apache/cocoon/forms/datatype/convertor/HtmlCleanerConfiguration.xml"/>
-      </fd:datatype>
+      <fd:datatype base="string"/>
     </fd:field>    
     <fd:field id="data2">
       <fd:label>in a table</fd:label>

Modified: cocoon/trunk/src/blocks/forms/samples/resources/forms-htmlarea-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/resources/forms-htmlarea-styling.xsl?view=diff&rev=106711&p1=cocoon/trunk/src/blocks/forms/samples/resources/forms-htmlarea-styling.xsl&r1=106710&p2=cocoon/trunk/src/blocks/forms/samples/resources/forms-htmlarea-styling.xsl&r2=106711
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/resources/forms-htmlarea-styling.xsl	(original)
+++ cocoon/trunk/src/blocks/forms/samples/resources/forms-htmlarea-styling.xsl	Sat Nov 27
06:08:24 2004
@@ -52,7 +52,7 @@
         <script  type="text/javascript">
           var handler = new Object();    
           handler.fieldId = "<xsl:value-of select="@id"/>";     
-          handler.forms_afterLoad = function() {
+          handler.forms_onload = function() {
             var id = "<xsl:value-of select="@id"/>";
             var textarea = document.getElementById(id);
             var editor = new HTMLArea(id);
@@ -61,7 +61,7 @@
             <xsl:value-of select="fi:styling/conf/text()"/>
             editor.generate();
           }
-          forms_afterLoadHandler.push(handler);      
+          forms_onloadHandlers.push(handler);      
         </script>        
       </xsl:when>
       <!-- use a passed configuration function -->
@@ -73,8 +73,8 @@
             alert("<xsl:value-of select="fi:styling/initFunction"/> is not a function
" +
             or not available! Can't render widget '<xsl:value-of select="@id"/>'");
           }
-          handler.forms_afterLoad = <xsl:value-of select="fi:styling/initFunction"/>;
-          forms_afterLoadHandler.push(handler);   
+          handler.forms_onload = <xsl:value-of select="fi:styling/initFunction"/>;
+          forms_onloadHandlers.push(handler);   
         </script>
       </xsl:when>    
       <!-- default mode with all buttons available -->  
@@ -82,10 +82,10 @@
         <script  type="text/javascript">
           var handler = new Object();    
           handler.fieldId = "<xsl:value-of select="@id"/>";     
-          handler.forms_afterLoad = function() {
+          handler.forms_onload = function() {
             HTMLArea.replace('<xsl:value-of select="@id"/>');
           }
-          forms_afterLoadHandler.push(handler);      
+          forms_onloadHandlers.push(handler);      
         </script>  
       </xsl:otherwise>
     </xsl:choose>

Modified: cocoon/trunk/src/blocks/forms/samples/resources/forms-lib.js
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/resources/forms-lib.js?view=diff&rev=106711&p1=cocoon/trunk/src/blocks/forms/samples/resources/forms-lib.js&r1=106710&p2=cocoon/trunk/src/blocks/forms/samples/resources/forms-lib.js&r2=106711
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/resources/forms-lib.js	(original)
+++ cocoon/trunk/src/blocks/forms/samples/resources/forms-lib.js	Sat Nov 27 06:08:24 2004
@@ -31,18 +31,6 @@
     forms_onloadHandlers = null;
 }
 
-// Handlers that are to be called at the end of the document
-// (called before the closing body element)
-var forms_afterLoadHandler = new Array();
-
-function forms_afterLoad() {
-    for (var i = 0; i < forms_afterLoadHandler.length; i++) {
-        forms_afterLoadHandler[i].forms_afterLoad(forms_afterLoadHandler[i].fieldId);
-    }
-    // Clear it (we no more need them)
-    forms_afterLoadHandler = null;
-}
-
 // Handlers that are to be called in form's "onsubmit" event
 // FIXME: this single var implies only one form per page, and needs to be
 //       visited if we decide to support several forms per page.

Modified: cocoon/trunk/src/blocks/forms/samples/resources/forms-samples-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/forms/samples/resources/forms-samples-styling.xsl?view=diff&rev=106711&p1=cocoon/trunk/src/blocks/forms/samples/resources/forms-samples-styling.xsl&r1=106710&p2=cocoon/trunk/src/blocks/forms/samples/resources/forms-samples-styling.xsl&r2=106711
==============================================================================
--- cocoon/trunk/src/blocks/forms/samples/resources/forms-samples-styling.xsl	(original)
+++ cocoon/trunk/src/blocks/forms/samples/resources/forms-samples-styling.xsl	Sat Nov 27 06:08:24
2004
@@ -40,8 +40,7 @@
           +-->
       <xsl:apply-templates select="." mode="forms-page"/>
       <xsl:apply-templates select="." mode="forms-field"/>
-      <xsl:apply-templates/>
-      <xsl:apply-templates select="." mode="forms-afterload"/>       
+      <xsl:apply-templates/>   
     </body>
   </xsl:template>
 

Mime
View raw message