mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
added again adding of the whole selection to the email-address popup
This commit is contained in:
parent
e339994538
commit
2c56e220bc
@ -184,7 +184,13 @@ class uicontacts extends bocontacts
|
|||||||
'vcard' => lang('Export as VCard'), // ToDo: move this to importexport framework
|
'vcard' => lang('Export as VCard'), // ToDo: move this to importexport framework
|
||||||
// 'export' => lang('Export selection'),
|
// 'export' => lang('Export selection'),
|
||||||
// ToDo: 'copy' => lang('Copy a contact and edit the copy'),
|
// ToDo: 'copy' => lang('Copy a contact and edit the copy'),
|
||||||
)+$this->get_addressbooks(EGW_ACL_ADD);
|
);
|
||||||
|
if ($do_email)
|
||||||
|
{
|
||||||
|
$sel_options['action']['email'] = lang('Add %1',lang('business email'));
|
||||||
|
$sel_options['action']['email_home'] = lang('Add %1',lang('home email'));
|
||||||
|
}
|
||||||
|
$sel_options['action'] += $this->get_addressbooks(EGW_ACL_ADD);
|
||||||
|
|
||||||
if (!array_key_exists('importexport',$GLOBALS['egw_info']['user']['apps'])) unset($sel_options['action']['export']);
|
if (!array_key_exists('importexport',$GLOBALS['egw_info']['user']['apps'])) unset($sel_options['action']['export']);
|
||||||
|
|
||||||
@ -342,14 +348,13 @@ class uicontacts extends bocontacts
|
|||||||
$Ok = false;
|
$Ok = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($checked as $id)
|
foreach($checked as $id)
|
||||||
{
|
{
|
||||||
switch($action)
|
switch($action)
|
||||||
{
|
{
|
||||||
case 'delete':
|
case 'delete':
|
||||||
$action_msg = lang('deleted');
|
$action_msg = lang('deleted');
|
||||||
if (($Ok = ($contact = $this->read($id)) && $this->check_perms(EGW_ACL_DELETE,$contact)))
|
if (($Ok = !!($contact = $this->read($id)) && $this->check_perms(EGW_ACL_DELETE,$contact)))
|
||||||
{
|
{
|
||||||
if ($contact['owner']) // regular contact
|
if ($contact['owner']) // regular contact
|
||||||
{
|
{
|
||||||
@ -370,6 +375,18 @@ class uicontacts extends bocontacts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'email':
|
||||||
|
case 'email_home':
|
||||||
|
$action_msg = lang('%1 added',$action=='email'?lang('Business email') : lang('Home email'));
|
||||||
|
if (($Ok = !!($contact = $this->read($id)) && strstr($contact[$action],'@')))
|
||||||
|
{
|
||||||
|
if(!@is_object($GLOBALS['egw']->js)) $GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||||
|
|
||||||
|
$GLOBALS['egw']->js->set_onload("addEmail('".addslashes(
|
||||||
|
$contact['n_fn'] ? $contact['n_fn'].' <'.$contact[$action].'>' : $contact[$action])."');");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default: // move to an other addressbook
|
default: // move to an other addressbook
|
||||||
if (!is_numeric($action) || !($this->grants[(string) (int) $action] & EGW_ACL_EDIT)) // might be ADD in the future
|
if (!is_numeric($action) || !($this->grants[(string) (int) $action] & EGW_ACL_EDIT)) // might be ADD in the future
|
||||||
@ -377,7 +394,7 @@ class uicontacts extends bocontacts
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$action_msg = lang('moved');
|
$action_msg = lang('moved');
|
||||||
if (($OK = ($contact = $this->read($id)) && $this->check_perms(EGW_ACL_DELETE,$contact)))
|
if (($Ok = !!($contact = $this->read($id)) && $this->check_perms(EGW_ACL_DELETE,$contact)))
|
||||||
{
|
{
|
||||||
if (!$contact['owner']) // no mass-change of accounts
|
if (!$contact['owner']) // no mass-change of accounts
|
||||||
{
|
{
|
||||||
@ -396,7 +413,7 @@ class uicontacts extends bocontacts
|
|||||||
{
|
{
|
||||||
++$success;
|
++$success;
|
||||||
}
|
}
|
||||||
else
|
elseif ($action != 'email' && $action != 'email_home')
|
||||||
{
|
{
|
||||||
++$failed;
|
++$failed;
|
||||||
}
|
}
|
||||||
@ -416,8 +433,10 @@ class uicontacts extends bocontacts
|
|||||||
*/
|
*/
|
||||||
function get_rows(&$query,&$rows,&$readonlys,$id_only=false)
|
function get_rows(&$query,&$rows,&$readonlys,$id_only=false)
|
||||||
{
|
{
|
||||||
$do_email = $query['do_email'];
|
if (($do_email=$query['do_email']) && $GLOBALS['egw_info']['etemplate']['loop'] && is_object($GLOBALS['egw']->js))
|
||||||
|
{ // remove previous addEmail() calls, otherwise they will be run again
|
||||||
|
$GLOBALS['egw']->js->body['onLoad'] = preg_replace('/addEmail\([^)]+\);/','',$GLOBALS['egw']->js->body['onLoad']);
|
||||||
|
}
|
||||||
//echo "<p>uicontacts::get_rows(".print_r($query,true).")</p>\n";
|
//echo "<p>uicontacts::get_rows(".print_r($query,true).")</p>\n";
|
||||||
if (!$id_only)
|
if (!$id_only)
|
||||||
{
|
{
|
||||||
@ -451,7 +470,7 @@ class uicontacts extends bocontacts
|
|||||||
));
|
));
|
||||||
if ($state != $this->prefs['index_state'])
|
if ($state != $this->prefs['index_state'])
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->preferences->add('addressbook',$do_mail ? 'email_state' : 'index_state',$state);
|
$GLOBALS['egw']->preferences->add('addressbook',$do_email ? 'email_state' : 'index_state',$state);
|
||||||
// save prefs, but do NOT invalid the cache (unnecessary)
|
// save prefs, but do NOT invalid the cache (unnecessary)
|
||||||
$GLOBALS['egw']->preferences->save_repository(false,'user',false);
|
$GLOBALS['egw']->preferences->save_repository(false,'user',false);
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
%1 added addressbook de %1 hinzugefügt
|
||||||
%1 contact(s) %2 addressbook de %1 Kontakt(e) %2
|
%1 contact(s) %2 addressbook de %1 Kontakt(e) %2
|
||||||
%1 contact(s) %2, %3 failed because of insufficent rights !!! addressbook de %1 Kontakt(e) %2, %3 nicht wegen fehlender Rechte !!!
|
%1 contact(s) %2, %3 failed because of insufficent rights !!! addressbook de %1 Kontakt(e) %2, %3 nicht wegen fehlender Rechte !!!
|
||||||
%1 fields in %2 other organisation member(s) changed addressbook de %1 Felder in %2 Mitglied(ern) der Organisation geändert
|
%1 fields in %2 other organisation member(s) changed addressbook de %1 Felder in %2 Mitglied(ern) der Organisation geändert
|
||||||
@ -10,6 +11,7 @@
|
|||||||
account repository admin de Speicherort für Benutzerkonten
|
account repository admin de Speicherort für Benutzerkonten
|
||||||
accounts addressbook de Benutzerkonten
|
accounts addressbook de Benutzerkonten
|
||||||
actions addressbook de Befehle
|
actions addressbook de Befehle
|
||||||
|
add %1 addressbook de %1 hinzufügen
|
||||||
add a contact to this organisation addressbook de Einen Kontakt zu dieser Organisation hinzufügen
|
add a contact to this organisation addressbook de Einen Kontakt zu dieser Organisation hinzufügen
|
||||||
add a new contact addressbook de Neuen Kontakt anlegen
|
add a new contact addressbook de Neuen Kontakt anlegen
|
||||||
add a single entry by passing the fields. addressbook de Hinzufügen eines einzelnen Eintrags durch Übergeben der Felder.
|
add a single entry by passing the fields. addressbook de Hinzufügen eines einzelnen Eintrags durch Übergeben der Felder.
|
||||||
@ -119,6 +121,7 @@ export as vcard addressbook de Exportieren als VCard
|
|||||||
export contacts addressbook de Kontakte exportieren
|
export contacts addressbook de Kontakte exportieren
|
||||||
export file name addressbook de Dateiname zum Exportieren
|
export file name addressbook de Dateiname zum Exportieren
|
||||||
export from addressbook addressbook de Export vom Adressbuch
|
export from addressbook addressbook de Export vom Adressbuch
|
||||||
|
export selection addressbook de Auswahl exportieren
|
||||||
exported addressbook de exportiert
|
exported addressbook de exportiert
|
||||||
extra addressbook de Extra
|
extra addressbook de Extra
|
||||||
failed to change %1 organisation member(s) (insufficent rights) !!! addressbook de %1 Mitglied(er) der Organisation nicht geändert (fehlende Rechte) !!!
|
failed to change %1 organisation member(s) (insufficent rights) !!! addressbook de %1 Mitglied(er) der Organisation nicht geändert (fehlende Rechte) !!!
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
%1 added addressbook en %1 added
|
||||||
%1 contact(s) %2 addressbook en %1 contact(s) %2
|
%1 contact(s) %2 addressbook en %1 contact(s) %2
|
||||||
%1 contact(s) %2, %3 failed because of insufficent rights !!! addressbook en %1 contact(s) %2, %3 failed because of insufficent rights !!!
|
%1 contact(s) %2, %3 failed because of insufficent rights !!! addressbook en %1 contact(s) %2, %3 failed because of insufficent rights !!!
|
||||||
%1 fields in %2 other organisation member(s) changed addressbook en %1 fields in %2 other organisation member(s) changed
|
%1 fields in %2 other organisation member(s) changed addressbook en %1 fields in %2 other organisation member(s) changed
|
||||||
@ -10,6 +11,7 @@
|
|||||||
account repository admin en Account repository
|
account repository admin en Account repository
|
||||||
accounts addressbook en Accounts
|
accounts addressbook en Accounts
|
||||||
actions addressbook en Actions
|
actions addressbook en Actions
|
||||||
|
add %1 addressbook en Add %1
|
||||||
add a contact to this organisation addressbook en Add a contact to this organisation
|
add a contact to this organisation addressbook en Add a contact to this organisation
|
||||||
add a new contact addressbook en Add a new contact
|
add a new contact addressbook en Add a new contact
|
||||||
add a single entry by passing the fields. addressbook en Add a single entry by passing the fields.
|
add a single entry by passing the fields. addressbook en Add a single entry by passing the fields.
|
||||||
@ -119,6 +121,7 @@ export as vcard addressbook en Export as VCard
|
|||||||
export contacts addressbook en Export Contacts
|
export contacts addressbook en Export Contacts
|
||||||
export file name addressbook en Export file name
|
export file name addressbook en Export file name
|
||||||
export from addressbook addressbook en Export from Addressbook
|
export from addressbook addressbook en Export from Addressbook
|
||||||
|
export selection addressbook en Export selection
|
||||||
exported addressbook en exported
|
exported addressbook en exported
|
||||||
extra addressbook en Extra
|
extra addressbook en Extra
|
||||||
failed to change %1 organisation member(s) (insufficent rights) !!! addressbook en failed to change %1 organisation member(s) (insufficent rights) !!!
|
failed to change %1 organisation member(s) (insufficent rights) !!! addressbook en failed to change %1 organisation member(s) (insufficent rights) !!!
|
||||||
|
Loading…
Reference in New Issue
Block a user