aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-07-20 09:13:46 -0700
committerJames Lal <james@lightsofapollo.com>2012-07-20 09:13:46 -0700
commit08a6ce10660e4436d48ad85075d6d092431b426e (patch)
treebb3a7905043d2ae3a15f8b3da6962d8279e1e33d /lib
parent5a97196b49640117c546ad59cbfa31f974259f0b (diff)
downloadjsCalDAV-08a6ce10660e4436d48ad85075d6d092431b426e.tar.gz
global xhr constructor options can now be set ( for system xhr in b2g)
Diffstat (limited to 'lib')
-rw-r--r--lib/caldav/resources/calendar.js1
-rw-r--r--lib/caldav/xhr.js11
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/caldav/resources/calendar.js b/lib/caldav/resources/calendar.js
index cc8a4d6..9bff517 100644
--- a/lib/caldav/resources/calendar.js
+++ b/lib/caldav/resources/calendar.js
@@ -34,6 +34,7 @@
'calendar-description': 'description',
'getctag': 'ctag',
+ 'getlastmodified': 'lastmodified',
'resourcetype': {
field: 'resourcetype',
diff --git a/lib/caldav/xhr.js b/lib/caldav/xhr.js
index 84fb18d..ac26865 100644
--- a/lib/caldav/xhr.js
+++ b/lib/caldav/xhr.js
@@ -41,8 +41,7 @@
}
Xhr.prototype = {
- /** @scope Caldav.Xhr.prototype */
-
+ globalXhrOptions: null,
xhrClass: Native,
method: 'GET',
async: true,
@@ -79,7 +78,13 @@
callback = this.callback;
}
- xhr = this.xhr = new this.xhrClass();
+ if (this.globalXhrOptions) {
+ xhr = new this.xhrClass(this.globalXhrOptions);
+ } else {
+ xhr = new this.xhrClass();
+ }
+
+ this.xhr = xhr;
if (Xhr.authHack) {
xhr.open(this.method, this.url, this.async);