forked from extern/egroupware
Fix selecting next entry when there are no others
This commit is contained in:
parent
d67a0280a7
commit
dbbad57f90
@ -345,7 +345,7 @@ var et2_dataview_selectionManager = Class.extend(
|
||||
var count = Math.max(1,Math.min(self._total,50));
|
||||
var element = null;
|
||||
var idx = _entry.idx;
|
||||
while(element == null && count > 0)
|
||||
while(element == null && count > 0 && max_index > 0)
|
||||
{
|
||||
count--;
|
||||
element = getIndexAO(Math.max(0,
|
||||
|
@ -489,7 +489,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
|
||||
var uid = (this.controller.dataStorePrefix || app) + "::" + _row_ids[0];
|
||||
var entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid);
|
||||
var next = (entry.ao?entry.ao.getNext(_row_ids.length):null);
|
||||
if(next == null || !next.id)
|
||||
if(next == null || !next.id || next.id == uid)
|
||||
{
|
||||
// No next, select previous
|
||||
next = (entry.ao?entry.ao.getPrevious(1):null);
|
||||
|
Loading…
Reference in New Issue
Block a user