Monotone-Parent: 30d54dc507398dda32b17cb2c4b9c8e6b601087d
Monotone-Revision: 02e6aaa1be72203deecd9d1b0f94d9491729cafc Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-09-16T20:25:47 Monotone-Branch: ca.inverse.sogomaint-2.0.2
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>
|
||||
|
||||
* UI/WebServerResources/MailerUI.js (configureLoadImagesButton):
|
||||
|
|
|
@ -92,7 +92,7 @@ function addUserLineToTree(tree, parent, line) {
|
|||
'', '',
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ function addFolderBranchToTree(tree, user, folder, nodeId, subId, isLast) {
|
|||
|
||||
function addFolderNotFoundNode (tree, nodeId) {
|
||||
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);
|
||||
node._ls = true;
|
||||
return tree.node(node, (nodeId + 1), null);
|
||||
|
|
|
@ -225,7 +225,7 @@ function _onContactMenuAction(folderItem, action, refresh) {
|
|||
|
||||
for (var i = 0; i < contactIds.length; i++) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -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(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)
|
||||
window.alert(labels[error]);
|
||||
refreshCurrentFolder();
|
||||
|
@ -396,7 +396,7 @@ function onToolbarEditSelectedContacts(event) {
|
|||
var rows = contactsList.getSelectedRowsId();
|
||||
|
||||
if (rows.length == 0) {
|
||||
window.alert(label ("Please select a contact."));
|
||||
window.alert(getLabel("Please select a contact."));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -433,7 +433,7 @@ function onToolbarDeleteSelectedContacts(event) {
|
|||
var rows = contactsList.getSelectedRowsId();
|
||||
|
||||
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)) {
|
||||
for (var i = 0; i < rows.length; i++) {
|
||||
delete cachedContacts[Contact.currentAddressBook + "/" + rows[i]];
|
||||
|
@ -446,7 +446,7 @@ function onToolbarDeleteSelectedContacts(event) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
window.alert(label ("Please select a contact."));
|
||||
window.alert(getLabel("Please select a contact."));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -526,7 +526,7 @@ function newContact(sender) {
|
|||
function newList(sender) {
|
||||
var li = $(Contact.currentAddressBook);
|
||||
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
|
||||
openContactWindow(URLForFolderID(Contact.currentAddressBook) + "/newlist");
|
||||
return false;
|
||||
|
@ -615,7 +615,7 @@ function refreshContacts(cname) {
|
|||
}
|
||||
|
||||
function onAddressBookNew(event) {
|
||||
createFolder(window.prompt(label ("Name of the Address Book"), ""),
|
||||
createFolder(window.prompt(getLabel("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 (label ("An error occured while importing contacts."));
|
||||
$("uploadResultsContent").update (getLabel("An error occured while importing contacts."));
|
||||
else {
|
||||
$("uploadResultsContent").update (label ("Imported contacts:") + " " + data.imported);
|
||||
$("uploadResultsContent").update (getLabel("Imported contacts:") + " " + data.imported);
|
||||
refreshCurrentFolder ();
|
||||
}
|
||||
|
||||
|
@ -741,7 +741,7 @@ function onAddressBookRemove(event) {
|
|||
node.deselect();
|
||||
var owner = node.getAttribute("owner");
|
||||
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);
|
||||
}
|
||||
else if (owner == UserLogin) {
|
||||
|
@ -764,12 +764,12 @@ function onAddressBookRemove(event) {
|
|||
|
||||
function deletePersonalAddressBook(folderId) {
|
||||
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);
|
||||
}
|
||||
else {
|
||||
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 (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(label ("Address Book Name"),
|
||||
var newName = window.prompt(getLabel("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(label ("Unable to rename that folder!"));
|
||||
window.alert(getLabel("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 (label ("Lists can't be moved or copied."));
|
||||
alert (getLabel("Lists can't be moved or copied."));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -207,7 +207,7 @@ function openMessageWindowsForSelection(action, firstOnly) {
|
|||
break;
|
||||
}
|
||||
} 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" });
|
||||
}
|
||||
else
|
||||
window.alert(label ("Please select a message."));
|
||||
window.alert(getLabel("Please select a message."));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -447,10 +447,10 @@ function deleteMessageWithDelay(url, id, mailbox, messageId) {
|
|||
function onPrintCurrentMessage(event) {
|
||||
var rowIds = $("messageList").getSelectedRowsId();
|
||||
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) {
|
||||
window.alert(label ("Please select only one message to print."));
|
||||
window.alert(getLabel("Please select only one message to print."));
|
||||
}
|
||||
else
|
||||
window.print();
|
||||
|
@ -1240,7 +1240,7 @@ function messageCallback(http) {
|
|||
}
|
||||
}
|
||||
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 ();
|
||||
}
|
||||
else
|
||||
|
@ -1661,7 +1661,7 @@ function updateMailboxTreeInPage() {
|
|||
/ Mailer.quotas.maxQuota)
|
||||
/ 100);
|
||||
var level = (percents > 85)? "alert" : (percents > 70)? "warn" : "ok";
|
||||
var format = label ("quotasFormat");
|
||||
var format = getLabel("quotasFormat");
|
||||
var text = format.formatted(percents,
|
||||
Math.round(Mailer.quotas.maxQuota/10.24)/100);
|
||||
var quotaDiv = new Element('div', { 'class': 'quota', 'info': text });
|
||||
|
@ -1727,7 +1727,7 @@ function generateMenuForMailbox(mailbox, prefix, callback) {
|
|||
if (mailbox.type != "account") {
|
||||
var newNode = document.createElement("li");
|
||||
newNode.mailbox = mailbox;
|
||||
newNode.appendChild(document.createTextNode(label ("This Folder")));
|
||||
newNode.appendChild(document.createTextNode(getLabel("This Folder")));
|
||||
menu.appendChild(newNode);
|
||||
menu.appendChild(document.createElement("li"));
|
||||
callbacks.push(callback);
|
||||
|
@ -1921,7 +1921,7 @@ function saveFoldersStateCallback(http) {
|
|||
}
|
||||
|
||||
function onMenuCreateFolder(event) {
|
||||
var name = window.prompt(label ("Name :"), "");
|
||||
var name = window.prompt(getLabel("Name :"), "");
|
||||
if (name && name.length > 0) {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
var urlstr = URLForFolderID(folderID) + "/createFolder?name=" + encodeURIComponent(name);
|
||||
|
@ -1932,7 +1932,7 @@ function onMenuCreateFolder(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) {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
|
@ -1944,11 +1944,11 @@ function onMenuRenameFolder(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) {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -1962,7 +1962,7 @@ function onMenuExpungeFolder(event) {
|
|||
function onMenuEmptyTrash(event) {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
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);
|
||||
|
||||
if (folderID == Mailer.currentMailbox) {
|
||||
|
@ -1979,11 +1979,11 @@ function onMenuEmptyTrash(event) {
|
|||
function _onMenuChangeToXXXFolder(event, folder) {
|
||||
var type = document.menuTarget.getAttribute("datatype");
|
||||
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 {
|
||||
var folderID = document.menuTarget.getAttribute("dataname");
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -2102,7 +2102,7 @@ function folderRefreshCallback(http) {
|
|||
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);
|
||||
}
|
||||
else
|
||||
window.alert(label ("Please select a message."));
|
||||
window.alert(getLabel("Please select a message."));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@ var MailerUIdTreeExtension = {
|
|||
sent: "tbtv_sent_17x17.png",
|
||||
draft: "tbtv_drafts_17x17.png",
|
||||
trash: "tbtv_trash_17x17.png" },
|
||||
folderNames: { inbox: label ("InboxFolderName"),
|
||||
sent: label ("SentFolderName"),
|
||||
draft: label ("DraftsFolderName"),
|
||||
trash: label ("TrashFolderName") },
|
||||
folderNames: { inbox: getLabel("InboxFolderName"),
|
||||
sent: getLabel("SentFolderName"),
|
||||
draft: getLabel("DraftsFolderName"),
|
||||
trash: getLabel("TrashFolderName") },
|
||||
_addFolderNode: function (parent, name, fullName, type, unseen) {
|
||||
var icon = this.folderIcons[type];
|
||||
if (icon)
|
||||
|
|
|
@ -87,7 +87,7 @@ function editEvent() {
|
|||
var nodes = listOfSelection.getSelectedRows();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ function editEvent() {
|
|||
_editEventId(selectedCalendarCell[0].cname,
|
||||
selectedCalendarCell[0].calendar);
|
||||
} 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 */
|
||||
|
@ -124,9 +124,9 @@ function deleteEvent() {
|
|||
if (nodes.length > 0) {
|
||||
var label = "";
|
||||
if (listOfSelection == $("tasksList"))
|
||||
label = label ("taskDeleteConfirmation");
|
||||
label = getLabel("taskDeleteConfirmation");
|
||||
else
|
||||
label = label ("eventDeleteConfirmation");
|
||||
label = getLabel("eventDeleteConfirmation");
|
||||
|
||||
if (nodes.length == 1
|
||||
&& nodes[0].recurrenceTime) {
|
||||
|
@ -157,7 +157,7 @@ function deleteEvent() {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
window.alert(label ("Please select an event or a task."));
|
||||
window.alert(getLabel("Please select an event or a task."));
|
||||
}
|
||||
}
|
||||
else if (selectedCalendarCell) {
|
||||
|
@ -165,7 +165,7 @@ function deleteEvent() {
|
|||
_editRecurrenceDialog(selectedCalendarCell[0], "confirmDeletion");
|
||||
}
|
||||
else {
|
||||
var label = label ("eventDeleteConfirmation");
|
||||
var label = getLabel("eventDeleteConfirmation");
|
||||
if (confirm(label)) {
|
||||
if (document.deleteEventAjaxRequest) {
|
||||
document.deleteEventAjaxRequest.aborted = true;
|
||||
|
@ -178,7 +178,7 @@ function deleteEvent() {
|
|||
}
|
||||
}
|
||||
else
|
||||
window.alert(label ("Please select an event or a task."));
|
||||
window.alert(getLabel("Please select an event or a task."));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -208,12 +208,12 @@ function closeInvitationWindow() {
|
|||
closePseudoWin.style.top = "0px;";
|
||||
closePseudoWin.style.left = "0px;";
|
||||
closePseudoWin.style.right = "0px;";
|
||||
closePseudoWin.appendChild(document.createTextNode(label ("closeThisWindowMessage")));
|
||||
closePseudoWin.appendChild(document.createTextNode(getLabel("closeThisWindowMessage")));
|
||||
|
||||
var calLink = document.createElement("a");
|
||||
closePseudoWin.appendChild(calLink);
|
||||
calLink.href = ApplicationBaseURL;
|
||||
calLink.appendChild(document.createTextNode(label ("Calendar").toLowerCase()));
|
||||
calLink.appendChild(document.createTextNode(getLabel("Calendar").toLowerCase()));
|
||||
}
|
||||
|
||||
function modifyEventCallback(http) {
|
||||
|
@ -234,7 +234,7 @@ function modifyEventCallback(http) {
|
|||
}
|
||||
else {
|
||||
// log("showing alert...");
|
||||
window.alert(label ("eventPartStatModificationError"));
|
||||
window.alert(getLabel("eventPartStatModificationError"));
|
||||
}
|
||||
document.modifyEventAjaxRequest = null;
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ function deleteEventCallback(http) {
|
|||
}
|
||||
}
|
||||
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
|
||||
log ("deleteEventCallback Ajax error (" + http.status + ")");
|
||||
}
|
||||
|
@ -1888,7 +1888,7 @@ function updateCalendarProperties(calendarID, calendarName, calendarColor) {
|
|||
}
|
||||
|
||||
function onCalendarNew(event) {
|
||||
createFolder(window.prompt(label ("Name of the Calendar"), ""),
|
||||
createFolder(window.prompt(getLabel("Name of the Calendar"), ""),
|
||||
appendCalendar);
|
||||
preventDefault(event);
|
||||
}
|
||||
|
@ -1899,7 +1899,7 @@ function onCalendarAdd(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 (document.addWebCalendarRequest) {
|
||||
document.addWebCalendarRequest.aborted = true;
|
||||
|
@ -1919,7 +1919,7 @@ function addWebCalendarCallback (http) {
|
|||
changeCalendarDisplay();
|
||||
}
|
||||
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");
|
||||
$("uploadOK").onclick = hideImportResults;
|
||||
if (data.imported <= 0)
|
||||
$("uploadResultsContent").update (label ("An error occured while importing calendar."));
|
||||
$("uploadResultsContent").update (getLabel("An error occured while importing calendar."));
|
||||
else {
|
||||
$("uploadResultsContent").update (label ("Imported events:") + " " + data.imported);
|
||||
$("uploadResultsContent").update (getLabel("Imported events:") + " " + data.imported);
|
||||
refreshEventsAndDisplay ();
|
||||
}
|
||||
|
||||
|
@ -2009,7 +2009,7 @@ function appendCalendar(folderName, folderPath) {
|
|||
//log ("append name: " + folderName + "; path: " + folderPath + "; owner: " + owner);
|
||||
|
||||
if ($(folderPath))
|
||||
window.alert(label ("You have already subscribed to that folder!"));
|
||||
window.alert(getLabel("You have already subscribed to that folder!"));
|
||||
else {
|
||||
var calendarList = $("calendarList");
|
||||
var items = calendarList.select("li");
|
||||
|
|
|
@ -101,7 +101,7 @@ function subscribeToFolder(refreshCallback, refreshCallbackData) {
|
|||
refreshCallbackData["folder"]);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,25 +32,25 @@ function onOKClick(event) {
|
|||
if (tag
|
||||
&& $("synchronizeCalendar").checked) {
|
||||
if (tag.value.blank()) {
|
||||
alert(label ("tagNotDefined"));
|
||||
alert(getLabel("tagNotDefined"));
|
||||
save = false;
|
||||
}
|
||||
else if (allTags
|
||||
&& allTags.indexOf(tag.value) > -1) {
|
||||
alert(label ("tagAlreadyExists"));
|
||||
alert(getLabel("tagAlreadyExists"));
|
||||
save = false;
|
||||
}
|
||||
else if (originalTag
|
||||
&& !originalTag.value.blank()) {
|
||||
if (tag.value != originalTag.value)
|
||||
save = confirm(label ("tagHasChanged"));
|
||||
save = confirm(getLabel("tagHasChanged"));
|
||||
}
|
||||
else
|
||||
save = confirm(label ("tagWasAdded"));
|
||||
save = confirm(getLabel("tagWasAdded"));
|
||||
}
|
||||
else if (originalTag
|
||||
&& !originalTag.value.blank())
|
||||
save = confirm(label ("tagWasRemoved"));
|
||||
save = confirm(getLabel("tagWasRemoved"));
|
||||
|
||||
if (save)
|
||||
window.opener.updateCalendarProperties(calendarID.value,
|
||||
|
|
|
@ -25,7 +25,7 @@ function onPopupAttachWindow(event) {
|
|||
preventDefault(event);
|
||||
|
||||
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) {
|
||||
var documentHref = $("documentHref");
|
||||
var documentLabel = $("documentLabel");
|
||||
|
|
|
@ -46,7 +46,7 @@ function addUserLineToTree(tree, parent, line) {
|
|||
ResourcesURL + '/abcard.gif',
|
||||
ResourcesURL + '/abcard.gif');
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ function addFolderBranchToTree(tree, user, folder, nodeId, subId, isLast) {
|
|||
|
||||
function addFolderNotFoundNode (tree, nodeId) {
|
||||
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);
|
||||
node._ls = true;
|
||||
return tree.node(node, (nodeId + 1));
|
||||
|
@ -216,7 +216,7 @@ function onConfirmFolderSelection(event) {
|
|||
|
||||
var data = { folderName: folderName, folder: folder, window: window };
|
||||
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
|
||||
window.opener.subscribeToFolder(window.opener.userFolderCallback, data);
|
||||
}
|
||||
|
|
|
@ -112,13 +112,13 @@ function validateEditorInput(sender) {
|
|||
|
||||
field = document.pageform.subject;
|
||||
if (field.value == "")
|
||||
errortext = errortext + label ("error_missingsubject") + "\n";
|
||||
errortext = errortext + getLabel("error_missingsubject") + "\n";
|
||||
|
||||
if (!hasRecipients())
|
||||
errortext = errortext + label ("error_missingrecipients") + "\n";
|
||||
errortext = errortext + getLabel("error_missingrecipients") + "\n";
|
||||
|
||||
if (errortext.length > 0) {
|
||||
alert(label ("error_validationfailed") + ":\n" + errortext);
|
||||
alert(getLabel("error_validationfailed") + ":\n" + errortext);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ function onComposeMessagesTypeChange(event) {
|
|||
if (event) {
|
||||
// Due to a limitation of CKEDITOR, we reload the page when the user
|
||||
// changes the composition mode to avoid Javascript errors.
|
||||
var saveAndReload = confirm(label ("composeMessageChanged"));
|
||||
var saveAndReload = confirm(getLabel("composeMessageChanged"));
|
||||
if (saveAndReload)
|
||||
return savePreferences();
|
||||
else {
|
||||
|
|
|
@ -96,11 +96,11 @@ function toggleDetails() {
|
|||
if (div.style.visibility) {
|
||||
div.style.visibility = null;
|
||||
window.resizeBy(0, -(div.clientHeight + buttonsHeight));
|
||||
$("detailsButton").innerHTML = label ("Show Details");
|
||||
$("detailsButton").innerHTML = getLabel("Show Details");
|
||||
} else {
|
||||
div.style.visibility = 'visible;';
|
||||
window.resizeBy(0, (div.clientHeight + buttonsHeight));
|
||||
$("detailsButton").innerHTML = label ("Hide Details");
|
||||
$("detailsButton").innerHTML = getLabel("Hide Details");
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -1025,7 +1025,7 @@ function folderSubscriptionCallback(http) {
|
|||
http.callbackData["method"](http.callbackData["data"]);
|
||||
}
|
||||
else
|
||||
window.alert(label ("Unable to subscribe to that folder!"));
|
||||
window.alert(getLabel("Unable to subscribe to that folder!"));
|
||||
document.subscriptionAjaxRequest = null;
|
||||
}
|
||||
else
|
||||
|
@ -1050,7 +1050,7 @@ function subscribeToFolder(refreshCallback, refreshCallbackData) {
|
|||
rfCbData);
|
||||
}
|
||||
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) {
|
||||
|
@ -1061,7 +1061,7 @@ function folderUnsubscriptionCallback(http) {
|
|||
http.callbackData["method"](http.callbackData["data"]);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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) {
|
||||
if (http.responseText.length) {
|
||||
var data = http.responseText.evalJSON(true);
|
||||
var msg = label ("Reminder:") + " " + data["summary"] + "\n";
|
||||
var msg = getLabel("Reminder:") + " " + data["summary"] + "\n";
|
||||
if (data["startDate"]) {
|
||||
msg += label ("Start:") + " " + data["startDate"];
|
||||
msg += getLabel("Start:") + " " + data["startDate"];
|
||||
if (parseInt(data["isAllDay"]) == 0)
|
||||
msg += " - " + data["startTime"];
|
||||
msg += "\n";
|
||||
}
|
||||
if (data["dueDate"]) {
|
||||
msg += label ("Due Date:") + " " + data["dueDate"];
|
||||
msg += getLabel("Due Date:") + " " + data["dueDate"];
|
||||
if (data["dueTime"])
|
||||
msg += " - " + data["dueTime"];
|
||||
msg += "\n";
|
||||
}
|
||||
if (data["location"].length)
|
||||
msg += "\n" + label ("Location:") + " " + data["location"];
|
||||
msg += "\n" + getLabel("Location:") + " " + data["location"];
|
||||
if (data["description"].length)
|
||||
msg += "\n\n" + data["description"];
|
||||
|
||||
|
@ -1591,7 +1591,7 @@ function createFolderCallback(http) {
|
|||
data.okCB(data.name, "/" + http.responseText, UserLogin);
|
||||
}
|
||||
else if (http.status == 409) {
|
||||
alert (label ("A folder by that name already exists."));
|
||||
alert (getLabel("A folder by that name already exists."));
|
||||
}
|
||||
else {
|
||||
if (data.notOkCB)
|
||||
|
@ -1609,7 +1609,7 @@ function delegateInvitation(componentUrl, callbackFunction, callbackData) {
|
|||
if (input.uid != null)
|
||||
delegatedTo = input.uid;
|
||||
else if (input.value.blank())
|
||||
alert(label ("noEmailForDelegation"));
|
||||
alert(getLabel("noEmailForDelegation"));
|
||||
else
|
||||
delegatedTo = input.value;
|
||||
|
||||
|
@ -1694,7 +1694,7 @@ AIM = {
|
|||
|
||||
}
|
||||
|
||||
function label (title) {
|
||||
function getLabel(title) {
|
||||
var rc = title;
|
||||
if (!logWindow) {
|
||||
logWindow = window;
|
||||
|
|
Loading…
Reference in New Issue