diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-06-24 01:48:37 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-06-24 15:07:44 +0200 |
commit | 9e6d2f2f82322f499722c7db8b8df5d9469ea1e5 (patch) | |
tree | ccbd38a016e57d40492195457426c17a4e27aab4 /apps | |
parent | 0ab6e2ee3d88c9e2e3ada339ccd9b9f921d70598 (diff) | |
download | nextcloud-server-9e6d2f2f82322f499722c7db8b8df5d9469ea1e5.tar.gz nextcloud-server-9e6d2f2f82322f499722c7db8b8df5d9469ea1e5.zip |
Improve prev/next selection on delete.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/contacts/js/contacts.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 6f5602c2112..0654976a6dd 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -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'); } |