fix(calendar(js)): fix refresh of attendees freebusy information
* refresh template with freebusy information of organizer * fix event coverage in freebusy timeline when event spans a day Related to bug #4899pull/265/head
parent
3bb40e4024
commit
fbdabc9615
|
@ -240,7 +240,9 @@
|
|||
var index = _.findIndex(this.component.attendees, function(currentAttendee) {
|
||||
return currentAttendee.email == attendee.email;
|
||||
});
|
||||
this.component.attendees.splice(index, 1);
|
||||
if (index > -1)
|
||||
this.component.attendees.splice(index, 1);
|
||||
delete this.$futureFreebusyData[attendee.uid];
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -270,7 +272,9 @@
|
|||
roundedStart.setMinutes(15*startQuarter);
|
||||
roundedEnd.setMinutes(15*endQuarter);
|
||||
|
||||
_.forEach(roundedStart.daysUpTo(roundedEnd), function(date, index) {
|
||||
_.forEach(roundedStart.beginOfDay().daysUpTo(roundedEnd.beginOfDay()), function(date, index) {
|
||||
if (date < roundedStart)
|
||||
date = new Date(roundedStart.getTime());
|
||||
var currentDay = date.getDate(),
|
||||
dayKey = date.getDayString(),
|
||||
hourKey;
|
||||
|
|
|
@ -358,8 +358,10 @@
|
|||
|
||||
this.removeAttendee = function (attendee, form) {
|
||||
this.component.$attendees.remove(attendee);
|
||||
if (this.component.$attendees.getLength() === 0)
|
||||
if (this.component.$attendees.getLength() === 0) {
|
||||
this.showAttendeesEditor = false;
|
||||
this.component.$attendees.remove(this.component.organizer);
|
||||
}
|
||||
form.$setDirty();
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
return $ctrl.component? {
|
||||
start: $ctrl.component.start,
|
||||
end: $ctrl.component.end,
|
||||
attendees: _.map($ctrl.component.attendees, 'email')
|
||||
attendees: _.keys($ctrl.component.$attendees.$futureFreebusyData)
|
||||
} : null;
|
||||
},
|
||||
function(newAttrs, oldAttrs) {
|
||||
|
|
Loading…
Reference in New Issue