[CalendarServer-changes] [12922] CalendarServer/trunk/contrib/webpoll/webapp/js

source_changes at macosforge.org source_changes at macosforge.org
Sat Mar 15 08:53:49 PDT 2014


Revision: 12922
          http://trac.calendarserver.org//changeset/12922
Author:   cdaboo at apple.com
Date:     2014-03-15 08:53:49 -0700 (Sat, 15 Mar 2014)
Log Message:
-----------
Fix XML namespace parsing issues.

Modified Paths:
--------------
    CalendarServer/trunk/contrib/webpoll/webapp/js/caldav.js
    CalendarServer/trunk/contrib/webpoll/webapp/js/utils.js

Modified: CalendarServer/trunk/contrib/webpoll/webapp/js/caldav.js
===================================================================
--- CalendarServer/trunk/contrib/webpoll/webapp/js/caldav.js	2014-03-15 01:10:31 UTC (rev 12921)
+++ CalendarServer/trunk/contrib/webpoll/webapp/js/caldav.js	2014-03-15 15:53:49 UTC (rev 12922)
@@ -246,7 +246,7 @@
 	Propfind(joinURLs(this.host, gWellKnown), "0", [
 		"D:current-user-principal"
 	]).done(function(response) {
-		var msr = new MultiStatusResponse(response, gWellKnown);
+		var msr = new MultiStatusResponse($.parseXML(response), gWellKnown);
 		var href = msr.getPropertyText("D:current-user-principal/D:href");
 		if (href == null) {
 			alert("Could not determine current user.");

Modified: CalendarServer/trunk/contrib/webpoll/webapp/js/utils.js
===================================================================
--- CalendarServer/trunk/contrib/webpoll/webapp/js/utils.js	2014-03-15 01:10:31 UTC (rev 12921)
+++ CalendarServer/trunk/contrib/webpoll/webapp/js/utils.js	2014-03-15 15:53:49 UTC (rev 12922)
@@ -79,8 +79,8 @@
 	var namespace = gNamespaceShortcuts[segments[0]];
 	var name = segments[1];
 	var results = [];
-	node.children(name).each(function() {
-		if (this.namespaceURI == namespace) {
+	node.children().each(function() {
+		if (this.localName == name && this.namespaceURI == namespace) {
 			results.push($(this));
 		}
 	});
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140315/7a8b11f3/attachment-0001.html>


More information about the calendarserver-changes mailing list