Try to not always refresh calendar via observer for every infolog entry, but only the ones that are integrated in calendar

This commit is contained in:
Hadi Nategh
2014-06-26 12:39:20 +00:00
parent 2244d6fc63
commit dcad41f542
2 changed files with 45 additions and 15 deletions

View File

@@ -96,7 +96,23 @@ app.classes.infolog = AppJS.extend(
break;
}
}
}
}
//Refresh handler for infologs integrated in calendar
if (_app == 'infolog' && _id && _type !='delete')
{
var info_type = egw.dataGetUIDdata(_app+"::"+_id)?egw.dataGetUIDdata(_app+"::"+_id).data.info_type:false;
var cal_show = egw.preference('cal_show','infolog')||false;
if (info_type && cal_show)
{
var rex = RegExp(info_type,'gi');
if (cal_show.match(rex))
{
//Trigger refresh the whole calendar if the changed infolog entry is integrated one
if (typeof app['calendar'] != 'undefined') app.calendar.egw.window.location.reload();
}
}
}
},
/**