mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-28 14:45:28 +00:00
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:
@@ -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 = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user