mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
Mantis 3319: gestion des labels JavaScript
Monotone-Parent: 354ed3b0a354fd29a34c03d0b9f2d7961066e075 Monotone-Revision: 9ce00a7f3dabe1a68fa6eb5c0dc5e85403287b76 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-09-11T20:25:06 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -225,7 +225,7 @@ function _onContactMenuAction(folderItem, action, refresh) {
|
||||
|
||||
for (var i = 0; i < contactIds.length; i++) {
|
||||
if (contactIds[i].endsWith ("vlf")) {
|
||||
alert (labels["Lists can't be moved or copied."]);
|
||||
alert (label ("Lists can't be moved or copied."));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -274,7 +274,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(clabels["You don't have the required privileges to perform the operation."]);
|
||||
window.alert(label ("You don't have the required privileges to perform the operation."));
|
||||
else if (error)
|
||||
window.alert(labels[error]);
|
||||
refreshCurrentFolder();
|
||||
@@ -396,7 +396,7 @@ function onToolbarEditSelectedContacts(event) {
|
||||
var rows = contactsList.getSelectedRowsId();
|
||||
|
||||
if (rows.length == 0) {
|
||||
window.alert(labels["Please select a contact."]);
|
||||
window.alert(label ("Please select a contact."));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ function onToolbarDeleteSelectedContacts(event) {
|
||||
var rows = contactsList.getSelectedRowsId();
|
||||
|
||||
if (rows.length) {
|
||||
var label = labels["Are you sure you want to delete the selected contacts?"];
|
||||
var label = label ("Are you sure you want to delete the selected contacts?");
|
||||
if (window.confirm(label)) {
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
delete cachedContacts[Contact.currentAddressBook + "/" + rows[i]];
|
||||
@@ -446,7 +446,7 @@ function onToolbarDeleteSelectedContacts(event) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
window.alert(labels["Please select a contact."]);
|
||||
window.alert(label ("Please select a contact."));
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -528,7 +528,7 @@ function newList(sender) {
|
||||
if (!li.hasClassName ("remote"))
|
||||
openContactWindow(URLForFolderID(Contact.currentAddressBook) + "/newlist");
|
||||
else
|
||||
alert (clabels["You cannot create a list in a shared address book."]);
|
||||
alert (label ("You cannot create a list in a shared address book."));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -615,7 +615,7 @@ function refreshContacts(cname) {
|
||||
}
|
||||
|
||||
function onAddressBookNew(event) {
|
||||
createFolder(window.prompt(labels["Name of the Address Book"], ""),
|
||||
createFolder(window.prompt(label ("Name of the Address Book"), ""),
|
||||
appendAddressBook);
|
||||
preventDefault(event);
|
||||
}
|
||||
@@ -723,9 +723,9 @@ function uploadCompleted (response) {
|
||||
var div = $("uploadResults");
|
||||
$("uploadOK").onclick = hideImportResults;
|
||||
if (data.imported <= 0)
|
||||
$("uploadResultsContent").update (labels["An error occured while importing contacts."]);
|
||||
$("uploadResultsContent").update (label ("An error occured while importing contacts."));
|
||||
else {
|
||||
$("uploadResultsContent").update (labels["Imported contacts:"] + " " + data.imported);
|
||||
$("uploadResultsContent").update (label ("Imported contacts:") + " " + data.imported);
|
||||
refreshCurrentFolder ();
|
||||
}
|
||||
|
||||
@@ -741,7 +741,7 @@ function onAddressBookRemove(event) {
|
||||
node.deselect();
|
||||
var owner = node.getAttribute("owner");
|
||||
if (owner == "nobody") {
|
||||
var label = labels["You cannot remove nor unsubscribe from a public addressbook."];
|
||||
var label = label ("You cannot remove nor unsubscribe from a public addressbook.");
|
||||
window.alert(label);
|
||||
}
|
||||
else if (owner == UserLogin) {
|
||||
@@ -764,12 +764,12 @@ function onAddressBookRemove(event) {
|
||||
|
||||
function deletePersonalAddressBook(folderId) {
|
||||
if (folderId == "personal") {
|
||||
var label = labels["You cannot remove nor unsubscribe from your personal addressbook."];
|
||||
var label = label ("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?"];
|
||||
= label ("Are you sure you want to delete the selected address book?");
|
||||
if (window.confirm(label)) {
|
||||
if (document.deletePersonalABAjaxRequest) {
|
||||
document.deletePersonalABAjaxRequest.aborted = true;
|
||||
@@ -944,7 +944,7 @@ function onAddressBookModify(event) {
|
||||
|
||||
if (UserLogin == selected.getAttribute("owner")) {
|
||||
var currentName = selected.innerHTML;
|
||||
var newName = window.prompt(labels["Address Book Name"],
|
||||
var newName = window.prompt(label ("Address Book Name"),
|
||||
currentName);
|
||||
if (newName && newName.length > 0
|
||||
&& newName != currentName) {
|
||||
@@ -954,7 +954,7 @@ function onAddressBookModify(event) {
|
||||
{node: selected, name: newName});
|
||||
}
|
||||
} else
|
||||
window.alert(clabels["Unable to rename that folder!"]);
|
||||
window.alert(label ("Unable to rename that folder!"));
|
||||
}
|
||||
|
||||
function folderRenameCallback(http) {
|
||||
@@ -1271,7 +1271,7 @@ function dropSelectedContacts (action, toId) {
|
||||
var contactIds = $('contactsList').getSelectedRowsId();
|
||||
for (var i = 0; i < contactIds.length; i++) {
|
||||
if (contactIds[i].endsWith ("vlf")) {
|
||||
alert (labels["Lists can't be moved or copied."]);
|
||||
alert (label ("Lists can't be moved or copied."));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user