From c0eece623456445f5993eadff5c0502e5bb0d831 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 21 Mar 2014 11:54:38 +0000 Subject: [PATCH] use mail instead of felamimail (when available) for mail actions --- addressbook/inc/class.addressbook_ui.inc.php | 9 ++++++++- addressbook/js/app.js | 5 +++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index ea2954a30f..41d88d339f 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -640,7 +640,7 @@ class addressbook_ui extends addressbook_bo $this->prefs['document_dir'], $group, 'Insert in document', 'document_', $this->prefs['default_document'], $this->config['contact_export_limit'] ); - if (isset($GLOBALS['egw_info']['apps']['stylite']) && $GLOBALS['egw_info']['user']['apps']['felamimail']) + if (isset($GLOBALS['egw_info']['apps']['stylite']) && ($GLOBALS['egw_info']['user']['apps']['felamimail']||$GLOBALS['egw_info']['user']['apps']['mail'])) { $actions['mail'] = array( 'caption' => lang('Mail VCard'), @@ -2503,6 +2503,13 @@ window.egw_LAB.wait(function() { { if (strpos($email,'@') == false) return ''; + if($GLOBALS['egw_info']['user']['apps']['mail']) + { + return array( + 'menuaction' => 'mail.mail_compose.compose', + 'send_to' => base64_encode($email) + ); + } if($GLOBALS['egw_info']['user']['apps']['felamimail']) { return array( diff --git a/addressbook/js/app.js b/addressbook/js/app.js index 663615d2e9..5f2ec758d7 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -498,8 +498,9 @@ app.classes.addressbook = AppJS.extend( */ adb_mail_vcard: function(_action, _elems) { - var app_registry = egw.link_get_registry('felamimail'); - var link = egw().link("/index.php","menuaction=felamimail.uicompose.compose"); + var app_registry = egw.link_get_registry('mail'); + if (typeof app_registry['view'] == 'undefined') app_registry = egw.link_get_registry('felamimail'); + var link = egw().link("/index.php","menuaction="+app_registry['add']['menuaction']); for (var i = 0; i < _elems.length; i++) { link += "&preset[file][]="+encodeURIComponent("vfs://default/apps/addressbook/"+_elems[i].id+"/.entry");