cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo <agalla...@agssa.net>
Subject Re: svn commit: r473974 - in /cocoon/trunk/blocks: cocoon-ajax/cocoon-ajax-impl/src/main/resources/org/apache/cocoon/ajax/resources/js/ cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/ cocoon-forms/cocoon-forms-impl/src/...
Date Sun, 12 Nov 2006 23:41:26 GMT
Hi Jeremy,

Nice work. Please look into the small issues below:

jeremy@apache.org escribió:
> Author: jeremy
> Date: Sun Nov 12 07:28:08 2006
> New Revision: 473974
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=473974
> Log:
> Adding support for Dojo's IframeIO to CForms.
> This allows forms with file-upload fields to be submitted as a background AJAX process.
Currently this is turned off for Safari where is is not working.
>
> Added:
>     cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/IframeTransport-bu-styling.xsl
> Modified:
>     cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-impl/src/main/resources/org/apache/cocoon/ajax/resources/js/BUHandler.js
>     cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsForm.js
>     cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/common.js
>     cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/sitemap.xmap
>
> Modified: cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-impl/src/main/resources/org/apache/cocoon/ajax/resources/js/BUHandler.js
> URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-impl/src/main/resources/org/apache/cocoon/ajax/resources/js/BUHandler.js?view=diff&rev=473974&r1=473973&r2=473974
> ==============================================================================
> --- cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-impl/src/main/resources/org/apache/cocoon/ajax/resources/js/BUHandler.js
(original)
> +++ cocoon/trunk/blocks/cocoon-ajax/cocoon-ajax-impl/src/main/resources/org/apache/cocoon/ajax/resources/js/BUHandler.js
Sun Nov 12 07:28:08 2006
> @@ -38,66 +38,71 @@
>  
>  dojo.lang.extend(cocoon.ajax.BUHandler, {
>      // Default highlight effect
> -    highlight: null,
> +	highlight: null,
>      
> -    processResponse: function(doc, request) {
> -	    var nodes = doc.documentElement.childNodes;
> -	    for (var i = 0; i < nodes.length; i++) {
> -	        var node = nodes[i];
> -	        if (node.nodeType == dojo.dom.ELEMENT_NODE) {
> -	            var handler;
> -	            if (node.localName) {
> -	                handler = node.localName;
> -	            } else {
> -	                // No DOM2 support (IE6)
> -	                handler = node.nodeName.replace(/.*:/, "");
> -	            }
> -	            var handlerFunc = this.handlers[handler];
> -	            if (handlerFunc) {
> -	                handlerFunc(node);
> -	            } else {
> -	                this.handleError("No handler found for element " + handler, request);
> -	            }
> -	        }
> -	    }
> +  processResponse: function(doc, request) {
> +		var base = doc.documentElement;
> +		
> +		var nodes = [];
> +		if (base.nodeName.toLowerCase() == "bu:document") {
> +			nodes = base.childNodes;
> +			dojo.debug("got response using: XMLHTTPTransport");
> +		} else {
> +			nodes = dojo.byId("browser-update", doc).childNodes;
> +			dojo.debug("got response using: IframeTransport");
> +		}
> +		for (var i = 0; i < nodes.length; i++) {
> +			var node = nodes[i];
> +			if (node.nodeType == dojo.dom.ELEMENT_NODE) {
> +				var handler = node.nodeName.replace(/.*:/, "").toLowerCase();
> +				if (handler == "textarea") handler = node.getAttribute("name");
> +				var handlerFunc = this.handlers[handler];
> +				if (handlerFunc) {
> +					handlerFunc(node);
> +				} else {
> +					this.handleError("No handler found for element " + handler, request);
> +				}
> +			}
> +		}
>  	},
>   
We use 4 spaces for tabs.

> Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsForm.js
> URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsForm.js?view=diff&rev=473974&r1=473973&r2=473974
> ==============================================================================
> --- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsForm.js
(original)
> +++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/js/CFormsForm.js
Sun Nov 12 07:28:08 2006
> @@ -1,4 +1,4 @@
> -/*
> +/*
>   
Encoding typo? Please review your subversion settings.


Mime
View raw message