Monotone-Parent: 30d54dc507398dda32b17cb2c4b9c8e6b601087d
Monotone-Revision: 02e6aaa1be72203deecd9d1b0f94d9491729cafc Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-09-16T20:25:47 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
d1bfb3572d
commit
9e29b464cb
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
||||||
|
2009-09-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* UI/WebServerResources/AdministrationUI.js,
|
||||||
|
UI/WebServerResources/ContactsUI.js,
|
||||||
|
UI/WebServerResources/MailerUI.js,
|
||||||
|
UI/WebServerResources/MailerUIdTree.js,
|
||||||
|
UI/WebServerResources/SchedulerUI.js,
|
||||||
|
UI/WebServerResources/UIxAclEditor.js,
|
||||||
|
UI/WebServerResources/UIxCalendarProperties.js,
|
||||||
|
UI/WebServerResources/UIxComponentEditor.js,
|
||||||
|
UI/WebServerResources/UIxContactsUserFolders.js,
|
||||||
|
UI/WebServerResources/UIxMailEditor.js,
|
||||||
|
UI/WebServerResources/UIxPreferences.js,
|
||||||
|
UI/WebServerResources/UIxTaskEditor.js,
|
||||||
|
UI/WebServerResources/generic.js: renamed the function "label" to
|
||||||
|
"getLabel" to avoid overriding local function variables.
|
||||||
|
|
||||||
2009-09-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2009-09-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* UI/WebServerResources/MailerUI.js (configureLoadImagesButton):
|
* UI/WebServerResources/MailerUI.js (configureLoadImagesButton):
|
||||||
|
|
|
@ -92,7 +92,7 @@ function addUserLineToTree(tree, parent, line) {
|
||||||
'', '',
|
'', '',
|
||||||
ResourcesURL + '/abcard.gif',
|
ResourcesURL + '/abcard.gif',
|
||||||
ResourcesURL + '/abcard.gif');
|
ResourcesURL + '/abcard.gif');
|
||||||
tree.add(parent + 1, parent, label ("Please wait..."), 0, '#', null,
|
tree.add(parent + 1, parent, getLabel("Please wait..."), 0, '#', null,
|
||||||
null, '', '', icon, icon);
|
null, '', '', icon, icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ function addFolderBranchToTree(tree, user, folder, nodeId, subId, isLast) {
|
||||||
|
|
||||||
function addFolderNotFoundNode (tree, nodeId) {
|
function addFolderNotFoundNode (tree, nodeId) {
|
||||||
var icon = ResourcesURL + '/icon_unread.gif';
|
var icon = ResourcesURL + '/icon_unread.gif';
|
||||||
var node = new Node(1, nodeId, label ("No possible subscription"), 0, '#',
|
var node = new Node(1, nodeId, getLabel("No possible subscription"), 0, '#',
|
||||||
null, null, '', '', icon, icon);
|
null, null, '', '', icon, icon);
|
||||||
node._ls = true;
|
node._ls = true;
|
||||||
return tree.node(node, (nodeId + 1), null);
|
return tree.node(node, (nodeId + 1), null);
|
||||||
|
|
|
@ -225,7 +225,7 @@ function _onContactMenuAction(folderItem, action, refresh) {
|
||||||
|
|
||||||
for (var i = 0; i < contactIds.length; i++) {
|
for (var i = 0; i < contactIds.length; i++) {
|
||||||
if (contactIds[i].endsWith ("vlf")) {
|
if (contactIds[i].endsWith ("vlf")) {
|
||||||
alert (label ("Lists can't be moved or copied."));
|
alert (getLabel("Lists can't be moved or copied."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -274,7 +274,7 @@ function actionContactCallback(http) {
|
||||||
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 (parseInt(http.status) == 403)
|
if (parseInt(http.status) == 403)
|
||||||
window.alert(label ("You don't have the required privileges to perform the operation."));
|
window.alert(getLabel("You don't have the required privileges to perform the operation."));
|
||||||
else if (error)
|
else if (error)
|
||||||
window.alert(labels[error]);
|
window.alert(labels[error]);
|
||||||
refreshCurrentFolder();
|
refreshCurrentFolder();
|
||||||
|
@ -396,7 +396,7 @@ function onToolbarEditSelectedContacts(event) {
|
||||||
var rows = contactsList.getSelectedRowsId();
|
var rows = contactsList.getSelectedRowsId();
|
||||||
|
|
||||||
if (rows.length == 0) {
|
if (rows.length == 0) {
|
||||||
window.alert(label ("Please select a contact."));
|
window.alert(getLabel("Please select a contact."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,7 +433,7 @@ function onToolbarDeleteSelectedContacts(event) {
|
||||||
var rows = contactsList.getSelectedRowsId();
|
var rows = contactsList.getSelectedRowsId();
|
||||||
|
|
||||||
if (rows.length) {
|
if (rows.length) {
|
||||||
var label = label ("Are you sure you want to delete the selected contacts?");
|
var label = getLabel("Are you sure you want to delete the selected contacts?");
|
||||||
if (window.confirm(label)) {
|
if (window.confirm(label)) {
|
||||||
for (var i = 0; i < rows.length; i++) {
|
for (var i = 0; i < rows.length; i++) {
|
||||||
delete cachedContacts[Contact.currentAddressBook + "/" + rows[i]];
|
delete cachedContacts[Contact.currentAddressBook + "/" + rows[i]];
|
||||||
|
@ -446,7 +446,7 @@ function onToolbarDeleteSelectedContacts(event) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
window.alert(label ("Please select a contact."));
|
window.alert(getLabel("Please select a contact."));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -526,7 +526,7 @@ function newContact(sender) {
|
||||||
function newList(sender) {
|
function newList(sender) {
|
||||||
var li = $(Contact.currentAddressBook);
|
var li = $(Contact.currentAddressBook);
|
||||||
if (li.hasClassName ("remote"))
|
if (li.hasClassName ("remote"))
|
||||||
alert (label ("You cannot create a list in a shared address book."));
|
alert (getLabel("You cannot create a list in a shared address book."));
|
||||||
else
|
else
|
||||||
openContactWindow(URLForFolderID(Contact.currentAddressBook) + "/newlist");
|
openContactWindow(URLForFolderID(Contact.currentAddressBook) + "/newlist");
|
||||||
return false;
|
return false;
|
||||||
|
@ -615,7 +615,7 @@ function refreshContacts(cname) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onAddressBookNew(event) {
|
function onAddressBookNew(event) {
|
||||||
createFolder(window.prompt(label ("Name of the Address Book"), ""),
|
createFolder(window.prompt(getLabel("Name of the Address Book"), ""),
|
||||||
appendAddressBook);
|
appendAddressBook);
|
||||||
preventDefault(event);
|
preventDefault(event);
|
||||||
}
|
}
|
||||||
|
@ -723,9 +723,9 @@ function uploadCompleted (response) {
|
||||||
var div = $("uploadResults");
|
var div = $("uploadResults");
|
||||||
$("uploadOK").onclick = hideImportResults;
|
$("uploadOK").onclick = hideImportResults;
|
||||||
if (data.imported <= 0)
|
if (data.imported <= 0)
|
||||||
$("uploadResultsContent").update (label ("An error occured while importing contacts."));
|
$("uploadResultsContent").update (getLabel("An error occured while importing contacts."));
|
||||||
else {
|
else {
|
||||||
$("uploadResultsContent").update (label ("Imported contacts:") + " " + data.imported);
|
$("uploadResultsContent").update (getLabel("Imported contacts:") + " " + data.imported);
|
||||||
refreshCurrentFolder ();
|
refreshCurrentFolder ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -741,7 +741,7 @@ function onAddressBookRemove(event) {
|
||||||
node.deselect();
|
node.deselect();
|
||||||
var owner = node.getAttribute("owner");
|
var owner = node.getAttribute("owner");
|
||||||
if (owner == "nobody") {
|
if (owner == "nobody") {
|
||||||
var label = label ("You cannot remove nor unsubscribe from a public addressbook.");
|
var label = getLabel("You cannot remove nor unsubscribe from a public addressbook.");
|
||||||
window.alert(label);
|
window.alert(label);
|
||||||
}
|
}
|
||||||
else if (owner == UserLogin) {
|
else if (owner == UserLogin) {
|
||||||
|
@ -764,12 +764,12 @@ function onAddressBookRemove(event) {
|
||||||
|
|
||||||
function deletePersonalAddressBook(folderId) {
|
function deletePersonalAddressBook(folderId) {
|
||||||
if (folderId == "personal") {
|
if (folderId == "personal") {
|
||||||
var label = label ("You cannot remove nor unsubscribe from your personal addressbook.");
|
var label = getLabel("You cannot remove nor unsubscribe from your personal addressbook.");
|
||||||
window.alert(label);
|
window.alert(label);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var label
|
var label
|
||||||
= label ("Are you sure you want to delete the selected address book?");
|
= getLabel("Are you sure you want to delete the selected address book?");
|
||||||
if (window.confirm(label)) {
|
if (window.confirm(label)) {
|
||||||
if (document.deletePersonalABAjaxRequest) {
|
if (document.deletePersonalABAjaxRequest) {
|
||||||
document.deletePersonalABAjaxRequest.aborted = true;
|
document.deletePersonalABAjaxRequest.aborted = true;
|
||||||
|
@ -944,7 +944,7 @@ function onAddressBookModify(event) {
|
||||||
|
|
||||||
if (UserLogin == selected.getAttribute("owner")) {
|
if (UserLogin == selected.getAttribute("owner")) {
|
||||||
var currentName = selected.innerHTML;
|
var currentName = selected.innerHTML;
|
||||||
var newName = window.prompt(label ("Address Book Name"),
|
var newName = window.prompt(getLabel("Address Book Name"),
|
||||||
currentName);
|
currentName);
|
||||||
if (newName && newName.length > 0
|
if (newName && newName.length > 0
|
||||||
&& newName != currentName) {
|
&& newName != currentName) {
|
||||||
|
@ -954,7 +954,7 @@ function onAddressBookModify(event) {
|
||||||
{node: selected, name: newName});
|
{node: selected, name: newName});
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
window.alert(label ("Unable to rename that folder!"));
|
window.alert(getLabel("Unable to rename that folder!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function folderRenameCallback(http) {
|
function folderRenameCallback(http) {
|
||||||
|
@ -1271,7 +1271,7 @@ function dropSelectedContacts (action, toId) {
|
||||||
var contactIds = $('contactsList').getSelectedRowsId();
|
var contactIds = $('contactsList').getSelectedRowsId();
|
||||||
for (var i = 0; i < contactIds.length; i++) {
|
for (var i = 0; i < contactIds.length; i++) {
|
||||||
if (contactIds[i].endsWith ("vlf")) {
|
if (contactIds[i].endsWith ("vlf")) {
|
||||||
alert (label ("Lists can't be moved or copied."));
|
alert (getLabel("Lists can't be moved or copied."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,7 +207,7 @@ function openMessageWindowsForSelection(action, firstOnly) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
window.alert(label ("Please select a message."));
|
window.alert(getLabel("Please select a message."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,7 +378,7 @@ function deleteSelectedMessages(sender) {
|
||||||
{ "Content-type": "application/x-www-form-urlencoded" });
|
{ "Content-type": "application/x-www-form-urlencoded" });
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window.alert(label ("Please select a message."));
|
window.alert(getLabel("Please select a message."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -447,10 +447,10 @@ function deleteMessageWithDelay(url, id, mailbox, messageId) {
|
||||||
function onPrintCurrentMessage(event) {
|
function onPrintCurrentMessage(event) {
|
||||||
var rowIds = $("messageList").getSelectedRowsId();
|
var rowIds = $("messageList").getSelectedRowsId();
|
||||||
if (rowIds.length == 0) {
|
if (rowIds.length == 0) {
|
||||||
window.alert(label ("Please select a message to print."));
|
window.alert(getLabel("Please select a message to print."));
|
||||||
}
|
}
|
||||||
else if (rowIds.length > 1) {
|
else if (rowIds.length > 1) {
|
||||||
window.alert(label ("Please select only one message to print."));
|
window.alert(getLabel("Please select only one message to print."));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window.print();
|
window.print();
|
||||||
|
@ -1240,7 +1240,7 @@ function messageCallback(http) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (http.status == 404) {
|
else if (http.status == 404) {
|
||||||
alert (label ("The message you have selected doesn't exist anymore."));
|
alert (getLabel("The message you have selected doesn't exist anymore."));
|
||||||
window.location.reload ();
|
window.location.reload ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1661,7 +1661,7 @@ function updateMailboxTreeInPage() {
|
||||||
/ Mailer.quotas.maxQuota)
|
/ Mailer.quotas.maxQuota)
|
||||||
/ 100);
|
/ 100);
|
||||||
var level = (percents > 85)? "alert" : (percents > 70)? "warn" : "ok";
|
var level = (percents > 85)? "alert" : (percents > 70)? "warn" : "ok";
|
||||||
var format = label ("quotasFormat");
|
var format = getLabel("quotasFormat");
|
||||||
var text = format.formatted(percents,
|
var text = format.formatted(percents,
|
||||||
Math.round(Mailer.quotas.maxQuota/10.24)/100);
|
Math.round(Mailer.quotas.maxQuota/10.24)/100);
|
||||||
var quotaDiv = new Element('div', { 'class': 'quota', 'info': text });
|
var quotaDiv = new Element('div', { 'class': 'quota', 'info': text });
|
||||||
|
@ -1727,7 +1727,7 @@ function generateMenuForMailbox(mailbox, prefix, callback) {
|
||||||
if (mailbox.type != "account") {
|
if (mailbox.type != "account") {
|
||||||
var newNode = document.createElement("li");
|
var newNode = document.createElement("li");
|
||||||
newNode.mailbox = mailbox;
|
newNode.mailbox = mailbox;
|
||||||
newNode.appendChild(document.createTextNode(label ("This Folder")));
|
newNode.appendChild(document.createTextNode(getLabel("This Folder")));
|
||||||
menu.appendChild(newNode);
|
menu.appendChild(newNode);
|
||||||
menu.appendChild(document.createElement("li"));
|
menu.appendChild(document.createElement("li"));
|
||||||
callbacks.push(callback);
|
callbacks.push(callback);
|
||||||
|
@ -1921,7 +1921,7 @@ function saveFoldersStateCallback(http) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMenuCreateFolder(event) {
|
function onMenuCreateFolder(event) {
|
||||||
var name = window.prompt(label ("Name :"), "");
|
var name = window.prompt(getLabel("Name :"), "");
|
||||||
if (name && name.length > 0) {
|
if (name && name.length > 0) {
|
||||||
var folderID = document.menuTarget.getAttribute("dataname");
|
var folderID = document.menuTarget.getAttribute("dataname");
|
||||||
var urlstr = URLForFolderID(folderID) + "/createFolder?name=" + encodeURIComponent(name);
|
var urlstr = URLForFolderID(folderID) + "/createFolder?name=" + encodeURIComponent(name);
|
||||||
|
@ -1932,7 +1932,7 @@ function onMenuCreateFolder(event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMenuRenameFolder(event) {
|
function onMenuRenameFolder(event) {
|
||||||
var name = window.prompt(label ("Enter the new name of your folder :"),
|
var name = window.prompt(getLabel("Enter the new name of your folder :"),
|
||||||
"");
|
"");
|
||||||
if (name && name.length > 0) {
|
if (name && name.length > 0) {
|
||||||
var folderID = document.menuTarget.getAttribute("dataname");
|
var folderID = document.menuTarget.getAttribute("dataname");
|
||||||
|
@ -1944,11 +1944,11 @@ function onMenuRenameFolder(event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMenuDeleteFolder(event) {
|
function onMenuDeleteFolder(event) {
|
||||||
var answer = window.confirm(label ("Do you really want to move this folder into the trash ?"));
|
var answer = window.confirm(getLabel("Do you really want to move this folder into the trash ?"));
|
||||||
if (answer) {
|
if (answer) {
|
||||||
var folderID = document.menuTarget.getAttribute("dataname");
|
var folderID = document.menuTarget.getAttribute("dataname");
|
||||||
var urlstr = URLForFolderID(folderID) + "/delete";
|
var urlstr = URLForFolderID(folderID) + "/delete";
|
||||||
var errorLabel = label ("The folder could not be deleted.");
|
var errorLabel = getLabel("The folder could not be deleted.");
|
||||||
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1962,7 +1962,7 @@ function onMenuExpungeFolder(event) {
|
||||||
function onMenuEmptyTrash(event) {
|
function onMenuEmptyTrash(event) {
|
||||||
var folderID = document.menuTarget.getAttribute("dataname");
|
var folderID = document.menuTarget.getAttribute("dataname");
|
||||||
var urlstr = URLForFolderID(folderID) + "/emptyTrash";
|
var urlstr = URLForFolderID(folderID) + "/emptyTrash";
|
||||||
var errorLabel = label ("The trash could not be emptied.");
|
var errorLabel = getLabel("The trash could not be emptied.");
|
||||||
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
||||||
|
|
||||||
if (folderID == Mailer.currentMailbox) {
|
if (folderID == Mailer.currentMailbox) {
|
||||||
|
@ -1979,11 +1979,11 @@ function onMenuEmptyTrash(event) {
|
||||||
function _onMenuChangeToXXXFolder(event, folder) {
|
function _onMenuChangeToXXXFolder(event, folder) {
|
||||||
var type = document.menuTarget.getAttribute("datatype");
|
var type = document.menuTarget.getAttribute("datatype");
|
||||||
if (type == "additional")
|
if (type == "additional")
|
||||||
window.alert(label ("You need to choose a non-virtual folder!"));
|
window.alert(getLabel("You need to choose a non-virtual folder!"));
|
||||||
else {
|
else {
|
||||||
var folderID = document.menuTarget.getAttribute("dataname");
|
var folderID = document.menuTarget.getAttribute("dataname");
|
||||||
var urlstr = URLForFolderID(folderID) + "/setAs" + folder + "Folder";
|
var urlstr = URLForFolderID(folderID) + "/setAs" + folder + "Folder";
|
||||||
var errorLabel = label ("The folder functionality could not be changed.");
|
var errorLabel = getLabel("The folder functionality could not be changed.");
|
||||||
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
triggerAjaxRequest(urlstr, folderOperationCallback, errorLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2102,7 +2102,7 @@ function folderRefreshCallback(http) {
|
||||||
row.show();
|
row.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.alert(label ("Operation failed"));
|
window.alert(getLabel("Operation failed"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2183,7 +2183,7 @@ function saveAs(event) {
|
||||||
window.open(url+"?id="+uids+"&uid="+uids+"&mailbox="+Mailer.currentMailbox+"&path="+paths);
|
window.open(url+"?id="+uids+"&uid="+uids+"&mailbox="+Mailer.currentMailbox+"&path="+paths);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window.alert(label ("Please select a message."));
|
window.alert(getLabel("Please select a message."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,10 @@ var MailerUIdTreeExtension = {
|
||||||
sent: "tbtv_sent_17x17.png",
|
sent: "tbtv_sent_17x17.png",
|
||||||
draft: "tbtv_drafts_17x17.png",
|
draft: "tbtv_drafts_17x17.png",
|
||||||
trash: "tbtv_trash_17x17.png" },
|
trash: "tbtv_trash_17x17.png" },
|
||||||
folderNames: { inbox: label ("InboxFolderName"),
|
folderNames: { inbox: getLabel("InboxFolderName"),
|
||||||
sent: label ("SentFolderName"),
|
sent: getLabel("SentFolderName"),
|
||||||
draft: label ("DraftsFolderName"),
|
draft: getLabel("DraftsFolderName"),
|
||||||
trash: label ("TrashFolderName") },
|
trash: getLabel("TrashFolderName") },
|
||||||
_addFolderNode: function (parent, name, fullName, type, unseen) {
|
_addFolderNode: function (parent, name, fullName, type, unseen) {
|
||||||
var icon = this.folderIcons[type];
|
var icon = this.folderIcons[type];
|
||||||
if (icon)
|
if (icon)
|
||||||
|
|
|
@ -87,7 +87,7 @@ function editEvent() {
|
||||||
var nodes = listOfSelection.getSelectedRows();
|
var nodes = listOfSelection.getSelectedRows();
|
||||||
|
|
||||||
if (nodes.length == 0) {
|
if (nodes.length == 0) {
|
||||||
window.alert(label ("Please select an event or a task."));
|
window.alert(getLabel("Please select an event or a task."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ function editEvent() {
|
||||||
_editEventId(selectedCalendarCell[0].cname,
|
_editEventId(selectedCalendarCell[0].cname,
|
||||||
selectedCalendarCell[0].calendar);
|
selectedCalendarCell[0].calendar);
|
||||||
} else {
|
} else {
|
||||||
window.alert(label ("Please select an event or a task."));
|
window.alert(getLabel("Please select an event or a task."));
|
||||||
}
|
}
|
||||||
|
|
||||||
return false; /* stop following the link */
|
return false; /* stop following the link */
|
||||||
|
@ -124,9 +124,9 @@ function deleteEvent() {
|
||||||
if (nodes.length > 0) {
|
if (nodes.length > 0) {
|
||||||
var label = "";
|
var label = "";
|
||||||
if (listOfSelection == $("tasksList"))
|
if (listOfSelection == $("tasksList"))
|
||||||
label = label ("taskDeleteConfirmation");
|
label = getLabel("taskDeleteConfirmation");
|
||||||
else
|
else
|
||||||
label = label ("eventDeleteConfirmation");
|
label = getLabel("eventDeleteConfirmation");
|
||||||
|
|
||||||
if (nodes.length == 1
|
if (nodes.length == 1
|
||||||
&& nodes[0].recurrenceTime) {
|
&& nodes[0].recurrenceTime) {
|
||||||
|
@ -157,7 +157,7 @@ function deleteEvent() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
window.alert(label ("Please select an event or a task."));
|
window.alert(getLabel("Please select an event or a task."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (selectedCalendarCell) {
|
else if (selectedCalendarCell) {
|
||||||
|
@ -165,7 +165,7 @@ function deleteEvent() {
|
||||||
_editRecurrenceDialog(selectedCalendarCell[0], "confirmDeletion");
|
_editRecurrenceDialog(selectedCalendarCell[0], "confirmDeletion");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
var label = label ("eventDeleteConfirmation");
|
var label = getLabel("eventDeleteConfirmation");
|
||||||
if (confirm(label)) {
|
if (confirm(label)) {
|
||||||
if (document.deleteEventAjaxRequest) {
|
if (document.deleteEventAjaxRequest) {
|
||||||
document.deleteEventAjaxRequest.aborted = true;
|
document.deleteEventAjaxRequest.aborted = true;
|
||||||
|
@ -178,7 +178,7 @@ function deleteEvent() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window.alert(label ("Please select an event or a task."));
|
window.alert(getLabel("Please select an event or a task."));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -208,12 +208,12 @@ function closeInvitationWindow() {
|
||||||
closePseudoWin.style.top = "0px;";
|
closePseudoWin.style.top = "0px;";
|
||||||
closePseudoWin.style.left = "0px;";
|
closePseudoWin.style.left = "0px;";
|
||||||
closePseudoWin.style.right = "0px;";
|
closePseudoWin.style.right = "0px;";
|
||||||
closePseudoWin.appendChild(document.createTextNode(label ("closeThisWindowMessage")));
|
closePseudoWin.appendChild(document.createTextNode(getLabel("closeThisWindowMessage")));
|
||||||
|
|
||||||
var calLink = document.createElement("a");
|
var calLink = document.createElement("a");
|
||||||
closePseudoWin.appendChild(calLink);
|
closePseudoWin.appendChild(calLink);
|
||||||
calLink.href = ApplicationBaseURL;
|
calLink.href = ApplicationBaseURL;
|
||||||
calLink.appendChild(document.createTextNode(label ("Calendar").toLowerCase()));
|
calLink.appendChild(document.createTextNode(getLabel("Calendar").toLowerCase()));
|
||||||
}
|
}
|
||||||
|
|
||||||
function modifyEventCallback(http) {
|
function modifyEventCallback(http) {
|
||||||
|
@ -234,7 +234,7 @@ function modifyEventCallback(http) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// log("showing alert...");
|
// log("showing alert...");
|
||||||
window.alert(label ("eventPartStatModificationError"));
|
window.alert(getLabel("eventPartStatModificationError"));
|
||||||
}
|
}
|
||||||
document.modifyEventAjaxRequest = null;
|
document.modifyEventAjaxRequest = null;
|
||||||
}
|
}
|
||||||
|
@ -295,7 +295,7 @@ function deleteEventCallback(http) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (parseInt(http.status) == 403)
|
else if (parseInt(http.status) == 403)
|
||||||
window.alert(label ("You don't have the required privileges to perform the operation."));
|
window.alert(getLabel("You don't have the required privileges to perform the operation."));
|
||||||
else
|
else
|
||||||
log ("deleteEventCallback Ajax error (" + http.status + ")");
|
log ("deleteEventCallback Ajax error (" + http.status + ")");
|
||||||
}
|
}
|
||||||
|
@ -1888,7 +1888,7 @@ function updateCalendarProperties(calendarID, calendarName, calendarColor) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onCalendarNew(event) {
|
function onCalendarNew(event) {
|
||||||
createFolder(window.prompt(label ("Name of the Calendar"), ""),
|
createFolder(window.prompt(getLabel("Name of the Calendar"), ""),
|
||||||
appendCalendar);
|
appendCalendar);
|
||||||
preventDefault(event);
|
preventDefault(event);
|
||||||
}
|
}
|
||||||
|
@ -1899,7 +1899,7 @@ function onCalendarAdd(event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onCalendarWebAdd(event) {
|
function onCalendarWebAdd(event) {
|
||||||
var calendarUrl = window.prompt(label ("URL of the Calendar"), "");
|
var calendarUrl = window.prompt(getLabel("URL of the Calendar"), "");
|
||||||
if (calendarUrl) {
|
if (calendarUrl) {
|
||||||
if (document.addWebCalendarRequest) {
|
if (document.addWebCalendarRequest) {
|
||||||
document.addWebCalendarRequest.aborted = true;
|
document.addWebCalendarRequest.aborted = true;
|
||||||
|
@ -1919,7 +1919,7 @@ function addWebCalendarCallback (http) {
|
||||||
changeCalendarDisplay();
|
changeCalendarDisplay();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert (label ("An error occured while importing calendar."));
|
alert (getLabel("An error occured while importing calendar."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1975,9 +1975,9 @@ function uploadCompleted (response) {
|
||||||
var div = $("uploadResults");
|
var div = $("uploadResults");
|
||||||
$("uploadOK").onclick = hideImportResults;
|
$("uploadOK").onclick = hideImportResults;
|
||||||
if (data.imported <= 0)
|
if (data.imported <= 0)
|
||||||
$("uploadResultsContent").update (label ("An error occured while importing calendar."));
|
$("uploadResultsContent").update (getLabel("An error occured while importing calendar."));
|
||||||
else {
|
else {
|
||||||
$("uploadResultsContent").update (label ("Imported events:") + " " + data.imported);
|
$("uploadResultsContent").update (getLabel("Imported events:") + " " + data.imported);
|
||||||
refreshEventsAndDisplay ();
|
refreshEventsAndDisplay ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2009,7 +2009,7 @@ function appendCalendar(folderName, folderPath) {
|
||||||
//log ("append name: " + folderName + "; path: " + folderPath + "; owner: " + owner);
|
//log ("append name: " + folderName + "; path: " + folderPath + "; owner: " + owner);
|
||||||
|
|
||||||
if ($(folderPath))
|
if ($(folderPath))
|
||||||
window.alert(label ("You have already subscribed to that folder!"));
|
window.alert(getLabel("You have already subscribed to that folder!"));
|
||||||
else {
|
else {
|
||||||
var calendarList = $("calendarList");
|
var calendarList = $("calendarList");
|
||||||
var items = calendarList.select("li");
|
var items = calendarList.select("li");
|
||||||
|
|
|
@ -101,7 +101,7 @@ function subscribeToFolder(refreshCallback, refreshCallbackData) {
|
||||||
refreshCallbackData["folder"]);
|
refreshCallbackData["folder"]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
refreshCallbackData["window"].alert(label ("You cannot subscribe to a folder that you own!"));
|
refreshCallbackData["window"].alert(getLabel("You cannot subscribe to a folder that you own!"));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,25 +32,25 @@ function onOKClick(event) {
|
||||||
if (tag
|
if (tag
|
||||||
&& $("synchronizeCalendar").checked) {
|
&& $("synchronizeCalendar").checked) {
|
||||||
if (tag.value.blank()) {
|
if (tag.value.blank()) {
|
||||||
alert(label ("tagNotDefined"));
|
alert(getLabel("tagNotDefined"));
|
||||||
save = false;
|
save = false;
|
||||||
}
|
}
|
||||||
else if (allTags
|
else if (allTags
|
||||||
&& allTags.indexOf(tag.value) > -1) {
|
&& allTags.indexOf(tag.value) > -1) {
|
||||||
alert(label ("tagAlreadyExists"));
|
alert(getLabel("tagAlreadyExists"));
|
||||||
save = false;
|
save = false;
|
||||||
}
|
}
|
||||||
else if (originalTag
|
else if (originalTag
|
||||||
&& !originalTag.value.blank()) {
|
&& !originalTag.value.blank()) {
|
||||||
if (tag.value != originalTag.value)
|
if (tag.value != originalTag.value)
|
||||||
save = confirm(label ("tagHasChanged"));
|
save = confirm(getLabel("tagHasChanged"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
save = confirm(label ("tagWasAdded"));
|
save = confirm(getLabel("tagWasAdded"));
|
||||||
}
|
}
|
||||||
else if (originalTag
|
else if (originalTag
|
||||||
&& !originalTag.value.blank())
|
&& !originalTag.value.blank())
|
||||||
save = confirm(label ("tagWasRemoved"));
|
save = confirm(getLabel("tagWasRemoved"));
|
||||||
|
|
||||||
if (save)
|
if (save)
|
||||||
window.opener.updateCalendarProperties(calendarID.value,
|
window.opener.updateCalendarProperties(calendarID.value,
|
||||||
|
|
|
@ -25,7 +25,7 @@ function onPopupAttachWindow(event) {
|
||||||
preventDefault(event);
|
preventDefault(event);
|
||||||
|
|
||||||
var attachInput = document.getElementById("attach");
|
var attachInput = document.getElementById("attach");
|
||||||
var newAttach = window.prompt(label ("Target:"), attachInput.value || "http://");
|
var newAttach = window.prompt(getLabel("Target:"), attachInput.value || "http://");
|
||||||
if (newAttach != null) {
|
if (newAttach != null) {
|
||||||
var documentHref = $("documentHref");
|
var documentHref = $("documentHref");
|
||||||
var documentLabel = $("documentLabel");
|
var documentLabel = $("documentLabel");
|
||||||
|
|
|
@ -46,7 +46,7 @@ function addUserLineToTree(tree, parent, line) {
|
||||||
ResourcesURL + '/abcard.gif',
|
ResourcesURL + '/abcard.gif',
|
||||||
ResourcesURL + '/abcard.gif');
|
ResourcesURL + '/abcard.gif');
|
||||||
if (window.opener.userFolderType != "user") {
|
if (window.opener.userFolderType != "user") {
|
||||||
tree.add(parent + 1, parent, label ("Please wait..."), 0, '#', null,
|
tree.add(parent + 1, parent, getLabel("Please wait..."), 0, '#', null,
|
||||||
null, '', '', icon, icon);
|
null, '', '', icon, icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ function addFolderBranchToTree(tree, user, folder, nodeId, subId, isLast) {
|
||||||
|
|
||||||
function addFolderNotFoundNode (tree, nodeId) {
|
function addFolderNotFoundNode (tree, nodeId) {
|
||||||
var icon = ResourcesURL + '/icon_unread.gif';
|
var icon = ResourcesURL + '/icon_unread.gif';
|
||||||
var node = new Node(1, nodeId, label ("No possible subscription"), 0, '#',
|
var node = new Node(1, nodeId, getLabel("No possible subscription"), 0, '#',
|
||||||
null, null, '', '', icon, icon);
|
null, null, '', '', icon, icon);
|
||||||
node._ls = true;
|
node._ls = true;
|
||||||
return tree.node(node, (nodeId + 1));
|
return tree.node(node, (nodeId + 1));
|
||||||
|
@ -216,7 +216,7 @@ function onConfirmFolderSelection(event) {
|
||||||
|
|
||||||
var data = { folderName: folderName, folder: folder, window: window };
|
var data = { folderName: folderName, folder: folder, window: window };
|
||||||
if (parent$(accessToSubscribedFolder(folder)))
|
if (parent$(accessToSubscribedFolder(folder)))
|
||||||
window.alert(label ("You have already subscribed to that folder!"));
|
window.alert(getLabel("You have already subscribed to that folder!"));
|
||||||
else
|
else
|
||||||
window.opener.subscribeToFolder(window.opener.userFolderCallback, data);
|
window.opener.subscribeToFolder(window.opener.userFolderCallback, data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,13 +112,13 @@ function validateEditorInput(sender) {
|
||||||
|
|
||||||
field = document.pageform.subject;
|
field = document.pageform.subject;
|
||||||
if (field.value == "")
|
if (field.value == "")
|
||||||
errortext = errortext + label ("error_missingsubject") + "\n";
|
errortext = errortext + getLabel("error_missingsubject") + "\n";
|
||||||
|
|
||||||
if (!hasRecipients())
|
if (!hasRecipients())
|
||||||
errortext = errortext + label ("error_missingrecipients") + "\n";
|
errortext = errortext + getLabel("error_missingrecipients") + "\n";
|
||||||
|
|
||||||
if (errortext.length > 0) {
|
if (errortext.length > 0) {
|
||||||
alert(label ("error_validationfailed") + ":\n" + errortext);
|
alert(getLabel("error_validationfailed") + ":\n" + errortext);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -235,7 +235,7 @@ function onComposeMessagesTypeChange(event) {
|
||||||
if (event) {
|
if (event) {
|
||||||
// Due to a limitation of CKEDITOR, we reload the page when the user
|
// Due to a limitation of CKEDITOR, we reload the page when the user
|
||||||
// changes the composition mode to avoid Javascript errors.
|
// changes the composition mode to avoid Javascript errors.
|
||||||
var saveAndReload = confirm(label ("composeMessageChanged"));
|
var saveAndReload = confirm(getLabel("composeMessageChanged"));
|
||||||
if (saveAndReload)
|
if (saveAndReload)
|
||||||
return savePreferences();
|
return savePreferences();
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -96,11 +96,11 @@ function toggleDetails() {
|
||||||
if (div.style.visibility) {
|
if (div.style.visibility) {
|
||||||
div.style.visibility = null;
|
div.style.visibility = null;
|
||||||
window.resizeBy(0, -(div.clientHeight + buttonsHeight));
|
window.resizeBy(0, -(div.clientHeight + buttonsHeight));
|
||||||
$("detailsButton").innerHTML = label ("Show Details");
|
$("detailsButton").innerHTML = getLabel("Show Details");
|
||||||
} else {
|
} else {
|
||||||
div.style.visibility = 'visible;';
|
div.style.visibility = 'visible;';
|
||||||
window.resizeBy(0, (div.clientHeight + buttonsHeight));
|
window.resizeBy(0, (div.clientHeight + buttonsHeight));
|
||||||
$("detailsButton").innerHTML = label ("Hide Details");
|
$("detailsButton").innerHTML = getLabel("Hide Details");
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1025,7 +1025,7 @@ function folderSubscriptionCallback(http) {
|
||||||
http.callbackData["method"](http.callbackData["data"]);
|
http.callbackData["method"](http.callbackData["data"]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window.alert(label ("Unable to subscribe to that folder!"));
|
window.alert(getLabel("Unable to subscribe to that folder!"));
|
||||||
document.subscriptionAjaxRequest = null;
|
document.subscriptionAjaxRequest = null;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1050,7 +1050,7 @@ function subscribeToFolder(refreshCallback, refreshCallbackData) {
|
||||||
rfCbData);
|
rfCbData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
refreshCallbackData["window"].alert(label ("You cannot subscribe to a folder that you own!"));
|
refreshCallbackData["window"].alert(getLabel("You cannot subscribe to a folder that you own!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function folderUnsubscriptionCallback(http) {
|
function folderUnsubscriptionCallback(http) {
|
||||||
|
@ -1061,7 +1061,7 @@ function folderUnsubscriptionCallback(http) {
|
||||||
http.callbackData["method"](http.callbackData["data"]);
|
http.callbackData["method"](http.callbackData["data"]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window.alert(label ("Unable to unsubscribe from that folder!"));
|
window.alert(getLabel("Unable to unsubscribe from that folder!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1081,7 +1081,7 @@ function unsubscribeFromFolder(folderUrl, owner, refreshCallback,
|
||||||
triggerAjaxRequest(url, folderUnsubscriptionCallback, rfCbData);
|
triggerAjaxRequest(url, folderUnsubscriptionCallback, rfCbData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
window.alert(label ("You cannot unsubscribe from a folder that you own!"));
|
window.alert(getLabel("You cannot unsubscribe from a folder that you own!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1232,21 +1232,21 @@ function showAlarmCallback(http) {
|
||||||
&& http.status == 200) {
|
&& http.status == 200) {
|
||||||
if (http.responseText.length) {
|
if (http.responseText.length) {
|
||||||
var data = http.responseText.evalJSON(true);
|
var data = http.responseText.evalJSON(true);
|
||||||
var msg = label ("Reminder:") + " " + data["summary"] + "\n";
|
var msg = getLabel("Reminder:") + " " + data["summary"] + "\n";
|
||||||
if (data["startDate"]) {
|
if (data["startDate"]) {
|
||||||
msg += label ("Start:") + " " + data["startDate"];
|
msg += getLabel("Start:") + " " + data["startDate"];
|
||||||
if (parseInt(data["isAllDay"]) == 0)
|
if (parseInt(data["isAllDay"]) == 0)
|
||||||
msg += " - " + data["startTime"];
|
msg += " - " + data["startTime"];
|
||||||
msg += "\n";
|
msg += "\n";
|
||||||
}
|
}
|
||||||
if (data["dueDate"]) {
|
if (data["dueDate"]) {
|
||||||
msg += label ("Due Date:") + " " + data["dueDate"];
|
msg += getLabel("Due Date:") + " " + data["dueDate"];
|
||||||
if (data["dueTime"])
|
if (data["dueTime"])
|
||||||
msg += " - " + data["dueTime"];
|
msg += " - " + data["dueTime"];
|
||||||
msg += "\n";
|
msg += "\n";
|
||||||
}
|
}
|
||||||
if (data["location"].length)
|
if (data["location"].length)
|
||||||
msg += "\n" + label ("Location:") + " " + data["location"];
|
msg += "\n" + getLabel("Location:") + " " + data["location"];
|
||||||
if (data["description"].length)
|
if (data["description"].length)
|
||||||
msg += "\n\n" + data["description"];
|
msg += "\n\n" + data["description"];
|
||||||
|
|
||||||
|
@ -1591,7 +1591,7 @@ function createFolderCallback(http) {
|
||||||
data.okCB(data.name, "/" + http.responseText, UserLogin);
|
data.okCB(data.name, "/" + http.responseText, UserLogin);
|
||||||
}
|
}
|
||||||
else if (http.status == 409) {
|
else if (http.status == 409) {
|
||||||
alert (label ("A folder by that name already exists."));
|
alert (getLabel("A folder by that name already exists."));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (data.notOkCB)
|
if (data.notOkCB)
|
||||||
|
@ -1609,7 +1609,7 @@ function delegateInvitation(componentUrl, callbackFunction, callbackData) {
|
||||||
if (input.uid != null)
|
if (input.uid != null)
|
||||||
delegatedTo = input.uid;
|
delegatedTo = input.uid;
|
||||||
else if (input.value.blank())
|
else if (input.value.blank())
|
||||||
alert(label ("noEmailForDelegation"));
|
alert(getLabel("noEmailForDelegation"));
|
||||||
else
|
else
|
||||||
delegatedTo = input.value;
|
delegatedTo = input.value;
|
||||||
|
|
||||||
|
@ -1694,7 +1694,7 @@ AIM = {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function label (title) {
|
function getLabel(title) {
|
||||||
var rc = title;
|
var rc = title;
|
||||||
if (!logWindow) {
|
if (!logWindow) {
|
||||||
logWindow = window;
|
logWindow = window;
|
||||||
|
|
Loading…
Reference in a new issue