if (field.value == "")
errortext = errortext + labels.error_missingsubject + "\n";
- if (!UIxRecipientSelectorHasRecipients())
+ if (!hasRecipients())
errortext = errortext + labels.error_missingrecipients + "\n";
if (errortext.length > 0) {
var rows = contactsList.getSelectedRowsId();
var rowsWithEmail = 0;
+ if (rows.length == 0)
+ return false;
+
for (var i = 0; i < rows.length; i++) {
var emailCell = $(rows[i]).down('td', 1);
if (emailCell.firstChild) { // .nodeValue is the contact email address
+ "/" + rows[i] + "/write");
}
}
-
+
if (rowsWithEmail == 0) {
window.alert(labels["The selected contact has no email address."]);
}