You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2007/12/11 18:04:23 UTC

svn commit: r603303 - /incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js

Author: bdelacretaz
Date: Tue Dec 11 09:04:23 2007
New Revision: 603303

URL: http://svn.apache.org/viewvc?rev=603303&view=rev
Log:
ujax.js: don't include jcr: properties in output

Modified:
    incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js

Modified: incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js?rev=603303&r1=603302&r2=603303&view=diff
==============================================================================
--- incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js (original)
+++ incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js Tue Dec 11 09:04:23 2007
@@ -134,7 +134,7 @@
 	 * @return An Object tree of content nodes and properties, null if not found
 	 * @type Object
 	 */
-	ujax.getContent = function(path, maxlevels) {
+	ujax.getContent = function(path, maxlevels, filter) {
 	    var obj=new Object();
 	    if (!path)  {
 	        path=ujax.currentPath;
@@ -157,7 +157,13 @@
 	    var res=ujax.httpGet(path + passThroughCacheParam + (maxlevels?"&maxlevels="+maxlevels:""));
 	    
 	    if(res.status == 200) {
-	    	return ujax.evalString(res.responseText);
+	    	var obj=ujax.evalString(res.responseText);
+			if (!filter) {
+				for (var a in obj) {
+					if (a.indexOf("jcr:")==0) delete(obj[a]);
+				}
+			}
+			return obj;
 	    }
 	    return null; 
 	}