mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 12:51:52 +02:00
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'");
|
egw.debug("error", "Invalid result for 'dataFetch'");
|
||||||
}
|
}
|
||||||
|
|
||||||
// The "uidsMissing" contains a list of missing uids.
|
|
||||||
var uidsMissing = [];
|
|
||||||
|
|
||||||
if (_result.lastModification)
|
if (_result.lastModification)
|
||||||
{
|
{
|
||||||
lastModification = _result.lastModification;
|
lastModification = _result.lastModification;
|
||||||
@ -82,6 +79,18 @@ egw.extend("data", egw.MODULE_APP_LOCAL, function (_app, _wnd) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
// Call the callback function and pass the calculated "order" array
|
||||||
// as well as the "total" count and the "timestamp" to the listener.
|
// as well as the "total" count and the "timestamp" to the listener.
|
||||||
if (_callback)
|
if (_callback)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user