mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 05:29:13 +01:00
Fix lost focus, and remove unneeded stuff
This commit is contained in:
parent
1134c6a4b9
commit
153c4b7e8d
@ -461,34 +461,26 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
|
|||||||
// No next, select previous
|
// No next, select previous
|
||||||
next = (entry.ao?entry.ao.getPrevious(1):null);
|
next = (entry.ao?entry.ao.getPrevious(1):null);
|
||||||
}
|
}
|
||||||
// Select next row
|
|
||||||
if(next && next.id)
|
|
||||||
{
|
|
||||||
this.controller._selectionMgr._handleSelect(next.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stop automatic updating
|
// Stop automatic updating
|
||||||
this.dataview.grid.doInvalidate = false;
|
this.dataview.grid.doInvalidate = false;
|
||||||
// Collect IDs
|
|
||||||
var grid_IDs = [];
|
|
||||||
for(var i = 0; i < _row_ids.length; i++)
|
for(var i = 0; i < _row_ids.length; i++)
|
||||||
{
|
{
|
||||||
uid = app + "::" + _row_ids[i];
|
uid = app + "::" + _row_ids[i];
|
||||||
entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid);
|
entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid);
|
||||||
// grid.deleteRow() changes grid indexes - see below
|
|
||||||
grid_IDs.push(entry.idx);
|
// Unselect
|
||||||
|
this.controller._selectionMgr.setSelected(uid,false);
|
||||||
|
|
||||||
// Delete from internal references
|
// Delete from internal references
|
||||||
this.controller.deleteRow(uid);
|
this.controller.deleteRow(uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grid indexes change as we delete rows, so go from bottom
|
// Select & focus next row
|
||||||
// Sort to make sure they're in numeric order
|
if(next && next.id)
|
||||||
grid_IDs.sort(function(a,b){return b-a;});
|
|
||||||
for(var i = 0; i < grid_IDs.length; i++)
|
|
||||||
{
|
{
|
||||||
// Blank the row
|
this.controller._selectionMgr.setSelected(next.id,true);
|
||||||
this.dataview.grid.deleteRow(grid_IDs[i]);
|
this.controller._selectionMgr.setFocused(next.id,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the count
|
// Update the count
|
||||||
|
Loading…
Reference in New Issue
Block a user