mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +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',
|
||||
'group' => $group,
|
||||
'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(
|
||||
'caption' => lang('Add %1',lang('business email')),
|
||||
'no_lang' => true,
|
||||
|
@ -427,6 +427,7 @@ app.classes.addressbook = AppJS.extend(
|
||||
{
|
||||
// Go through selected & pull email addresses from data
|
||||
var emails = [];
|
||||
var cc ='', bcc ='';
|
||||
for(var i = 0; i < selected.length; i++)
|
||||
{
|
||||
// Pull data from global cache
|
||||
@ -437,9 +438,18 @@ app.classes.addressbook = AppJS.extend(
|
||||
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
|
||||
egw.open_link('mailto:' + emails.join(','));
|
||||
egw.open_link('mailto:' + emails.join(',') + cc + bcc );
|
||||
return false;
|
||||
},
|
||||
|
||||
@ -488,7 +498,7 @@ app.classes.addressbook = AppJS.extend(
|
||||
setState: function(state)
|
||||
{
|
||||
var current_state = this.getState();
|
||||
|
||||
|
||||
// State should be an object, not a string, but we'll parse
|
||||
if(typeof state == "string")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user