Properly hide or show dt that no longer have dd adjacent

This commit is contained in:
ichim-david 2013-02-24 11:31:47 +02:00
parent 19caf7c448
commit 63134858d7

View File

@ -1670,9 +1670,12 @@
}
// Hide the headings if there are no contacts under them
_.each([$my_contacts, $contact_requests, $pending_contacts], function (h) {
if (h.nextUntil('dt').length && !h.is(':visible')) {
if (h.nextUntil('dt').length) {
h.show();
}
else {
h.hide();
}
});
$count = $('#online-count');
$count.text(this.model.getNumOnlineContacts());