aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-07-08 13:40:48 -0700
committerJames Lal <james@lightsofapollo.com>2012-07-08 13:40:48 -0700
commitdee456f357eb2c373988f7bc987eeabb8357050e (patch)
tree3ccec1f73f16155037dacf8fc311d438b450b55f /lib
parentf3bc5aa84e85167ce1b03df312a93517264f54ef (diff)
downloadjsCalDAV-dee456f357eb2c373988f7bc987eeabb8357050e.tar.gz
Hooking up calendar query to calendar resource
Diffstat (limited to 'lib')
-rw-r--r--lib/caldav/request/calendar_query.js2
-rw-r--r--lib/caldav/request/resources.js2
-rw-r--r--lib/caldav/resources/calendar.js7
3 files changed, 9 insertions, 2 deletions
diff --git a/lib/caldav/request/calendar_query.js b/lib/caldav/request/calendar_query.js
index 6fcf74d..6ee1ec4 100644
--- a/lib/caldav/request/calendar_query.js
+++ b/lib/caldav/request/calendar_query.js
@@ -12,7 +12,7 @@
* @param {CalDav.Connection} connection connection object.
* @param {Object} options options for calendar query.
*/
- function CalendarQuery(options) {
+ function CalendarQuery(connection, options) {
Propfind.apply(this, arguments);
this.xhr.headers['Depth'] = this.depth || 1;
diff --git a/lib/caldav/request/resources.js b/lib/caldav/request/resources.js
index f66a455..fbba186 100644
--- a/lib/caldav/request/resources.js
+++ b/lib/caldav/request/resources.js
@@ -45,6 +45,8 @@
self.connection,
collection
);
+
+ results[type][url].url = url;
}
});
}
diff --git a/lib/caldav/resources/calendar.js b/lib/caldav/resources/calendar.js
index a17c5c4..cc8a4d6 100644
--- a/lib/caldav/resources/calendar.js
+++ b/lib/caldav/resources/calendar.js
@@ -3,6 +3,8 @@
*/
(function(module, ns) {
+ var CalendarQuery = ns.require('request/calendar_query');
+
/**
* Represents a (Web/Cal)Dav resource type.
*
@@ -18,6 +20,7 @@
this.url = options.url;
}
+ this.connection = connection;
this.updateFromServer(options);
}
@@ -138,7 +141,9 @@
* @return {CalDav.Request.CalendarQuery} query object.
*/
createQuery: function() {
-
+ return new CalendarQuery(this.connection, {
+ url: this.url
+ });
}
};