Monotone-Parent: eee5f66bf19f86e82f46756295377665c0f7d752
Monotone-Revision: b3600c7338751f5409cd7560c74becdc13e172f8 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-07-09T17:58:57 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
a092c7eb38
commit
c0adff9615
|
@ -271,7 +271,9 @@ function actionContactCallback(http) {
|
||||||
var html = new Element("div").update(http.responseText);
|
var html = new Element("div").update(http.responseText);
|
||||||
var error = html.select("p").first().firstChild.nodeValue.trim();
|
var error = html.select("p").first().firstChild.nodeValue.trim();
|
||||||
log("actionContactCallback failed: error " + http.status + " (" + error + ")");
|
log("actionContactCallback failed: error " + http.status + " (" + error + ")");
|
||||||
if (error)
|
if (parseInt(http.status) == 403)
|
||||||
|
window.alert(labels["You cannot delete the selected contact(s)"]);
|
||||||
|
else if (error)
|
||||||
window.alert(labels[error]);
|
window.alert(labels[error]);
|
||||||
refreshCurrentFolder();
|
refreshCurrentFolder();
|
||||||
}
|
}
|
||||||
|
@ -784,10 +786,13 @@ function onAddressBookMenuPrepareVisibility() {
|
||||||
function updateAddressBooksMenus() {
|
function updateAddressBooksMenus() {
|
||||||
var contactFoldersList = $("contactFolders");
|
var contactFoldersList = $("contactFolders");
|
||||||
if (contactFoldersList) {
|
if (contactFoldersList) {
|
||||||
|
var pageContent = $("pageContent");
|
||||||
var contactFolders = contactFoldersList.select("li");
|
var contactFolders = contactFoldersList.select("li");
|
||||||
var contactActions = new Hash({ move: onContactMenuMove,
|
var contactActions = new Hash({ move: onContactMenuMove,
|
||||||
copy: onContactMenuCopy });
|
copy: onContactMenuCopy });
|
||||||
contactActions.keys().each(function(key) {
|
var actions = contactActions.keys();
|
||||||
|
for (var j = 0; j < actions.size(); j++) {
|
||||||
|
var key = actions[j];
|
||||||
var callbacks = new Array();
|
var callbacks = new Array();
|
||||||
var menuId = key + "ContactMenu";
|
var menuId = key + "ContactMenu";
|
||||||
var menuDIV = $(menuId);
|
var menuDIV = $(menuId);
|
||||||
|
@ -795,7 +800,6 @@ function updateAddressBooksMenus() {
|
||||||
menuDIV.parentNode.removeChild(menuDIV);
|
menuDIV.parentNode.removeChild(menuDIV);
|
||||||
|
|
||||||
menuDIV = document.createElement("div");
|
menuDIV = document.createElement("div");
|
||||||
pageContent = $("pageContent");
|
|
||||||
pageContent.appendChild(menuDIV);
|
pageContent.appendChild(menuDIV);
|
||||||
|
|
||||||
var menu = document.createElement("ul");
|
var menu = document.createElement("ul");
|
||||||
|
@ -817,7 +821,7 @@ function updateAddressBooksMenus() {
|
||||||
}
|
}
|
||||||
menuDIV.prepareVisibility = onAddressBookMenuPrepareVisibility;
|
menuDIV.prepareVisibility = onAddressBookMenuPrepareVisibility;
|
||||||
initMenu(menuDIV, callbacks);
|
initMenu(menuDIV, callbacks);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue