diff --git a/ChangeLog b/ChangeLog index 5f9da5356..5f0d9100c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-10-26 Francis Lachapelle + + * UI/WebServerResources/ContactsUI.js + (onContactDeleteEventCallback): fixed retrieval of card name when + deletion is not possible (caused by a possible bug in prototype.js). + (setEventsOnAddressBook): don't observe the double-click event on + addressbooks not owned by the user. + 2009-10-25 Ludovic Marcotte * Fixed many compilation warnings diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 581a4dd08..36fe5e893 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -475,7 +475,7 @@ function onContactDeleteEventCallback(http) { } else if (parseInt(http.status) == 403) { var row = $(http.callbackData); - var displayName = row.down("TD.displayName").firstChild.nodeValue.trim(); + var displayName = row.readAttribute("contactname"); Contact.deleteContactsRequestCount--; window.alert(labels["You cannot delete the card of \"%{0}\"."].formatted(displayName)); } @@ -935,7 +935,9 @@ function setEventsOnAddressBook(folder) { node.observe("mousedown", listRowMouseDownHandler); node.observe("click", onRowClick); - node.observe("dblclick", onAddressBookModify); + if (UserLogin == node.readAttribute("owner")) + // Only the owner of the addressbook can rename it + node.observe("dblclick", onAddressBookModify); } function onAddressBookModify(event) {