forked from extern/egroupware
If a refresh of a particular UID is requested and server doesn't give it then remove it.
Fixes refresh where the row no longer match filters, but is still there.
This commit is contained in:
parent
0cffb46eab
commit
715bbf9abe
@ -49,9 +49,6 @@ egw.extend("data", egw.MODULE_APP_LOCAL, function (_app, _wnd) {
|
||||
egw.debug("error", "Invalid result for 'dataFetch'");
|
||||
}
|
||||
|
||||
// The "uidsMissing" contains a list of missing uids.
|
||||
var uidsMissing = [];
|
||||
|
||||
if (_result.lastModification)
|
||||
{
|
||||
lastModification = _result.lastModification;
|
||||
@ -81,6 +78,18 @@ egw.extend("data", egw.MODULE_APP_LOCAL, function (_app, _wnd) {
|
||||
egw.dataStoreUID(uid, _result.data[key]);
|
||||
}
|
||||
}
|
||||
|
||||
// Tried to refresh a specific row and got nothing, so set it to null
|
||||
// (triggers update for listeners), then remove it
|
||||
if(_result.data.length == 0 && typeof _context == "object" && _context.refresh)
|
||||
{
|
||||
for(var i = 0; i < _context.refresh.length; i++)
|
||||
{
|
||||
var uid = UID(_context.refresh[i], _context.prefix);
|
||||
egw.dataStoreUID(uid, null);
|
||||
egw.dataDeleteUID(uid);
|
||||
}
|
||||
}
|
||||
|
||||
// Call the callback function and pass the calculated "order" array
|
||||
// as well as the "total" count and the "timestamp" to the listener.
|
||||
|
Loading…
Reference in New Issue
Block a user