From bb283c56554519a2ac7a8c85984a1661f2989fac Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 26 Oct 2009 15:52:45 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: cc50967cd5623fad93774ada2fe5af98c14b2a98 Monotone-Revision: 87f8dab4d95e1de1c7c969e371770ac2d74b83b1 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-10-26T15:52:45 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ UI/WebServerResources/ContactsUI.js | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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) {