see changelog

Monotone-Parent: 399ddcc3b0b509af5a4d05cd434475774187e48c
Monotone-Revision: 0cee430f2a0dfc64e4d3616db2934929c59abbbf

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2007-12-03T14:13:10
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2007-12-03 14:13:10 +00:00
parent 1bbd867cbe
commit 296245f3c1
29 changed files with 888 additions and 24 deletions
+24 -12
View File
@@ -310,20 +310,20 @@ function onMenuEditContact(event) {
}
function onMenuWriteToContact(event) {
var contactId = document.menuTarget.getAttribute('id');
var contactRow = $(contactId);
var emailCell = contactRow.down('td', 1);
var contactId = document.menuTarget.getAttribute('id');
var contactRow = $(contactId);
var emailCell = contactRow.down('td', 1);
if (!emailCell.firstChild) { // .nodeValue is the contact email address
window.alert(labels["The selected contact has no email address."]);
return false;
}
if (!emailCell.firstChild) { // .nodeValue is the contact email address
window.alert(labels["The selected contact has no email address."]);
return false;
}
openMailComposeWindow(ApplicationBaseURL + currentContactFolder
+ "/" + contactId + "/write");
openMailComposeWindow(ApplicationBaseURL + currentContactFolder
+ "/" + contactId + "/write");
if (document.body.hasClassName("popup"))
window.close();
if (document.body.hasClassName("popup"))
window.close();
}
function onMenuDeleteContact(event) {
@@ -334,6 +334,11 @@ function onToolbarEditSelectedContacts(event) {
var contactsList = $('contactsList');
var rows = contactsList.getSelectedRowsId();
if (rows.length == 0) {
window.alert(labels["Please select a contact."]);
return false;
}
for (var i = 0; i < rows.length; i++) {
openContactWindow(URLForFolderID(currentContactFolder)
+ "/" + rows[i] + "/edit", rows[i]);
@@ -347,8 +352,10 @@ function onToolbarWriteToSelectedContacts(event) {
var rows = contactsList.getSelectedRowsId();
var rowsWithEmail = 0;
if (rows.length == 0)
if (rows.length == 0) {
window.alert(labels["Please select a contact."]);
return false;
}
for (var i = 0; i < rows.length; i++) {
var emailCell = $(rows[i]).down('td', 1);
@@ -373,6 +380,11 @@ function uixDeleteSelectedContacts(sender) {
var contactsList = $('contactsList');
var rows = contactsList.getSelectedRowsId();
if (rows.length == 0) {
window.alert(labels["Please select a contact."]);
return false;
}
var contactView = $('contactView');
contactView.innerHTML = '';
+12 -3
View File
@@ -81,12 +81,19 @@ function editEvent() {
if (listOfSelection) {
var nodes = listOfSelection.getSelectedRows();
if (nodes.length == 0) {
window.alert(labels["Please select an event or a task."]);
return false;
}
for (var i = 0; i < nodes.length; i++)
_editEventId(nodes[i].getAttribute("id"),
nodes[i].calendar);
} else if (selectedCalendarCell) {
_editEventId(selectedCalendarCell[0].cname,
selectedCalendarCell[0].calendar);
_editEventId(selectedCalendarCell[0].cname,
selectedCalendarCell[0].calendar);
} else {
window.alert(labels["Please select an event or a task."]);
}
return false; /* stop following the link */
@@ -135,6 +142,8 @@ function deleteEvent() {
}
_batchDeleteEvents();
}
} else {
window.alert(labels["Please select an event or a task."]);
}
}
else if (selectedCalendarCell) {
@@ -150,7 +159,7 @@ function deleteEvent() {
}
}
else
window.alert("no selection");
window.alert(labels["Please select an event or a task."]);
return false;
}