forked from extern/egroupware
Implement app refresh (via observer) to clear all cached data & redraw
This commit is contained in:
parent
5090c767c5
commit
8db7e46aa6
@ -239,6 +239,8 @@ app.classes.calendar = AppJS.extend(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'calendar':
|
case 'calendar':
|
||||||
|
if(_id)
|
||||||
|
{
|
||||||
var event = egw.dataGetUIDdata('calendar::'+_id);
|
var event = egw.dataGetUIDdata('calendar::'+_id);
|
||||||
if(event && event.data && event.data.date)
|
if(event && event.data && event.data.date)
|
||||||
{
|
{
|
||||||
@ -255,6 +257,23 @@ app.classes.calendar = AppJS.extend(
|
|||||||
}
|
}
|
||||||
egw.dataStoreUID(new_cache_id,daywise);
|
egw.dataStoreUID(new_cache_id,daywise);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Full refresh, clear the caches
|
||||||
|
var daywise = egw.dataKnownUIDs(app.classes.calendar.DAYWISE_CACHE_ID);
|
||||||
|
for(var i = 0; i < daywise.length; i++)
|
||||||
|
{
|
||||||
|
egw.dataDeleteUID(app.classes.calendar.DAYWISE_CACHE_ID + '::' + daywise[i]);
|
||||||
|
}
|
||||||
|
var events = egw.dataKnownUIDs(_app);
|
||||||
|
for(var i = 0; i < events.length; i++)
|
||||||
|
{
|
||||||
|
egw.dataDeleteUID(_app + '::' + events[i]);
|
||||||
|
}
|
||||||
|
// Force redraw to default state
|
||||||
|
this.setState();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user