diff --git a/UI/Contacts/Dutch.lproj/Localizable.strings b/UI/Contacts/Dutch.lproj/Localizable.strings index c7a4d248e..eb1265299 100644 --- a/UI/Contacts/Dutch.lproj/Localizable.strings +++ b/UI/Contacts/Dutch.lproj/Localizable.strings @@ -109,6 +109,11 @@ "Name of the Address Book" = "Naam van het adresboek"; "Are you sure you want to delete the selected address book?" = "Weet u zeker dat u het geselecteerde adresboek wilt verwijderen?"; +"You cannot remove nor unsubscribe from a public addressbook." += "You cannot remove nor unsubscribe from a public addressbook."; +"You cannot remove nor unsubscribe from your personal addressbook." += "You cannot remove nor unsubscribe from your personal addressbook."; + "Are you sure you want to delete the selected contacts?" = "Weet u zeker dat u de geselecteerde contactpersonen wilt verwijderen?"; "You cannot delete the selected contact(s)" diff --git a/UI/Contacts/English.lproj/Localizable.strings b/UI/Contacts/English.lproj/Localizable.strings index 7d250bdc0..4d8552d54 100644 --- a/UI/Contacts/English.lproj/Localizable.strings +++ b/UI/Contacts/English.lproj/Localizable.strings @@ -105,8 +105,14 @@ "Name of the Address Book" = "Name of the Address Book"; "Are you sure you want to delete the selected address book?" = "Are you sure you want to delete the selected address book?"; +"You cannot remove nor unsubscribe from a public addressbook." += "You cannot remove nor unsubscribe from a public addressbook."; +"You cannot remove nor unsubscribe from your personal addressbook." += "You cannot remove nor unsubscribe from your personal addressbook."; + "Are you sure you want to delete the selected contacts?" = "Are you sure you want to delete the selected contacts?"; + "You don't have the required privileges to perform the operation." = "You don't have the required privileges to perform the operation."; "You cannot delete the card of \"%{0}\"." diff --git a/UI/Contacts/French.lproj/Localizable.strings b/UI/Contacts/French.lproj/Localizable.strings index 71da5afbd..5ca5cdf99 100644 --- a/UI/Contacts/French.lproj/Localizable.strings +++ b/UI/Contacts/French.lproj/Localizable.strings @@ -118,8 +118,14 @@ "Name of the Address Book" = "Nom du carnet d'adresses"; "Are you sure you want to delete the selected address book?" = "Voulez-vous vraiment supprimer le carnet d'adresses sélectionné ?"; +"You cannot remove nor unsubscribe from a public addressbook." += "Vous ne pouvez pas supprimer ni vous désabonner d'un carnet public."; +"You cannot remove nor unsubscribe from your personal addressbook." += "Vous ne pouvez pas supprimer ni vous désabonner de votre carnet personnel."; + "Are you sure you want to delete the selected contacts?" = "Voulez-vous vraiment supprimer les contacts sélectionnés ?"; + "You don't have the required privileges to perform the operation." = "Vous n'avez pas les privilèges requis pour compléter l'opération."; "You cannot delete the card of \"%{0}\"." @@ -164,4 +170,4 @@ "Move To" = "Déplacer vers"; "Copy To" = "Copier vers"; -"Add to:" = "Ajouter à:"; \ No newline at end of file +"Add to:" = "Ajouter à:"; diff --git a/UI/Contacts/German.lproj/Localizable.strings b/UI/Contacts/German.lproj/Localizable.strings index 5c4bbf070..c8c51947d 100644 --- a/UI/Contacts/German.lproj/Localizable.strings +++ b/UI/Contacts/German.lproj/Localizable.strings @@ -109,6 +109,11 @@ "Name of the Address Book" = "Adressbuch-Name"; "Are you sure you want to delete the selected address book?" = "Wollen Sie wirklich das ausgewählte Adressbuch löschen?"; +"You cannot remove nor unsubscribe from a public addressbook." += "You cannot remove nor unsubscribe from a public addressbook."; +"You cannot remove nor unsubscribe from your personal addressbook." += "You cannot remove nor unsubscribe from your personal addressbook."; + "Are you sure you want to delete the selected contacts?" = "Wollen Sie wirklich die ausgewählte Karten löschen?"; "You cannot delete the selected contact(s)" diff --git a/UI/Contacts/Italian.lproj/Localizable.strings b/UI/Contacts/Italian.lproj/Localizable.strings index 51d3c33d5..4276c2cd9 100644 --- a/UI/Contacts/Italian.lproj/Localizable.strings +++ b/UI/Contacts/Italian.lproj/Localizable.strings @@ -129,10 +129,15 @@ "Name of the Address Book" = "Nome della rubrica"; "Are you sure you want to delete the selected address book?" = "Sei sicuro di voler cancellare la rubrica selezionata?"; +"You cannot remove nor unsubscribe from a public addressbook." += "You cannot remove nor unsubscribe from a public addressbook."; +"You cannot remove nor unsubscribe from your personal addressbook." += "You cannot remove nor unsubscribe from your personal addressbook."; + "Are you sure you want to delete the selected contacts?" = "Sei sicuro di voler eliminare i contatti selezionati?"; - -= "Are you sure you want to delete the selected contacts?"; +"You cannot delete the selected contact(s)" += "Non puoi eliminare il contatto selezionato."; "Address Book Name" = "Nome della Rubrica"; @@ -158,7 +163,4 @@ "The selected contact has no email address." = "Il contatto selezionato non dispone di indirizzo email."; -"You cannot delete the selected contact(s)" -= "Non puoi eliminare il contatto selezionato."; - "Please select a contact." = "Per favore seleziona un contatto."; diff --git a/UI/Contacts/Spanish.lproj/Localizable.strings b/UI/Contacts/Spanish.lproj/Localizable.strings index d80a9bb61..d7b2314f3 100644 --- a/UI/Contacts/Spanish.lproj/Localizable.strings +++ b/UI/Contacts/Spanish.lproj/Localizable.strings @@ -120,6 +120,11 @@ "Name of the Address Book" = "Nombre de la libreta"; "Are you sure you want to delete the selected address book?" = "¿Está seguro/a que desea borrar la libreta de direcciones seleccionada?"; +"You cannot remove nor unsubscribe from a public addressbook." += "You cannot remove nor unsubscribe from a public addressbook."; +"You cannot remove nor unsubscribe from your personal addressbook." += "You cannot remove nor unsubscribe from your personal addressbook."; + "Are you sure you want to delete the selected contacts?" = "¿Está seguro/a que desea borrar el/los contacto(s) seleccionado(s)?"; "You cannot delete the selected contact(s)" diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 12ec15cb2..7187b0275 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -654,27 +654,23 @@ function onAddressBookRemove(event) { var nodes = selector.getSelectedNodes(); if (nodes.length > 0) { var node = $(nodes[0]); - if (node.readAttribute("id") == "/personal") { - window.alert(labels["Your personal address book cannot be deleted."]); + node.deselect(); + var owner = node.getAttribute("owner"); + if (owner == "nobody") { + var label = labels["You cannot remove nor unsubscribe from a public addressbook."]; + window.alert(label); } - else if (node.hasClassName("remote")) { - window.alert(labels["Global address books cannot be deleted."]); + else if (owner == UserLogin) { + var folderIdElements = node.getAttribute("id").split(":"); + var abId = folderIdElements[0].substr(1); + deletePersonalAddressBook(abId); + var personal = $("/personal"); + personal.selectElement(); + onFolderSelectionChange(); } else { - node.deselect(); - var owner = node.getAttribute("owner"); - if (owner == UserLogin) { - var folderIdElements = node.getAttribute("id").split(":"); - var abId = folderIdElements[0].substr(1); - deletePersonalAddressBook(abId); - var personal = $("/personal"); - personal.selectElement(); - onFolderSelectionChange(); - } - else { var folderId = node.getAttribute("id"); unsubscribeFromFolder(folderId, owner, onFolderUnsubscribeCB, folderId); - } } } @@ -682,18 +678,24 @@ function onAddressBookRemove(event) { } function deletePersonalAddressBook(folderId) { - var label - = labels["Are you sure you want to delete the selected address book?"]; - if (window.confirm(label)) { - if (document.deletePersonalABAjaxRequest) { - document.deletePersonalABAjaxRequest.aborted = true; - document.deletePersonalABAjaxRequest.abort(); + if (folderId == "personal") { + var label = labels["You cannot remove nor unsubscribe from your personal addressbook."]; + window.alert(label); + } + else { + var label + = labels["Are you sure you want to delete the selected address book?"]; + if (window.confirm(label)) { + if (document.deletePersonalABAjaxRequest) { + document.deletePersonalABAjaxRequest.aborted = true; + document.deletePersonalABAjaxRequest.abort(); + } + var url = ApplicationBaseURL + folderId + "/deleteFolder"; + document.deletePersonalABAjaxRequest + = triggerAjaxRequest(url, deletePersonalAddressBookCallback, + folderId); + } } - var url = ApplicationBaseURL + folderId + "/deleteFolder"; - document.deletePersonalABAjaxRequest - = triggerAjaxRequest(url, deletePersonalAddressBookCallback, - folderId); - } } function deletePersonalAddressBookCallback(http) {