mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-18 20:08:34 +01:00
Fix bug where the refresh did not happen with multiple users selected
This commit is contained in:
parent
c51e9db46b
commit
d08a91dcff
@ -264,19 +264,31 @@ app.classes.calendar = AppJS.extend(
|
|||||||
!(_type == 'add' && event.data.recur_type)
|
!(_type == 'add' && event.data.recur_type)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
var new_cache_id = app.classes.calendar._daywise_cache_id(event.data.date,this.state.owner)
|
var multiple_owner = typeof this.state.owner != 'string' &&
|
||||||
var daywise = egw.dataGetUIDdata(new_cache_id);
|
this.state.owner.length < parseInt(this.egw.config('calview_no_consolidate','phpgwapi') || 5) ? true : false;
|
||||||
daywise = daywise ? daywise.data : [];
|
for(var i = 0; i < this.state.owner.length; i++)
|
||||||
if(_type === 'delete')
|
|
||||||
{
|
{
|
||||||
daywise.splice(daywise.indexOf(_id),1);
|
var owner = multiple_owner ? this.state.owner[i] : this.state.owner
|
||||||
egw.dataStoreUID('calendar::'+_id, null);
|
var new_cache_id = app.classes.calendar._daywise_cache_id(event.data.date, owner)
|
||||||
|
var daywise = egw.dataGetUIDdata(new_cache_id);
|
||||||
|
daywise = daywise ? daywise.data : [];
|
||||||
|
if(_type === 'delete' ||
|
||||||
|
// Make sure we only update the calendars of those actually in the event
|
||||||
|
multiple_owner && typeof event.data.participants[owner] == 'undefined')
|
||||||
|
{
|
||||||
|
daywise.splice(daywise.indexOf(_id),1);
|
||||||
|
}
|
||||||
|
else if (daywise.indexOf(_id) < 0)
|
||||||
|
{
|
||||||
|
daywise.push(_id);
|
||||||
|
}
|
||||||
|
if(_type === 'delete')
|
||||||
|
{
|
||||||
|
egw.dataStoreUID('calendar::'+_id, null);
|
||||||
|
}
|
||||||
|
egw.dataStoreUID(new_cache_id,daywise);
|
||||||
|
if(!multiple_owner) break;
|
||||||
}
|
}
|
||||||
else if (daywise.indexOf(_id) < 0)
|
|
||||||
{
|
|
||||||
daywise.push(_id);
|
|
||||||
}
|
|
||||||
egw.dataStoreUID(new_cache_id,daywise);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user