diff --git a/ChangeLog b/ChangeLog index 37a87e15c..7009eb137 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-13 Francis Lachapelle + + * UI/WebServerResources/UIxAclEditor.js (addUser): fixed + positioning of new user. + 2012-03-12 Francis Lachapelle * SoObjects/SOGo/WORequest+SOGo.m (-isIPhoneAddressBookApp): catch diff --git a/UI/WebServerResources/UIxAclEditor.js b/UI/WebServerResources/UIxAclEditor.js index 82e3b3cf7..d14c8714d 100644 --- a/UI/WebServerResources/UIxAclEditor.js +++ b/UI/WebServerResources/UIxAclEditor.js @@ -18,21 +18,21 @@ function addUser(userName, userID, type) { newNode.addClassName("normal-" + type); var count = lis.length - 1; - var nextLi = null; - while (count > -1 && !nextLi) { + var inserted = false; + while (count > -1 && !inserted) { if ($(lis[count]).hasClassName("normal-user")) { if ((count+1) < lis.length) ul.insertBefore(newNode, lis[count+1]); else ul.appendChild(newNode); - break; + inserted = true; } else { count--; } } - if (!nextLi) { - if (count > 0) + if (!inserted) { + if (lis.length > 0) ul.insertBefore(newNode, lis[0]); else ul.appendChild(newNode);