mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Improve prev/next selection on delete.
This commit is contained in:
parent
0ab6e2ee3d
commit
9e6d2f2f82
1 changed files with 3 additions and 3 deletions
|
|
@ -380,12 +380,12 @@ Contacts={
|
|||
if(jsondata.status == 'success'){
|
||||
var newid = '', bookid;
|
||||
var curlistitem = $('#contacts li[data-id="'+jsondata.data.id+'"]');
|
||||
var newlistitem = curlistitem.prev();
|
||||
var newlistitem = curlistitem.prev('li');
|
||||
if(newlistitem == undefined) {
|
||||
newlistitem = curlistitem.next();
|
||||
newlistitem = curlistitem.next('li');
|
||||
}
|
||||
curlistitem.remove();
|
||||
if(newlistitem != undefined) {
|
||||
if(!$(newlistitem).is('li')) {
|
||||
newid = newlistitem.data('id');
|
||||
bookid = newlistitem.data('id');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue