]> err.no Git - scalable-opengroupware.org/blobdiff - UI/WebServerResources/ContactsUI.js
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1261 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / UI / WebServerResources / ContactsUI.js
index ba7d525e4210d64f8e5d866e63b7b55c15734830..e5c3d160cf5a2ae14c4e6b6385da844d1b762636 100644 (file)
@@ -14,7 +14,7 @@ function validateEditorInput(sender) {
   if (field.value == "")
     errortext = errortext + labels.error_missingsubject + "\n";
 
-  if (!UIxRecipientSelectorHasRecipients())
+  if (!hasRecipients())
     errortext = errortext + labels.error_missingrecipients + "\n";
   
   if (errortext.length > 0) {
@@ -333,6 +333,9 @@ function onToolbarWriteToSelectedContacts(event) {
   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
@@ -341,7 +344,7 @@ function onToolbarWriteToSelectedContacts(event) {
                            + "/" + rows[i] + "/write");
     }
   }
-  
+
   if (rowsWithEmail == 0) {
     window.alert(labels["The selected contact has no email address."]);
   }