cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jer...@apache.org
Subject svn commit: r710083 - in /cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources: forms-field-styling.xsl js/AjaxForm.js js/common.js
Date Mon, 03 Nov 2008 15:26:22 GMT
Author: jeremy
Date: Mon Nov  3 07:26:21 2008
New Revision: 710083

URL: http://svn.apache.org/viewvc?rev=710083&view=rev
Log:
fixes for MSIE JavaScript parsing issues etc., many thanks to Roy Huang for the bug reports

Modified:
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/forms-field-styling.xsl
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/AjaxForm.js
    cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/common.js

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/forms-field-styling.xsl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/forms-field-styling.xsl?rev=710083&r1=710082&r2=710083&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/forms-field-styling.xsl
(original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/forms-field-styling.xsl
Mon Nov  3 07:26:21 2008
@@ -511,6 +511,7 @@
       <script type="text/javascript">dojo.require("dijit.form.Button");</script>
       <input id="{@id}" name="{@id}" type="submit" dojoType="dijit.form.Button" iconClass="{@iconClass}"
onClick="cocoon.forms.submitForm(this.focusNode, this.id);return false">
         <xsl:attribute name="label"><xsl:value-of select="fi:label/node()"/></xsl:attribute>
+        <xsl:attribute name="value"><xsl:value-of select="fi:label/node()"/></xsl:attribute>
         <xsl:apply-templates select="." mode="styling"/>
       </input>
       <xsl:if test="fi:hint"><span dojoType="dijit.Tooltip" connectId="{@id}" position="above,below"><xsl:value-of
select="fi:hint/node()"/></span></xsl:if>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/AjaxForm.js
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/AjaxForm.js?rev=710083&r1=710082&r2=710083&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/AjaxForm.js
(original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/AjaxForm.js
Mon Nov  3 07:26:21 2008
@@ -58,7 +58,7 @@
             content: content,
             form: this.domNode,
             handleAs: "xml",
-            handle: dojo.hitch(this, function(response, ioArgs) { this._handleBrowserUpdate(this,
name, response, ioArgs) })
+            handle: dojo.hitch(this, function(response, ioArgs) { this._handleBrowserUpdate(this,
name, response, ioArgs); })
         };
         // choose a transport
         if (this.checkForActiveFile(this.domNode)) {            /* check for file-upload
fields */
@@ -74,7 +74,7 @@
         // Toggle the click target off, so it does not get resubmitted if another submit
is fired before this has finished
         // NB. This must be done after the form is assembled by dojo, or certain onChange
handlers may fail
         // Avoid the use of this.lastClickTarget as it may already be out of date
-        if (this.domNode[name]) this.domNode[name].disabled = true;
+        if (this.domNode[name]) { this.domNode[name].disabled = true; }
         dojo.publish(this.getAfterSubmitTopic());
     },
 
@@ -98,7 +98,7 @@
             cocoon.ajax.BUHandler.handleError("No xml answer");
         } else {
             // add the continue handler for CForms
-            updater.handlers['continue'] = function() { widget._continue(); }
+            updater.handlers['continue'] = function() { widget._continue(); };
             // Handle browser update directives
             updater.processResponse(response);
         }

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/common.js
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/common.js?rev=710083&r1=710082&r2=710083&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/common.js
(original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/blocks/forms/resources/org/apache/cocoon/forms/resources/js/common.js
Mon Nov  3 07:26:21 2008
@@ -46,7 +46,7 @@
         element = element.parentNode;
     }
     return element;
-}
+};
 
 /**
  * Submits a form.
@@ -68,8 +68,8 @@
 
     if (!name) name = element.name;
 
-    var dojoId = form.id;
-    if (dojoId) {
+    var formId = form.id;
+    if (dojo && formId) {
         // Delegate to the SimpleForm or AjaxForm widget
         dijit.byId(dojoId).submit(name, params);
     } else {
@@ -81,7 +81,7 @@
             cocoon.forms.fullPageSubmit(form, name, params);
         //}
     }
-}
+};
 
 /**
  * Internal function
@@ -125,7 +125,7 @@
     if (handler && typeof(handler.forms_onload) === "function") {
         cocoon.forms.onLoadHandlers.push(handler);
     }
-}
+};
 
 /**
  * call the onLoad Handlers (typically this function is passed to dojo.addOnLoad)
@@ -138,7 +138,7 @@
     }
     // Reset it (we do not need them anymore)
     cocoon.forms.onLoadHandlers = new Array();
-}
+};
 
 /**
  * onSubmit Handlers
@@ -167,11 +167,11 @@
                 if (!cocoon.forms.onSubmitHandlers[id]) cocoon.forms.onSubmitHandlers[id]
= new Array();
                 cocoon.forms.onSubmitHandlers[id].push(handler);
             } else {
-                if (dojo) console.warn("WARNING: SubmitHandler not added. There is no id
attribute on your form.");
+                if (console) console.warn("WARNING: SubmitHandler not added. There is no
id attribute on your form.");
             }
         }
     }
-}
+};
 
 /**
  * call the onSubmit Handlers
@@ -204,7 +204,7 @@
     // TODO: if AjaxForm were to start calling submit handlers, this would need to change
     //cocoon.forms.onSubmitHandlers[id] = null;
     return true;
-}
+};
 
 
 /**
@@ -230,8 +230,6 @@
         "l10n-integer":  {places: 0, min: -2147483648, max: 2147483647}, // FormattingIntegerConverter
         "l10n-long":     {places: 0, min:-9223372036854775808, max: 9223372036854775807},
// FormattingLongConverter
         "l10n-number":   {type: "decimal"}, // FormattingDecimalConverter, FormattingFloatConverter,
FormattingDoubleConverter
-        "l10n-percent":  {type: "percent"}, // FormattingDecimalConverter - percent variant
-    
+        "l10n-percent":  {type: "percent"} // FormattingDecimalConverter - percent variant
     }
-    
-}
+};



Mime
View raw message