forked from extern/egroupware
Calendar - Fix another case of group events not showing properly
This commit is contained in:
parent
a16a715829
commit
2f1dfcc3d8
@ -232,6 +232,24 @@ egw.extend('user', egw.MODULE_GLOBAL, function()
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Set account data. This one can be called from the server to pre-fill the cache.
|
||||
*
|
||||
* @param {Array} _data
|
||||
* @param {String} _field
|
||||
*/
|
||||
set_account_cache: function(_data, _field)
|
||||
{
|
||||
for(var account_id in _data)
|
||||
{
|
||||
if (typeof accountData[account_id] === 'undefined')
|
||||
{
|
||||
accountData[account_id] = {};
|
||||
}
|
||||
accountData[account_id][_field] = _data[account_id];
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Set specified account-data of selected user in an other widget
|
||||
*
|
||||
|
@ -708,6 +708,8 @@ class calendar_ui
|
||||
{
|
||||
if(!$event || !is_array($event)) return false;
|
||||
|
||||
static $sent_groups = array();
|
||||
|
||||
if (!$this->bo->check_perms(Acl::EDIT,$event))
|
||||
{
|
||||
$event['class'] .= 'rowNoEdit ';
|
||||
@ -786,6 +788,15 @@ class calendar_ui
|
||||
calendar_so::split_user($uid, $user_type, $user_id);
|
||||
$type_name = lang($this->bo->resources[$user_type]['app']);
|
||||
$event['participant_types'][$type_name ? $type_name : ''][] = $text;
|
||||
if(is_int($uid) && $uid < 0 && !in_array($uid, $sent_groups))
|
||||
{
|
||||
// Make sure group membership info is on the client
|
||||
Api\Json\Response::get()->apply(
|
||||
'egw.set_account_cache', array(
|
||||
array($uid => $GLOBALS['egw']->accounts->members($uid) ),
|
||||
'account_id'
|
||||
));
|
||||
}
|
||||
}
|
||||
$event['date'] = $this->bo->date2string($event['start']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user