1
0
Fork 0
forked from 0x2620/oxjs

fix bugs related to selection of place/event annotations

This commit is contained in:
rlx 2012-02-02 02:32:41 +00:00
commit 25f7c2a285
2 changed files with 39 additions and 15 deletions

View file

@ -86,7 +86,9 @@ Ox.ListCalendar = function(options, self) {
// return Ox.formatDateRangeDuration(data.start, data.end, true);
var key = data.start + ' - ' + data.end;
if (!self.durationCache[key]) {
self.durationCache[key] = Ox.formatDateRangeDuration(data.start, data.end, true);
self.durationCache[key] = data.start
? Ox.formatDateRangeDuration(data.start, data.end, true)
: '';
}
return self.durationCache[key];
},
@ -230,7 +232,10 @@ Ox.ListCalendar = function(options, self) {
self.$calendar = Ox.Calendar({
date: new Date(0),
events: Ox.clone(self.options.events, true),
//events: Ox.clone(self.options.events, true),
events: self.options.events.filter(function(event) {
return !!event.start;
}),
height: self.options.height,
showControls: self.options.showControls,
showToolbar: true,
@ -488,6 +493,7 @@ Ox.ListCalendar = function(options, self) {
selectEvent(event);
self.$nameInput.focusInput(true);
} else {
// FIXME
alert(result.status.text);
}
});