mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 05:29:13 +01:00
Don't keep selection if it is not returned after an update.
Fixes IDs stay after entry is changed to not match the current filters.
This commit is contained in:
parent
0223553284
commit
897a16cd8f
@ -98,6 +98,7 @@ var et2_dataview_selectionManager = Class.extend(
|
|||||||
for (var key in this._registeredRows)
|
for (var key in this._registeredRows)
|
||||||
{
|
{
|
||||||
this.unregisterRow(key, this._registeredRows[key].tr);
|
this.unregisterRow(key, this._registeredRows[key].tr);
|
||||||
|
delete this._registeredRows[key];
|
||||||
}
|
}
|
||||||
this._indexMap = {};
|
this._indexMap = {};
|
||||||
this._total = 0;
|
this._total = 0;
|
||||||
|
@ -566,10 +566,14 @@ var et2_nextmatch_controller = et2_dataview_controller.extend(et2_IDataProvider,
|
|||||||
this.self._selectionMgr.selectAll();
|
this.self._selectionMgr.selectAll();
|
||||||
}
|
}
|
||||||
for(var i = 0; i < this.self.kept_selection.ids.length || 0; i++)
|
for(var i = 0; i < this.self.kept_selection.ids.length || 0; i++)
|
||||||
|
{
|
||||||
|
// Only keep the selected if they came back in the fetch
|
||||||
|
if(_response.order.indexOf(this.self.kept_selection.ids[i]) >= 0)
|
||||||
{
|
{
|
||||||
this.self._selectionMgr.setSelected(this.self.kept_selection.ids[i],true);
|
this.self._selectionMgr.setSelected(this.self.kept_selection.ids[i],true);
|
||||||
}
|
}
|
||||||
if(this.self.kept_focus)
|
}
|
||||||
|
if(this.self.kept_focus && _response.order.indexOf(this.self.kept_focus) >= 0)
|
||||||
{
|
{
|
||||||
this.self._selectionMgr.setFocused(this.self.kept_focus,true);
|
this.self._selectionMgr.setFocused(this.self.kept_focus,true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user