mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Add cc and bcc options to addressbook mail item in context menu
This commit is contained in:
parent
1b873c4372
commit
bd505b1bf8
@ -557,6 +557,18 @@ class addressbook_ui extends addressbook_bo
|
|||||||
'icon' => 'mail/navbar',
|
'icon' => 'mail/navbar',
|
||||||
'group' => $group,
|
'group' => $group,
|
||||||
'children' => array(
|
'children' => array(
|
||||||
|
'add_to_cc' => array(
|
||||||
|
'caption' => lang('Add to %1',lang('CC')),
|
||||||
|
'no_lang' => true,
|
||||||
|
'checkbox' => true,
|
||||||
|
'group' => $group,
|
||||||
|
),
|
||||||
|
'add_to_bcc' => array(
|
||||||
|
'caption' => lang('Add to %1',lang('BCC')),
|
||||||
|
'no_lang' => true,
|
||||||
|
'checkbox' => true,
|
||||||
|
'group' => $group,
|
||||||
|
),
|
||||||
'email_business' => array(
|
'email_business' => array(
|
||||||
'caption' => lang('Add %1',lang('business email')),
|
'caption' => lang('Add %1',lang('business email')),
|
||||||
'no_lang' => true,
|
'no_lang' => true,
|
||||||
|
@ -427,6 +427,7 @@ app.classes.addressbook = AppJS.extend(
|
|||||||
{
|
{
|
||||||
// Go through selected & pull email addresses from data
|
// Go through selected & pull email addresses from data
|
||||||
var emails = [];
|
var emails = [];
|
||||||
|
var cc ='', bcc ='';
|
||||||
for(var i = 0; i < selected.length; i++)
|
for(var i = 0; i < selected.length; i++)
|
||||||
{
|
{
|
||||||
// Pull data from global cache
|
// Pull data from global cache
|
||||||
@ -437,9 +438,18 @@ app.classes.addressbook = AppJS.extend(
|
|||||||
emails.push(email);
|
emails.push(email);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Add to Cc
|
||||||
|
if (action.parent.children[0].checked)
|
||||||
|
{
|
||||||
|
cc = '&cc=' + emails.join(',');
|
||||||
|
}
|
||||||
|
// Add to Bcc
|
||||||
|
if (action.parent.children[1].checked)
|
||||||
|
{
|
||||||
|
bcc = '&bcc=' + emails.join(',');
|
||||||
|
}
|
||||||
// Always open a compose, even if no emails, so user knows it worked
|
// Always open a compose, even if no emails, so user knows it worked
|
||||||
egw.open_link('mailto:' + emails.join(','));
|
egw.open_link('mailto:' + emails.join(',') + cc + bcc );
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -488,7 +498,7 @@ app.classes.addressbook = AppJS.extend(
|
|||||||
setState: function(state)
|
setState: function(state)
|
||||||
{
|
{
|
||||||
var current_state = this.getState();
|
var current_state = this.getState();
|
||||||
|
|
||||||
// State should be an object, not a string, but we'll parse
|
// State should be an object, not a string, but we'll parse
|
||||||
if(typeof state == "string")
|
if(typeof state == "string")
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user