Enhance addressbook observer to handle calendar updates without event data available.

This commit is contained in:
nathangray 2016-06-14 11:04:16 -06:00
parent a59d3f89e7
commit 0a1c2fe3e5

View File

@ -141,6 +141,18 @@ app.classes.addressbook = AppJS.extend(
// and updating it directly // and updating it directly
egw.dataRefreshUID('addressbook::'+contact); egw.dataRefreshUID('addressbook::'+contact);
} }
return true;
}
else if (!content)
{
// No data on the event, we'll have to reload if calendar column is visible
// to get the updated information
var nm = etemplate2.getById('addressbook-index').widgetContainer.getWidgetById('nm')
var pref = nm ? nm._getPreferences() : false;
if(pref && pref.visible.indexOf('calendar_calendar') > -1)
{
nm.refresh(null,'update');
}
} }
} }