incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r603303 - /incubator/sling/trunk/microsling/microsling-core/src/main/webapp/ujax/ujax.js
Date Tue, 11 Dec 2007 17:04:23 GMT
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; 
 	}



Mime
View raw message