mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
context menu for addressbook, please note: not everything is fully functional yet
This commit is contained in:
parent
af552dc914
commit
fe5202c7a2
@ -127,24 +127,25 @@ class addressbook_ui extends addressbook_bo
|
|||||||
if (isset($content['nm']['rows']['delete'])) // handle a single delete like delete with the checkboxes
|
if (isset($content['nm']['rows']['delete'])) // handle a single delete like delete with the checkboxes
|
||||||
{
|
{
|
||||||
list($id) = @each($content['nm']['rows']['delete']);
|
list($id) = @each($content['nm']['rows']['delete']);
|
||||||
$content['action'] = 'delete';
|
$content['nm']['action'] = 'delete';
|
||||||
$content['nm']['rows']['checked'] = array($id);
|
$content['nm']['selected'] = array($id);
|
||||||
}
|
}
|
||||||
if (isset($content['nm']['rows']['document'])) // handle insert in default document button like an action
|
if (isset($content['nm']['rows']['document'])) // handle insert in default document button like an action
|
||||||
{
|
{
|
||||||
list($id) = @each($content['nm']['rows']['document']);
|
list($id) = @each($content['nm']['rows']['document']);
|
||||||
$content['action'] = 'document';
|
$content['nm']['action'] = 'document';
|
||||||
$content['nm']['rows']['checked'] = array($id);
|
$content['nm']['selected'] = array($id);
|
||||||
}
|
}
|
||||||
if ($content['action'] !== '')
|
if ($content['nm']['action'] !== '')
|
||||||
{
|
{
|
||||||
if (!count($content['nm']['rows']['checked']) && !$content['use_all'] && $content['action'] != 'delete_list')
|
if ($content['use_all']) $content['nm']['select_all'] = $content['use_all']; // legacy support
|
||||||
|
if (!count($content['nm']['selected']) && !$content['nm']['select_all'] && $content['nm']['action'] != 'delete_list')
|
||||||
{
|
{
|
||||||
$msg = lang('You need to select some contacts first');
|
$msg = lang('You need to select some contacts first');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($this->action($content['action'],$content['nm']['rows']['checked'],$content['use_all'],
|
if ($this->action($content['nm']['action'],$content['nm']['selected'],$content['nm']['select_all'],
|
||||||
$success,$failed,$action_msg,$content['do_email'] ? 'email' : 'index',$msg))
|
$success,$failed,$action_msg,$content['do_email'] ? 'email' : 'index',$msg))
|
||||||
{
|
{
|
||||||
$msg .= lang('%1 contact(s) %2',$success,$action_msg);
|
$msg .= lang('%1 contact(s) %2',$success,$action_msg);
|
||||||
@ -217,9 +218,11 @@ class addressbook_ui extends addressbook_bo
|
|||||||
'filter2_no_lang'=> True, // I set no_lang for filter2 (=dont translate the options)
|
'filter2_no_lang'=> True, // I set no_lang for filter2 (=dont translate the options)
|
||||||
'lettersearch' => true,
|
'lettersearch' => true,
|
||||||
'do_email' => $do_email,
|
'do_email' => $do_email,
|
||||||
'default_cols' => '!cat_id,contact_created_contact_modified,distribution_list,contact_id,owner',
|
'default_cols' => '!cat_id,contact_created_contact_modified,distribution_list,contact_id,owner,legacy_actions',
|
||||||
'filter2_onchange' => "if(this.value=='add') { add_new_list(document.getElementById(form::name('filter')).value); this.value='';} else this.form.submit();",
|
'filter2_onchange' => "if(this.value=='add') { add_new_list(document.getElementById(form::name('filter')).value); this.value='';} else this.form.submit();",
|
||||||
'manual' => $do_email ? ' ' : false, // space for the manual icon
|
'manual' => $do_email ? ' ' : false, // space for the manual icon
|
||||||
|
//'actions' => $this->get_actions(), // set on each request, as it depends on some filters
|
||||||
|
'row_id' => 'id',
|
||||||
);
|
);
|
||||||
$csv_export = new addressbook_csv($this);
|
$csv_export = new addressbook_csv($this);
|
||||||
$content['nm']['csv_fields'] = $GLOBALS['egw_info']['user']['preferences']['addressbook']['nextmatch-export-definition'] ?
|
$content['nm']['csv_fields'] = $GLOBALS['egw_info']['user']['preferences']['addressbook']['nextmatch-export-definition'] ?
|
||||||
@ -276,73 +279,11 @@ class addressbook_ui extends addressbook_bo
|
|||||||
'cc' => 'Cc',
|
'cc' => 'Cc',
|
||||||
'bcc' => 'Bcc',
|
'bcc' => 'Bcc',
|
||||||
);
|
);
|
||||||
$sel_options['action'] = array();
|
//$sel_options['action'] = $this->get_legacy_actions($do_email, $content['nm']['col_filter']['tid']);
|
||||||
if ($do_email)
|
$content['nm']['actions'] = $this->get_actions($do_email, $content['nm']['col_filter']['tid']);
|
||||||
{
|
|
||||||
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
|
|
||||||
$sel_options['action'] = array(
|
|
||||||
'email' => lang('Add %1',lang('business email')),
|
|
||||||
'email_home' => lang('Add %1',lang('home email')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
$sel_options['action'] += array(
|
|
||||||
'delete' => lang('Delete'),
|
|
||||||
);
|
|
||||||
if($content['nm']['col_filter']['tid'] == 'D' && !$GLOBALS['egw_info']['user']['apps']['admin'] && $this->config['history'] != 'userpurge')
|
|
||||||
{
|
|
||||||
// User not allowed to purge
|
|
||||||
unset($sel_options['action']['delete']);
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if user is an admin or the export is not generally turned off (contact_export_limit is non-numerical, eg. no)
|
|
||||||
if (isset($GLOBALS['egw_info']['user']['apps']['admin']) || !$this->config['contact_export_limit'] || (int)$this->config['contact_export_limit'])
|
|
||||||
{
|
|
||||||
if($content['nm']['col_filter']['tid'] == 'D')
|
|
||||||
{
|
|
||||||
$sel_options['action']['undelete'] = lang('Un-delete');
|
|
||||||
}
|
|
||||||
$sel_options['action'] += array(
|
|
||||||
'csv' => lang('Export as CSV'),
|
|
||||||
'vcard' => lang('Export as VCard'), // ToDo: move this to importexport framework
|
|
||||||
);
|
|
||||||
}
|
|
||||||
// if there is any export limit set, pass it on to the nextmatch, to be evaluated by the export
|
// if there is any export limit set, pass it on to the nextmatch, to be evaluated by the export
|
||||||
if (isset($this->config['contact_export_limit']) && (int)$this->config['contact_export_limit']) $content['nm']['export_limit']=$this->config['contact_export_limit'];
|
if (isset($this->config['contact_export_limit']) && (int)$this->config['contact_export_limit']) $content['nm']['export_limit']=$this->config['contact_export_limit'];
|
||||||
$sel_options['action'] += array(
|
|
||||||
'merge' => lang('Merge into first or account, deletes all other!'),
|
|
||||||
'cat_add' => lang('Add or delete Categories'), // add a categirie to multible addresses
|
|
||||||
'infolog_add' => lang('Add a new Infolog'),
|
|
||||||
);
|
|
||||||
if ($GLOBALS['egw_info']['user']['apps']['infolog'])
|
|
||||||
{
|
|
||||||
$sel_options['action']['infolog'] = lang('View linked InfoLog entries');
|
|
||||||
}
|
|
||||||
if (($move2addressbooks=$this->get_addressbooks(EGW_ACL_ADD))) // do we have addressbooks, we should
|
|
||||||
{
|
|
||||||
foreach ($move2addressbooks as $m2a_id => $m2alabel)
|
|
||||||
{
|
|
||||||
$m2a['move_to_'.$m2a_id] = $m2alabel;
|
|
||||||
}
|
|
||||||
$sel_options['action'][lang('Move to addressbook:')] = $m2a;
|
|
||||||
}
|
|
||||||
if (($add_lists = $this->get_lists(EGW_ACL_EDIT))) // do we have distribution lists?
|
|
||||||
{
|
|
||||||
$lists = array();
|
|
||||||
foreach ($add_lists as $list_id => $label)
|
|
||||||
{
|
|
||||||
$lists['to_list_'.$list_id] = $label;
|
|
||||||
}
|
|
||||||
$sel_options['action'][lang('Add to distribution list:')] = $lists;
|
|
||||||
unset($lists);
|
|
||||||
$sel_options['action']['remove_from_list'] = lang('Remove selected contacts from distribution list');
|
|
||||||
$sel_options['action']['delete_list'] = lang('Delete selected distribution list!');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->prefs['document_dir'])
|
|
||||||
{
|
|
||||||
$sel_options['action'][lang('Insert in document').':'] = $this->get_document_actions();
|
|
||||||
}
|
|
||||||
if (!array_key_exists('importexport',$GLOBALS['egw_info']['user']['apps'])) unset($sel_options['action']['export']);
|
|
||||||
|
|
||||||
// dont show tid-selection if we have only one content_type
|
// dont show tid-selection if we have only one content_type
|
||||||
// be a bit more sophisticated asbout it
|
// be a bit more sophisticated asbout it
|
||||||
@ -391,6 +332,289 @@ class addressbook_ui extends addressbook_bo
|
|||||||
$content,$sel_options,$readonlys,$preserv,$do_email ? 2 : 0);
|
$content,$sel_options,$readonlys,$preserv,$do_email ? 2 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get actions / context menu items
|
||||||
|
*
|
||||||
|
* @param boolean $do_email
|
||||||
|
*/
|
||||||
|
private function get_actions($do_email=false, $tid_filter=null)
|
||||||
|
{
|
||||||
|
$actions = array(
|
||||||
|
'view' => array(
|
||||||
|
'caption' => 'View',
|
||||||
|
'default' => true,
|
||||||
|
'allowOnMultiple' => false,
|
||||||
|
'url' => 'menuaction=addressbook.addressbook_ui.view&contact_id=$id',
|
||||||
|
'popup' => egw_link::get_registry('addressbook', 'view_popup'),
|
||||||
|
'group' => $group=1,
|
||||||
|
),
|
||||||
|
'edit' => array(
|
||||||
|
'caption' => 'Edit',
|
||||||
|
'allowOnMultiple' => false,
|
||||||
|
'url' => 'menuaction=addressbook.addressbook_ui.edit&contact_id=',
|
||||||
|
'popup' => egw_link::get_registry('addressbook', 'add_popup'),
|
||||||
|
'group' => $group,
|
||||||
|
),
|
||||||
|
'add' => array(
|
||||||
|
'caption' => 'Add',
|
||||||
|
'url' => 'menuaction=addressbook.addressbook_ui.edit',
|
||||||
|
'popup' => egw_link::get_registry('addressbook', 'add_popup'),
|
||||||
|
'group' => $group,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
if ($do_email)
|
||||||
|
{
|
||||||
|
$actions += array(
|
||||||
|
'email' => array(
|
||||||
|
'caption' => lang('Add %1',lang('business email')),
|
||||||
|
'no_lang' => true,
|
||||||
|
'group' => ++$group,
|
||||||
|
),
|
||||||
|
'email_home' => array(
|
||||||
|
'caption' => lang('Add %1',lang('home email')),
|
||||||
|
'no_lang' => true,
|
||||||
|
'group' => $group,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
++$group; // other AB related stuff group: lists, AB's, categories
|
||||||
|
// categories submenu
|
||||||
|
$actions['cat'] = array(
|
||||||
|
'caption' => 'Categories',
|
||||||
|
'group' => $group,
|
||||||
|
'children' => array(
|
||||||
|
'cat_add' => nextmatch_widget::category_action(
|
||||||
|
'addressbook',$group,'Add category', 'cat_add_'
|
||||||
|
)+array('icon' => 'foldertree_nolines_plus'),
|
||||||
|
'cat_del' => nextmatch_widget::category_action(
|
||||||
|
'addressbook',$group,'Delete category', 'cat_del_'
|
||||||
|
)+array('icon' => 'foldertree_nolines_minus'),
|
||||||
|
'cat_edit' => array(
|
||||||
|
'caption' => 'Edit categories',
|
||||||
|
'url' => 'menuaction=preferences.uicategories.index&cats_app=addressbook&cats_level=True&global_cats=True',
|
||||||
|
'icon' => 'edit',
|
||||||
|
'group' => $group,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
if (!$GLOBALS['egw_info']['user']['apps']['preferences']) unset($actions['cats']['children']['cat_edit']);
|
||||||
|
// Submenu for all distributionlist stuff
|
||||||
|
$actions['lists'] = array(
|
||||||
|
'caption' => 'Distribution lists',
|
||||||
|
'children' => array(
|
||||||
|
'list_add' => array(
|
||||||
|
'caption' => 'Add a new list',
|
||||||
|
'icon' => 'new',
|
||||||
|
'onExecute' => 'javascript:add_new_list',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'group' => $group,
|
||||||
|
);
|
||||||
|
if (($add_lists = $this->get_lists(EGW_ACL_EDIT))) // do we have distribution lists?
|
||||||
|
{
|
||||||
|
$actions['lists']['children'] += array(
|
||||||
|
'to_list' => array(
|
||||||
|
'caption' => 'Add to distribution list',
|
||||||
|
'children' => $add_lists,
|
||||||
|
'prefix' => 'to_list_',
|
||||||
|
'icon' => 'foldertree_nolines_plus',
|
||||||
|
),
|
||||||
|
'remove_from_list' => array(
|
||||||
|
'caption' => 'Remove from distribution list',
|
||||||
|
'confirm' => 'Remove selected contacts from distribution list',
|
||||||
|
'icon' => 'foldertree_nolines_minus',
|
||||||
|
),
|
||||||
|
'delete_list' => array(
|
||||||
|
'caption' => 'Delete selected distribution list!',
|
||||||
|
'confirm' => 'Delete selected distribution list!',
|
||||||
|
'icon' => 'delete',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// move to AB
|
||||||
|
if (($move2addressbooks = $this->get_addressbooks(EGW_ACL_ADD))) // do we have addressbooks, we should
|
||||||
|
{
|
||||||
|
$actions['move_to'] = array(
|
||||||
|
'caption' => 'Move to addressbook',
|
||||||
|
'children' => $move2addressbooks,
|
||||||
|
'prefix' => 'move_to_',
|
||||||
|
'group' => $group,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$actions['merge'] = array(
|
||||||
|
'caption' => 'Merge contacts',
|
||||||
|
'confirm' => 'Merge into first or account, deletes all other!',
|
||||||
|
'hint' => 'Merge into first or account, deletes all other!',
|
||||||
|
'group' => $group,
|
||||||
|
);
|
||||||
|
|
||||||
|
++$group; // integration with other apps: infolog, calendar, filemanager
|
||||||
|
if ($GLOBALS['egw_info']['user']['apps']['infolog'])
|
||||||
|
{
|
||||||
|
$actions['infolog_app'] = array(
|
||||||
|
'caption' => 'InfoLog',
|
||||||
|
'icon' => 'infolog/navbar',
|
||||||
|
'group' => $group,
|
||||||
|
'children' => array(
|
||||||
|
'infolog' => array(
|
||||||
|
'caption' => lang('View linked InfoLog entries'),
|
||||||
|
'icon' => 'infolog/navbar',
|
||||||
|
),
|
||||||
|
'infolog_add' => array(
|
||||||
|
'caption' => 'Add a new Infolog',
|
||||||
|
'icon' => 'new',
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if ($GLOBALS['egw_info']['user']['apps']['calendar'])
|
||||||
|
{
|
||||||
|
$actions['calendar'] = array(
|
||||||
|
'icon' => 'calendar/navbar',
|
||||||
|
'caption' => 'Add appointment',
|
||||||
|
'url' => 'menuaction=calendar.calendar_uiforms.edit&participants=c$id',
|
||||||
|
'popup' => egw_link::get_registry('calendar', 'add_popup'),
|
||||||
|
'group' => $group,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if ($GLOBALS['egw_info']['user']['apps']['filemanager'])
|
||||||
|
{
|
||||||
|
$actions['filemanager'] = array(
|
||||||
|
'icon' => 'filemanager/navbar',
|
||||||
|
'caption' => 'Filemanager',
|
||||||
|
'url' => 'menuaction=filemanager.filemanager_ui.index&path=/apps/addressbook/$id',
|
||||||
|
'group' => $group,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if user is an admin or the export is not generally turned off (contact_export_limit is non-numerical, eg. no)
|
||||||
|
if (isset($GLOBALS['egw_info']['user']['apps']['admin']) || !$this->config['contact_export_limit'] || (int)$this->config['contact_export_limit'])
|
||||||
|
{
|
||||||
|
$actions['export'] = array(
|
||||||
|
'caption' => 'Export',
|
||||||
|
'icon' => 'filesave',
|
||||||
|
'group' => ++$group,
|
||||||
|
'children' => array(
|
||||||
|
'csv' => 'Export as CSV',
|
||||||
|
'vcard' => 'Export as VCard',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->prefs['document_dir'])
|
||||||
|
{
|
||||||
|
$actions += array(
|
||||||
|
'document' => array(
|
||||||
|
'caption' => lang('Insert in %1',egw_vfs::basename($GLOBALS['egw_info']['user']['preferences']['addressbook']['default_document'])),
|
||||||
|
'enabled' => (boolean)$GLOBALS['egw_info']['user']['preferences']['addressbook']['default_document'],
|
||||||
|
'hideOnDisabled' => true,
|
||||||
|
'group' => ++$group,
|
||||||
|
),
|
||||||
|
'documents' => timesheet_merge::document_action(
|
||||||
|
$GLOBALS['egw_info']['user']['preferences']['addressbook']['document_dir'], $group
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
++$group;
|
||||||
|
if (!($tid_filter == 'D' && !$GLOBALS['egw_info']['user']['apps']['admin'] && $this->config['history'] != 'userpurge'))
|
||||||
|
{
|
||||||
|
$actions['delete'] = array(
|
||||||
|
'caption' => 'Delete',
|
||||||
|
'confirm' => 'Delete this contact',
|
||||||
|
'group' => $group,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if($tid_filter == 'D')
|
||||||
|
{
|
||||||
|
$actions['undelete'] = array(
|
||||||
|
'caption' => 'Un-delete',
|
||||||
|
'group' => $group,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//_debug_array($actions);
|
||||||
|
return $actions;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get actions / context menu items
|
||||||
|
*
|
||||||
|
* @param boolean $do_email
|
||||||
|
*/
|
||||||
|
private function get_legacy_actions($do_email=false, $tid_filter=null)
|
||||||
|
{
|
||||||
|
$actions = array();
|
||||||
|
if ($do_email)
|
||||||
|
{
|
||||||
|
$GLOBALS['egw_info']['flags']['include_xajax'] = true;
|
||||||
|
$actions = array(
|
||||||
|
'email' => lang('Add %1',lang('business email')),
|
||||||
|
'email_home' => lang('Add %1',lang('home email')),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$actions += array(
|
||||||
|
'delete' => lang('Delete'),
|
||||||
|
);
|
||||||
|
if($tid_filter == 'D' && !$GLOBALS['egw_info']['user']['apps']['admin'] && $this->config['history'] != 'userpurge')
|
||||||
|
{
|
||||||
|
// User not allowed to purge
|
||||||
|
unset($actions['delete']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if user is an admin or the export is not generally turned off (contact_export_limit is non-numerical, eg. no)
|
||||||
|
if (isset($GLOBALS['egw_info']['user']['apps']['admin']) || !$this->config['contact_export_limit'] || (int)$this->config['contact_export_limit'])
|
||||||
|
{
|
||||||
|
if($tid_filter == 'D')
|
||||||
|
{
|
||||||
|
$actions['undelete'] = lang('Un-delete');
|
||||||
|
}
|
||||||
|
$actions += array(
|
||||||
|
'csv' => lang('Export as CSV'),
|
||||||
|
'vcard' => lang('Export as VCard'), // ToDo: move this to importexport framework
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$actions += array(
|
||||||
|
'merge' => lang('Merge into first or account, deletes all other!'),
|
||||||
|
'cat_add' => lang('Add or delete Categories'), // add a categirie to multible addresses
|
||||||
|
'infolog_add' => lang('Add a new Infolog'),
|
||||||
|
);
|
||||||
|
if ($GLOBALS['egw_info']['user']['apps']['infolog'])
|
||||||
|
{
|
||||||
|
$actions['infolog'] = lang('View linked InfoLog entries');
|
||||||
|
}
|
||||||
|
if (($move2addressbooks=$this->get_addressbooks(EGW_ACL_ADD))) // do we have addressbooks, we should
|
||||||
|
{
|
||||||
|
foreach ($move2addressbooks as $m2a_id => $m2alabel)
|
||||||
|
{
|
||||||
|
$m2a['move_to_'.$m2a_id] = $m2alabel;
|
||||||
|
}
|
||||||
|
$actions[lang('Move to addressbook:')] = $m2a;
|
||||||
|
}
|
||||||
|
if (($add_lists = $this->get_lists(EGW_ACL_EDIT))) // do we have distribution lists?
|
||||||
|
{
|
||||||
|
$lists = array();
|
||||||
|
foreach ($add_lists as $list_id => $label)
|
||||||
|
{
|
||||||
|
$lists['to_list_'.$list_id] = $label;
|
||||||
|
}
|
||||||
|
$actions[lang('Add to distribution list:')] = $lists;
|
||||||
|
unset($lists);
|
||||||
|
$actions['remove_from_list'] = lang('Remove selected contacts from distribution list');
|
||||||
|
$actions['delete_list'] = lang('Delete selected distribution list!');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->prefs['document_dir'])
|
||||||
|
{
|
||||||
|
$actions[lang('Insert in document').':'] = $this->get_document_actions();
|
||||||
|
}
|
||||||
|
if (!array_key_exists('importexport',$GLOBALS['egw_info']['user']['apps'])) unset($actions['export']);
|
||||||
|
|
||||||
|
//_debug_array($actions);
|
||||||
|
return $actions;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Email address-selection popup
|
* Email address-selection popup
|
||||||
*
|
*
|
||||||
@ -1083,10 +1307,8 @@ class addressbook_ui extends addressbook_bo
|
|||||||
|
|
||||||
$readonlys = array();
|
$readonlys = array();
|
||||||
$photos = $homeaddress = $roles = $notes = false;
|
$photos = $homeaddress = $roles = $notes = false;
|
||||||
foreach($rows as $n => $val)
|
foreach($rows as $n => &$row)
|
||||||
{
|
{
|
||||||
$row =& $rows[$n];
|
|
||||||
|
|
||||||
$given = $row['n_given'] ? $row['n_given'] : ($row['n_prefix'] ? $row['n_prefix'] : '');
|
$given = $row['n_given'] ? $row['n_given'] : ($row['n_prefix'] ? $row['n_prefix'] : '');
|
||||||
|
|
||||||
switch($order)
|
switch($order)
|
||||||
@ -2059,8 +2281,9 @@ class addressbook_ui extends addressbook_bo
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function add_new_list(owner)
|
function add_new_list()
|
||||||
{
|
{
|
||||||
|
var owner=document.getElementById("exec[nm][filter]").value;
|
||||||
var name = window.prompt("'.lang('Name for the distribution list').'");
|
var name = window.prompt("'.lang('Name for the distribution list').'");
|
||||||
if (name)
|
if (name)
|
||||||
{
|
{
|
||||||
|
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
|||||||
</hbox>
|
</hbox>
|
||||||
<styles>.rightPadAdd { width: 30px; }</styles>
|
<styles>.rightPadAdd { width: 30px; }</styles>
|
||||||
</template>
|
</template>
|
||||||
<template id="addressbook.index.rows" template="" lang="" group="0" version="1.9.003">
|
<template id="addressbook.index.rows" template="" lang="" group="0" version="1.9.004">
|
||||||
<grid width="100%">
|
<grid width="100%">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
@ -48,19 +48,19 @@
|
|||||||
<nextmatch-sortheader span="all" label="own sorting" id="n_fileas"/>
|
<nextmatch-sortheader span="all" label="own sorting" id="n_fileas"/>
|
||||||
</row>
|
</row>
|
||||||
<row disabled="!@order=n_given">
|
<row disabled="!@order=n_given">
|
||||||
<nextmatch-sortheader id="n_given" label="Firstname"/>
|
<nextmatch-sortheader label="Firstname" id="n_given"/>
|
||||||
<nextmatch-sortheader label="Name" id="n_family"/>
|
<nextmatch-sortheader label="Name" id="n_family"/>
|
||||||
</row>
|
</row>
|
||||||
<row disabled="!@order=n_family">
|
<row disabled="!@order=n_family">
|
||||||
<nextmatch-sortheader label="Name" id="n_family"/>
|
<nextmatch-sortheader label="Name" id="n_family"/>
|
||||||
<nextmatch-sortheader id="n_given" label="Firstname"/>
|
<nextmatch-sortheader label="Firstname" id="n_given"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<nextmatch-sortheader id="org_name" label="Organisation" span="all"/>
|
<nextmatch-sortheader label="Organisation" span="all" id="org_name"/>
|
||||||
</row>
|
</row>
|
||||||
<row disabled="!@order=/^(org_name|n_fileas|adr_one_postalcode|contact_modified|contact_created|#)/">
|
<row disabled="!@order=/^(org_name|n_fileas|adr_one_postalcode|contact_modified|contact_created|#)/">
|
||||||
<nextmatch-sortheader id="n_family" label="Name"/>
|
<nextmatch-sortheader label="Name" id="n_family"/>
|
||||||
<nextmatch-sortheader id="n_given" label="Firstname" class="leftPad5"/>
|
<nextmatch-sortheader label="Firstname" id="n_given" class="leftPad5"/>
|
||||||
</row>
|
</row>
|
||||||
<row disabled="@order=n_fileas">
|
<row disabled="@order=n_fileas">
|
||||||
<nextmatch-sortheader span="all" label="own sorting" id="n_fileas"/>
|
<nextmatch-sortheader span="all" label="own sorting" id="n_fileas"/>
|
||||||
@ -70,23 +70,23 @@
|
|||||||
<nextmatch-header label="role" id="role"/>
|
<nextmatch-header label="role" id="role"/>
|
||||||
<nextmatch-header label="Category" id="cat_id"/>
|
<nextmatch-header label="Category" id="cat_id"/>
|
||||||
<nextmatch-header label="Photo" id="photo"/>
|
<nextmatch-header label="Photo" id="photo"/>
|
||||||
<nextmatch-header id="bday" label="Birthday"/>
|
<nextmatch-header label="Birthday" id="bday"/>
|
||||||
<vbox options="0,0">
|
<vbox options="0,0">
|
||||||
<nextmatch-header label="Business address" id="business"/>
|
<nextmatch-header label="Business address" id="business"/>
|
||||||
<nextmatch-customfilter id="adr_one_countrycode" options="select-country,Country,0,No country selected" class="countrySelect"/>
|
<nextmatch-customfilter id="adr_one_countrycode" options="select-country,Country,0,No country selected" class="countrySelect"/>
|
||||||
<nextmatch-sortheader id="adr_one_postalcode" label="zip code"/>
|
<nextmatch-sortheader label="zip code" id="adr_one_postalcode"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<nextmatch-header label="Home address" id="home"/>
|
<nextmatch-header label="Home address" id="home"/>
|
||||||
<vbox options="0,0">
|
<vbox options="0,0">
|
||||||
<nextmatch-header id="tel_work" label="Business phone"/>
|
<nextmatch-header label="Business phone" id="tel_work"/>
|
||||||
<nextmatch-header label="Mobile phone" id="tel_cell"/>
|
<nextmatch-header label="Mobile phone" id="tel_cell"/>
|
||||||
<nextmatch-header id="tel_home" label="Home phone"/>
|
<nextmatch-header label="Home phone" id="tel_home"/>
|
||||||
<description value="Fax"/>
|
<description value="Fax"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<vbox options="0,0">
|
<vbox options="0,0">
|
||||||
<nextmatch-header id="url" label="Url"/>
|
<nextmatch-header label="Url" id="url"/>
|
||||||
<nextmatch-header label="Business email" id="email"/>
|
<nextmatch-header label="Business email" id="email"/>
|
||||||
<nextmatch-header id="email_home" label="Home email"/>
|
<nextmatch-header label="Home email" id="email_home"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<nextmatch-customfields id="customfields"/>
|
<nextmatch-customfields id="customfields"/>
|
||||||
<nextmatch-header label="Note" id="note"/>
|
<nextmatch-header label="Note" id="note"/>
|
||||||
@ -98,114 +98,116 @@
|
|||||||
<nextmatch-header label="Next date" id="calendar"/>
|
<nextmatch-header label="Next date" id="calendar"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<vbox options="0,0">
|
<vbox options="0,0">
|
||||||
<nextmatch-sortheader id="contact_created" label="Created"/>
|
<nextmatch-sortheader label="Created" id="contact_created"/>
|
||||||
<nextmatch-sortheader id="contact_modified" label="Last modified"/>
|
<nextmatch-sortheader label="Last modified" id="contact_modified"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<hbox align="center" class="noPrint">
|
<hbox align="center" class="noPrint">
|
||||||
<description value="Actions" align="center"/>
|
<nextmatch-header align="center" label="Actions" id="legacy_actions"/>
|
||||||
<button image="check" label="Check all" id="check_all" statustext="Check all" onclick="toggle_all(this.form,form::name('checked[]')); return false;" needed="1" align="right"/>
|
<button label="Check all" onclick="toggle_all(this.form,form::name('checked[]')); return false;" needed="1" align="right" id="check_all" image="check" statustext="Check all"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
<row class="$row_cont[cat_id]" valign="top">
|
<row class="$row_cont[cat_id]" valign="top">
|
||||||
<image label="$row_cont[type_label]" src="${row}[type]" align="center" no_lang="1"/>
|
<image label="$row_cont[type_label]" align="center" no_lang="1" src="${row}[type]"/>
|
||||||
<vbox options="0,0" id="${row}[id]">
|
<vbox id="${row}[id]" options="0,0">
|
||||||
<description id="${row}[line1]" no_lang="1"/>
|
<description no_lang="1" id="${row}[line1]"/>
|
||||||
<description id="${row}[line2]" no_lang="1"/>
|
<description no_lang="1" id="${row}[line2]"/>
|
||||||
<description id="${row}[org_unit]" no_lang="1"/>
|
<description no_lang="1" id="${row}[org_unit]"/>
|
||||||
<description id="${row}[title]" no_lang="1"/>
|
<description no_lang="1" id="${row}[title]"/>
|
||||||
<description id="${row}[first_org]" no_lang="1"/>
|
<description no_lang="1" id="${row}[first_org]"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<description id="${row}[role]"/>
|
<description id="${row}[role]"/>
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup type="select-cat" options="1" id="${row}[cat_id]" readonly="true"/>
|
<menupopup type="select-cat" readonly="true" id="${row}[cat_id]" options="1"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<image src="${row}[photo]" class="iphoto"/>
|
<image src="${row}[photo]" class="iphoto"/>
|
||||||
<date id="${row}[bday]" readonly="true" options="Y-m-d"/>
|
<date readonly="true" id="${row}[bday]" options="Y-m-d"/>
|
||||||
<vbox options="0,0">
|
<vbox options="0,0">
|
||||||
<description id="${row}[adr_one_countryname]" no_lang="1"/>
|
<description no_lang="1" id="${row}[adr_one_countryname]"/>
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup type="select-country" id="${row}[adr_one_countrycode]" readonly="true"/>
|
<menupopup type="select-country" readonly="true" id="${row}[adr_one_countrycode]"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<hbox options="0,0" orient="0">
|
<hbox orient="0" options="0,0">
|
||||||
<description no_lang="1" id="${row}[adr_one_locality]"/>
|
<description no_lang="1" id="${row}[adr_one_locality]"/>
|
||||||
<description class="leftPad5" no_lang="1" id="${row}[adr_one_region]"/>
|
<description no_lang="1" id="${row}[adr_one_region]" class="leftPad5"/>
|
||||||
<description id="${row}[adr_one_postalcode]" class="leftPad5" value=" " no_lang="1"/>
|
<description no_lang="1" id="${row}[adr_one_postalcode]" value=" " class="leftPad5"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<description no_lang="1" id="${row}[adr_one_street]"/>
|
<description no_lang="1" id="${row}[adr_one_street]"/>
|
||||||
<description id="${row}[adr_one_street2]" no_lang="1"/>
|
<description no_lang="1" id="${row}[adr_one_street2]"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<vbox options="0,0">
|
<vbox options="0,0">
|
||||||
<description id="${row}[adr_two_countryname]" no_lang="1"/>
|
<description no_lang="1" id="${row}[adr_two_countryname]"/>
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup type="select-country" id="${row}[adr_two_countrycode]" readonly="true"/>
|
<menupopup type="select-country" readonly="true" id="${row}[adr_two_countrycode]"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<hbox options="0,0">
|
<hbox options="0,0">
|
||||||
<description no_lang="1" id="${row}[adr_two_locality]"/>
|
<description no_lang="1" id="${row}[adr_two_locality]"/>
|
||||||
<description no_lang="1" id="${row}[adr_two_region]" class="leftPad5"/>
|
<description no_lang="1" id="${row}[adr_two_region]" class="leftPad5"/>
|
||||||
<description id="${row}[adr_two_postalcode]" class="leftPad5" value=" " no_lang="1"/>
|
<description no_lang="1" id="${row}[adr_two_postalcode]" value=" " class="leftPad5"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<description no_lang="1" id="${row}[adr_two_street]"/>
|
<description no_lang="1" id="${row}[adr_two_street]"/>
|
||||||
<description id="${row}[adr_two_street2]" no_lang="1"/>
|
<description no_lang="1" id="${row}[adr_two_street2]"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<vbox options="0,0">
|
<vbox options="0,0">
|
||||||
<url-phone id="${row}[tel_work]" class="telNumbers" readonly="true"/>
|
<url-phone readonly="true" id="${row}[tel_work]" class="telNumbers"/>
|
||||||
<url-phone id="${row}[tel_cell]" class="telNumbers" readonly="true"/>
|
<url-phone readonly="true" id="${row}[tel_cell]" class="telNumbers"/>
|
||||||
<url-phone id="${row}[tel_home]" class="telNumbers" readonly="true"/>
|
<url-phone readonly="true" id="${row}[tel_home]" class="telNumbers"/>
|
||||||
<url-phone id="${row}[tel_fax]" readonly="true"/>
|
<url-phone readonly="true" id="${row}[tel_fax]"/>
|
||||||
<description id="${row}[tel_prefered]" no_lang="1" options=",$row_cont[tel_prefered_link],,,calling,$cont[call_popup]"/>
|
<description no_lang="1" id="${row}[tel_prefered]" options=",$row_cont[tel_prefered_link],,,calling,$cont[call_popup]"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<vbox options="0,0">
|
<vbox options="0,0">
|
||||||
<url class="fixedHeight" id="${row}[url]" readonly="true"/>
|
<url readonly="true" id="${row}[url]" class="fixedHeight"/>
|
||||||
<url-email class="fixedHeight" id="${row}[email]" readonly="true"/>
|
<url-email readonly="true" id="${row}[email]" class="fixedHeight"/>
|
||||||
<url-email class="fixedHeight" id="${row}[email_home]" readonly="true"/>
|
<url-email readonly="true" id="${row}[email_home]" class="fixedHeight"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<customfields-list rows="1" cols="1" id="$row" class="customfields"/>
|
<customfields-list rows="1" cols="1" id="$row" class="customfields"/>
|
||||||
<textbox multiline="true" no_lang="1" id="${row}[note]" readonly="true"/>
|
<textbox multiline="true" no_lang="1" readonly="true" id="${row}[note]"/>
|
||||||
<description id="${row}[distrib_lists]"/>
|
<description id="${row}[distrib_lists]"/>
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup id="${row}[owner]" readonly="true"/>
|
<menupopup readonly="true" id="${row}[owner]"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<description class="contactid" id="${row}[id]"/>
|
<description id="${row}[id]" class="contactid"/>
|
||||||
<vbox options="0,0">
|
<vbox options="0,0">
|
||||||
<link id="${row}[last_link]"/>
|
<link id="${row}[last_link]"/>
|
||||||
<link id="${row}[next_link]"/>
|
<link id="${row}[next_link]"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<vbox options="0,0">
|
<vbox options="0,0">
|
||||||
<date-time id="${row}[created]" readonly="true" class="noWrap"/>
|
<date-time readonly="true" id="${row}[created]" class="noWrap"/>
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup type="select-account" id="${row}[creator]" readonly="true"/>
|
<menupopup type="select-account" readonly="true" id="${row}[creator]"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
<date-time id="${row}[modified]" readonly="true" class="noBreak"/>
|
<date-time readonly="true" id="${row}[modified]" class="noBreak"/>
|
||||||
<menulist>
|
<menulist>
|
||||||
<menupopup type="select-account" id="${row}[modifier]" readonly="true"/>
|
<menupopup type="select-account" readonly="true" id="${row}[modifier]"/>
|
||||||
</menulist>
|
</menulist>
|
||||||
</vbox>
|
</vbox>
|
||||||
<vbox options="0,0" class="noPrint">
|
<vbox class="noPrint" options="0,0">
|
||||||
<hbox options="0">
|
<hbox>
|
||||||
<image options="addressbook.addressbook_ui.view&contact_id=$row_cont[id]" label="View" src="view"/>
|
<image label="View" options="addressbook.addressbook_ui.view&contact_id=$row_cont[id]" src="view"/>
|
||||||
<button image="edit" label="Edit" onclick="window.open(egw::link('/index.php','menuaction=addressbook.addressbook_ui.edit&contact_id=$row_cont[id]'),'_blank','dependent=yes,width=870,height=460,scrollbars=yes,status=yes'); return false;" id="edit[$row_cont[id]]"/>
|
<button label="Edit" onclick="window.open(egw::link('/index.php','menuaction=addressbook.addressbook_ui.edit&contact_id=$row_cont[id]'),'_blank','dependent=yes,width=870,height=460,scrollbars=yes,status=yes'); return false;" id="edit[$row_cont[id]]" image="edit"/>
|
||||||
<button id="delete[$row_cont[id]]" image="delete" label="Delete" statustext="Delete this contact" onclick="return confirm('Delete this contact');"/>
|
<button label="Delete" onclick="return confirm('Delete this contact');" id="delete[$row_cont[id]]" image="delete" statustext="Delete this contact"/>
|
||||||
<checkbox id="checked[]" options="$row_cont[id]" statustext="Select multiple contacts for a further action" align="right"/>
|
<checkbox align="right" id="checked[]" options="$row_cont[id]" statustext="Select multiple contacts for a further action"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
<hbox options="0">
|
<hbox>
|
||||||
<button id="document[$row_cont[id]]" image="etemplate/merge" label="Insert in document" class="image16"/>
|
<button label="Insert in document" id="document[$row_cont[id]]" image="etemplate/merge" class="image16"/>
|
||||||
<image src="filemanager/navbar" options="/index.php?menuaction=filemanager.filemanager_ui.index&path=/apps/addressbook/$row_cont[id]" class="image16" label="Filemanager"/>
|
<image label="Filemanager" options="/index.php?menuaction=filemanager.filemanager_ui.index&path=/apps/addressbook/$row_cont[id]" src="filemanager/navbar" class="image16"/>
|
||||||
<button image="calendar/navbar" label="Add appointment" onclick="window.open(egw::link('/index.php','menuaction=calendar.calendar_uiforms.edit&participants=c$row_cont[id]'),'_blank','dependent=yes,width=750,height=410,scrollbars=yes,status=yes'); return false;" id="calendar" class="image16"/>
|
<button label="Add appointment" onclick="window.open(egw::link('/index.php','menuaction=calendar.calendar_uiforms.edit&participants=c$row_cont[id]'),'_blank','dependent=yes,width=750,height=410,scrollbars=yes,status=yes'); return false;" id="calendar" image="calendar/navbar" class="image16"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
<template id="addressbook.index" template="" lang="" group="0" version="1.7.001">
|
<template id="addressbook.index" template="" lang="" group="0" version="1.9.001">
|
||||||
<grid width="100%">
|
<grid width="100%">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
<column/>
|
<column/>
|
||||||
|
<column/>
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row disabled="!@msg">
|
<row disabled="!@msg">
|
||||||
<description span="all" class="redItalic" align="center" id="msg" no_lang="1"/>
|
<description span="all" class="redItalic" align="center" no_lang="1" id="msg"/>
|
||||||
|
<description/>
|
||||||
<description/>
|
<description/>
|
||||||
</row>
|
</row>
|
||||||
<row disabled="1">
|
<row disabled="1">
|
||||||
@ -213,16 +215,14 @@
|
|||||||
<template align="right" id="addressbook.index.right_add"/>
|
<template align="right" id="addressbook.index.right_add"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<nextmatch options="addressbook.index.rows" id="nm" span="all"/>
|
<nextmatch span="all" id="nm" options="addressbook.index.rows"/>
|
||||||
</row>
|
</row>
|
||||||
<row class="noPrint">
|
<row class="noPrint" disabled="!@nm[selectcols]=/legacy_actions/">
|
||||||
<button id="add" label="Add" statustext="Add a new contact" onclick="window.open(egw::link('/index.php','menuaction=addressbook.addressbook_ui.edit'),'_blank','dependent=yes,width=850,height=440,scrollbars=yes,status=yes'); return false;"/>
|
<button label="Add" onclick="window.open(egw::link('/index.php','menuaction=addressbook.addressbook_ui.edit'),'_blank','dependent=yes,width=850,height=440,scrollbars=yes,status=yes'); return false;" id="add" statustext="Add a new contact"/>
|
||||||
<hbox align="right">
|
<hbox align="right" span="all">
|
||||||
<checkbox id="use_all" label="whole query" onchange="if (this.checked==true && !confirm('Apply the action on the whole query, NOT only the shown contacts!!!')) this.checked=false;" statustext="Apply the action on the whole query, NOT only the shown contacts!!!"/>
|
<checkbox label="whole query" onchange="if (this.checked==true && !confirm('Apply the action on the whole query, NOT only the shown contacts!!!')) this.checked=false;" id="use_all" statustext="Apply the action on the whole query, NOT only the shown contacts!!!"/>
|
||||||
<menulist>
|
<button no_lang="1" id="action" statustext="Select an action or addressbook to move to" label="Select an action or addressbook to move to..." onclick="if (!egw_objectManager.executeActionImplementation(this, 'popup')) alert(egw::lang('You need to select some contacts first')); return false;;"/>
|
||||||
<menupopup onchange="do_action(this);" options="Select an action or addressbook to move to..." no_lang="1" id="action" statustext="Select an action or addressbook to move to"/>
|
<button label="Check all" onclick="toggle_all(this.form,form::name('nm[rows][checked][]')); return false;" needed="1" id="check_all" image="arrow_ltr" statustext="Check all" class="checkAllArrow"/>
|
||||||
</menulist>
|
|
||||||
<button image="arrow_ltr" label="Check all" id="check_all" statustext="Check all" onclick="toggle_all(this.form,form::name('nm[rows][checked][]')); return false;" needed="1" class="checkAllArrow"/>
|
|
||||||
</hbox>
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
|
Loading…
Reference in New Issue
Block a user