Avoid re-adding to the same cache ID we just removed it from, fixes unresponsive script after adding

This commit is contained in:
Nathan Gray 2016-01-19 16:21:44 +00:00
parent 180c256a79
commit a253a7b568

View File

@ -701,13 +701,16 @@ var et2_calendar_event = et2_valueWidget.extend([et2_IDetachedDOM],
old_daywise.splice(old_daywise.indexOf(this.options.value.id),1);
egw.dataStoreUID(old_cache_id,old_daywise);
}
if (new_daywise.indexOf(event.id) < 0)
if(new_cache_id != old_cache_id)
{
new_daywise.push(event.id);
}
if(new_daywise.data !== null)
{
egw.dataStoreUID(new_cache_id,new_daywise);
if (new_daywise.indexOf(event.id) < 0)
{
new_daywise.push(event.id);
}
if(new_daywise.data !== null)
{
egw.dataStoreUID(new_cache_id,new_daywise);
}
}
return false;