aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-07-08 13:51:20 -0700
committerJames Lal <james@lightsofapollo.com>2012-07-08 13:51:20 -0700
commit5a97196b49640117c546ad59cbfa31f974259f0b (patch)
treea27ea40a7d97043cc18e958266ff18aed8a68d34 /lib
parentdee456f357eb2c373988f7bc987eeabb8357050e (diff)
downloadjsCalDAV-5a97196b49640117c546ad59cbfa31f974259f0b.tar.gz
defaults for calendar query will now return data
Diffstat (limited to 'lib')
-rw-r--r--lib/caldav/templates/calendar_data.js10
-rw-r--r--lib/caldav/templates/calendar_filter.js5
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/caldav/templates/calendar_data.js b/lib/caldav/templates/calendar_data.js
index 2c24569..5fcc4e8 100644
--- a/lib/caldav/templates/calendar_data.js
+++ b/lib/caldav/templates/calendar_data.js
@@ -18,6 +18,10 @@
* @param {String} type iCal fieldset (VTODO, VEVENT,...).
*/
select: function(type, list) {
+ if (typeof(list) === 'undefined') {
+ list = true;
+ }
+
var struct = this.struct;
this._hasItems = true;
@@ -71,6 +75,10 @@
return output;
},
+ _defaultRender: function(template) {
+ return template.tag(['caldav', this.rootName]);
+ },
+
/**
* Renders CalendarData with a template.
*
@@ -79,7 +87,7 @@
*/
render: function(template) {
if (!this._hasItems) {
- return template.tag(['caldav', this.rootName]);
+ return this._defaultRender(template);
}
var struct = this.struct;
diff --git a/lib/caldav/templates/calendar_filter.js b/lib/caldav/templates/calendar_filter.js
index aebd9fe..a16f985 100644
--- a/lib/caldav/templates/calendar_filter.js
+++ b/lib/caldav/templates/calendar_filter.js
@@ -12,6 +12,11 @@
add: CalendarData.prototype.select,
+ _defaultRender: function(template) {
+ var inner = this._renderFieldset(template, { VCALENDAR: [{ VEVENT: true }] });
+ return template.tag(['caldav', this.rootName], inner);
+ },
+
compName: 'comp-filter',
rootName: 'filter'
};