Update participating contacts in addressbook list when an event changes

This commit is contained in:
nathangray 2016-05-25 17:28:59 -06:00
parent 5774bf9d5a
commit 366c6aabf5
2 changed files with 17 additions and 1 deletions

View File

@ -129,6 +129,20 @@ app.classes.addressbook = AppJS.extend(
}
return false;
}
else if(_app === 'calendar')
{
// Event changed, update any [known] contacts participating
var content = egw.dataGetUIDdata(_app+'::'+_id);
if (content.data && content.data.participant_types && content.data.participant_types.c)
{
for(var contact in content.data.participant_types.c)
{
// Refresh handles checking to see if the contact is known,
// and updating it directly
egw.dataRefreshUID('addressbook::'+contact);
}
}
}
return true;
},

View File

@ -392,7 +392,9 @@ class Nextmatch extends Etemplate\Widget
// check if we need to send the data
//error_log("$id Known: " . (array_search($id, $knownUids) !== false ? 'Yes' : 'No') . ' Modified: ' . Api\DateTime::to($row[$row_modified]) . ' > ' . Api\DateTime::to($lastModified).'? ' . ($row[$row_modified] > $lastModified ? 'Yes' : 'No'));
if (!$row_id || !$knownUids || ($kUkey = array_search($id, $knownUids)) === false ||
!$lastModified || !isset($modified) || $modified > $lastModified)
!$lastModified || !isset($modified) || $modified > $lastModified ||
$queriedRange['refresh'] && $id == $queriedRange['refresh']
)
{
$result['data'][$id] = $row;
}