Disable dragging/copying of contact groups
| | |
| | | this.show_contentframe(false); |
| | | |
| | | if (list.selection.length) { |
| | | list.draggable = false; |
| | | |
| | | // no source = search result, we'll need to detect if any of |
| | | // selected contacts are in writable addressbook to enable edit/delete |
| | | // we'll also need to know sources used in selection for copy |
| | |
| | | else { |
| | | writable = writable || (!source.readonly && !contact.readonly); |
| | | } |
| | | |
| | | if (contact._type != 'group') |
| | | list.draggable = true; |
| | | } |
| | | |
| | | this.env.selection_sources = $.unique(this.env.selection_sources); |
| | |
| | | foreach ($cid as $cid) { |
| | | $a_record = $CONTACTS->get_record($cid, true); |
| | | |
| | | // avoid copying groups |
| | | if ($a_record['_type'] == 'group') |
| | | continue; |
| | | |
| | | // Check if contact exists, if so, we'll need it's ID |
| | | // Note: Some addressbooks allows empty email address field |
| | | if (!empty($a_record['email'])) |