merge of '71124a5805a6acd533a352015d2c6fe9c134f725'

and 'a57ac11c710e04e59d47cf12be270492f600a306'

Monotone-Parent: 71124a5805a6acd533a352015d2c6fe9c134f725
Monotone-Parent: a57ac11c710e04e59d47cf12be270492f600a306
Monotone-Revision: f8f29401b79be9d6545414948b83cb353a55ae8d

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2009-06-29T19:09:39
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2009-06-29 19:09:39 +00:00
4 changed files with 89 additions and 66 deletions
+8 -6
View File
@@ -253,7 +253,7 @@ function actionContactCallback(http) {
var error = html.select("p").first().firstChild.nodeValue.trim();
log("actionContactCallback failed: error " + http.status + " (" + error + ")");
if (parseInt(http.status) == 403)
window.alert(labels["You don't have the required privileges to perform the operation."]);
window.alert(clabels["You don't have the required privileges to perform the operation."]);
else if (error)
window.alert(labels[error]);
refreshCurrentFolder();
@@ -777,6 +777,8 @@ function onAddressBookMenuPrepareVisibility() {
menuEntry.removeClassName("disabled");
});
}
return true;
}
function updateAddressBooksMenus() {
@@ -899,8 +901,7 @@ function onAddressBooksMenuPrepareVisibility() {
sharingOption.addClassName("disabled");
}
// disable the "remove" option when address book is public, otherwise
// enable it
// Disable the "remove" option when address book is public
if (folderOwner == "nobody")
removeOption.addClassName("disabled");
else
@@ -914,7 +915,7 @@ function onAddressBooksMenuPrepareVisibility() {
function onContactMenuPrepareVisibility() {
var contactRows = document.menuTarget;
var selectedFolder = $("contactFolders").getSelectedNodes()[0];
var selectedFolder = $("contactFolders").getSelectedNodes().first();
var options = { write: false,
aim: false };
@@ -925,9 +926,10 @@ function onContactMenuPrepareVisibility() {
var moveOption = elements[7];
$A(contactRows).each(function(contactRow) {
var emailCell = contactRow.down('td', 1);
var cells = contactRow.getElementsByTagName('td');
var emailCell = cells[1];
options.write |= (emailCell.firstChild != null);
var aimCell = contactRow.down('td', 2);
var aimCell = cells[2];
options.aim |= (aimCell.firstChild != null);
});