You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by an...@apache.org on 2008/02/04 18:37:24 UTC

svn commit: r618340 - in /cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax: resources/js/PartialLink.js system/System.JSON.js system/System.Upload.js

Author: antonio
Date: Mon Feb  4 09:37:22 2008
New Revision: 618340

URL: http://svn.apache.org/viewvc?rev=618340&view=rev
Log:
Remove whitespaces.

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/PartialLink.js
    cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/system/System.JSON.js
    cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/system/System.Upload.js

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/PartialLink.js
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/PartialLink.js?rev=618340&r1=618339&r2=618340&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/PartialLink.js (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/resources/js/PartialLink.js Mon Feb  4 09:37:22 2008
@@ -32,27 +32,26 @@
 	// Properties
 	href: "",
 	target: "",
-	
+
 	// Widget definition
 	ns: "forms",
 	widgetType: "PartialLink",
     isContainer: false,
     preventClobber: true, // don't clobber our node
-    
+
     fillInTemplate: function(args, frag) {
 
 	    if (this.target.indexOf("#") < 0) {
 	        dojo.debug("PartialLink: wrong value for 'target' attribute: " + this.target);
 	        return;
 	    }
-	    
+
 	    dojo.event.connect(this.domNode, "onclick", this, "onClick");
     },
-    
+
     onClick: function(event) {
         event.preventDefault();
         var _this = this;
         cocoon.ajax.update(_this.href, _this.target);
     }
 });
-

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/system/System.JSON.js
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/system/System.JSON.js?rev=618340&r1=618339&r2=618340&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/system/System.JSON.js (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/system/System.JSON.js Mon Feb  4 09:37:22 2008
@@ -33,15 +33,15 @@
 System.JSON = System.JSON || {};
 
 
-/* 
+/*
     Lookup an i18n key, return a String (there will be no tags)
     This function is intended to be used for embedding the result of i18n lookups in JSON responses
-    
+
     @param key String the i18n key
     @param catalogue Bundle the i18n Catalogue Bundle to look up in
     @param params String[] optional parameters for the i18n message
     @return String the looked-up i18n key
-    
+
 */
 System.JSON.getI18nMessage = function(key, catalogue, params) {
     if (!params) params = [];
@@ -57,10 +57,10 @@
     }
 };
 
-/* 
-    Serialize a Java Map to a JavaScript Object literal 
+/*
+    Serialize a Java Map to a JavaScript Object literal
     This function is intended for sending a java.util.Map in a JSON Response
-    
+
     @param map java.util.Map the Map to send
     @return String the JSON Object
 */
@@ -71,12 +71,12 @@
         var key = keys.next();
         value = this._serializeValue(map.get(key));
         result.push('"' + key + '":' + value);
-    }   
+    }
     return "{" + result.join(",") + "}";
 };
 
-/* 
-    Serialize a Java Collection to a JavaScript Array literal 
+/*
+    Serialize a Java Collection to a JavaScript Array literal
     This function is intended for sending a java.util.Collection in a JSON Response
 
     @param col java.util.Collection the Map to send
@@ -88,23 +88,23 @@
     while (values.hasNext()) {
         value = this._serializeValue(values.next());
         result.push(value);
-    }   
+    }
     return "[" + result.join(",") + "]";
 };
 
-/* 
-    Serialize a single value 
+/*
+    Serialize a single value
     This function is intended for sending a supported java.lang.Object in a JSON Response
-    
+
     Currently supported Objects:
         java.lang.Boolean
         java.lang.Number
         java.lang.String
         java.util.Collection
         java.util.Map
-    
+
     This is limited largely to Java Objects that have an equivalent JavaScript literal
-    
+
     NB. this function is private, it should not be used as a starting point for making a JSON Response
     A JSON Response would typically be made from a Map or a Collection
 
@@ -125,4 +125,3 @@
         print("System.JSON._serializeValue - could not serialize: " + obj);
     }
 }
-

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/system/System.Upload.js
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/system/System.Upload.js?rev=618340&r1=618339&r2=618340&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/system/System.Upload.js (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/ajax/resources/org/apache/cocoon/ajax/system/System.Upload.js Mon Feb  4 09:37:22 2008
@@ -39,14 +39,14 @@
 
 /*
     Retrieve a JSON Object containg data about the current file-upload
-    
+
     This flowscript is called by the FormsUploadProgress Dojo Widget
-    
+
     Requires the following sitemap parameters :
-    
+
         catalogue : the name of the i18n Catalogue to use for lookups
         location  : the path to the Catalogue's folder
-    
+
 */
 System.Upload.status = function(){
     var json = "{}";
@@ -63,7 +63,7 @@
             catalogue = i18n.select(cocoon.parameters["location"], cocoon.parameters["catalogue"], cocoon.request.getLocale());
         } finally {
             if (i18n != null) cocoon.releaseComponent(i18n);
-        }       
+        }
         if (status.get("finished").booleanValue()) {
             tempMap.put("message", System.JSON.getI18nMessage("progress.finished", catalogue, [status.get("uploadsdone"), sent]));
             status.clear();
@@ -72,7 +72,7 @@
             if (percent == "NaN") percent = "0";
             tempMap.put("message", System.JSON.getI18nMessage("progress.sent", catalogue, [percent, sent, total, status.get("filename")]));
             tempMap.put("percent", percent);
-        }       
+        }
         json = System.JSON.serializeMap(tempMap);
     }
     cocoon.sendPage("send-json", {json: json});
@@ -81,7 +81,7 @@
 /*
     A utility function to clear the current Upload Status
     Used for debugging purposes only
-    
+
 */
 System.Upload.clear = function(){
     var success = '{"cleared":true}';
@@ -97,12 +97,3 @@
     }
     cocoon.sendPage("send-json", {json: json});
 };
-
-
-
-
-
-
-
-
-