mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
W.I.P. of mail toggled on actions preferences
This commit is contained in:
parent
6aec99eab1
commit
4313b57675
@ -112,7 +112,7 @@ class mail_compose
|
|||||||
*
|
*
|
||||||
* @return array an array of actions
|
* @return array an array of actions
|
||||||
*/
|
*/
|
||||||
function getToolbarActions($content)
|
static function getToolbarActions($content)
|
||||||
{
|
{
|
||||||
$group = 0;
|
$group = 0;
|
||||||
$actions = array(
|
$actions = array(
|
||||||
@ -215,7 +215,7 @@ class mail_compose
|
|||||||
),
|
),
|
||||||
|
|
||||||
);
|
);
|
||||||
$acc_smime = Mail\Smime::get_acc_smime($this->mail_bo->profileID);
|
$acc_smime = Mail\Smime::get_acc_smime($content['mailaccount']);
|
||||||
if ($acc_smime['acc_smime_password'])
|
if ($acc_smime['acc_smime_password'])
|
||||||
{
|
{
|
||||||
$actions = array_merge($actions, array(
|
$actions = array_merge($actions, array(
|
||||||
@ -1274,7 +1274,7 @@ class mail_compose
|
|||||||
//$GLOBALS['egw_info']['flags']['currentapp'] = 'mail';//should not be needed
|
//$GLOBALS['egw_info']['flags']['currentapp'] = 'mail';//should not be needed
|
||||||
$etpl = new Etemplate('mail.compose');
|
$etpl = new Etemplate('mail.compose');
|
||||||
|
|
||||||
$etpl->setElementAttribute('composeToolbar', 'actions', $this->getToolbarActions($_content));
|
$etpl->setElementAttribute('composeToolbar', 'actions', self::getToolbarActions($content));
|
||||||
if ($content['mimeType']=='html')
|
if ($content['mimeType']=='html')
|
||||||
{
|
{
|
||||||
//mode="$cont[rtfEditorFeatures]" validation_rules="$cont[validation_rules]" base_href="$cont[upload_dir]"
|
//mode="$cont[rtfEditorFeatures]" validation_rules="$cont[validation_rules]" base_href="$cont[upload_dir]"
|
||||||
|
@ -181,6 +181,44 @@ class mail_hooks
|
|||||||
// modify folderlist, add a none entry, to be able to force the regarding settings, if no folders apply
|
// modify folderlist, add a none entry, to be able to force the regarding settings, if no folders apply
|
||||||
$folderList['none'] = lang('no folders');
|
$folderList['none'] = lang('no folders');
|
||||||
|
|
||||||
|
// Build toogled on actions sel options
|
||||||
|
$allActions = array_merge(mail_compose::getToolbarActions(array(
|
||||||
|
'priority' => true,
|
||||||
|
'mailaccount' => $GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID']
|
||||||
|
)));
|
||||||
|
$toggledOnActions = array (
|
||||||
|
'mail_compose.cc_expander' => array (
|
||||||
|
'id' => 'mail_compose.cc_expander',
|
||||||
|
'label' => lang('Cc'),
|
||||||
|
),
|
||||||
|
'mail_compose.bcc_expander' => array (
|
||||||
|
'id' => 'mail_compose.bcc_expander',
|
||||||
|
'label' => lang('Bcc')
|
||||||
|
),
|
||||||
|
'mail_compose.folder_expander' => array(
|
||||||
|
'id' => 'mail_compose.folder_expander',
|
||||||
|
'label' => lang('Folder')
|
||||||
|
),
|
||||||
|
'mail_compose.replyto_expander' => array(
|
||||||
|
'id' => 'mail_compose.replyto_expander',
|
||||||
|
'label' => lang('Reply to')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach($allActions as $name => $action)
|
||||||
|
{
|
||||||
|
if ($action['checkbox'])
|
||||||
|
{
|
||||||
|
$toggledOnActions['mail_compose.'.$name] = array(
|
||||||
|
'id' => 'mail_compose.'.$name,
|
||||||
|
'label' => lang($action['caption']),
|
||||||
|
'title' => lang($action['hint']),
|
||||||
|
'icon' => $action['icon'],
|
||||||
|
'app' => 'mail'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Settings array for this app */
|
/* Settings array for this app */
|
||||||
$settingsArray = array(
|
$settingsArray = array(
|
||||||
array(
|
array(
|
||||||
@ -368,6 +406,13 @@ class mail_hooks
|
|||||||
),
|
),
|
||||||
'default' => 'vertical'
|
'default' => 'vertical'
|
||||||
),
|
),
|
||||||
|
'toggledOnActions' => array(
|
||||||
|
'type' => 'taglist',
|
||||||
|
'label' => 'Toggled on actions',
|
||||||
|
'help' => 'List of actions to be switched/activated on by default',
|
||||||
|
'name' => 'toggledOnActions',
|
||||||
|
'values' => $toggledOnActions
|
||||||
|
)
|
||||||
);
|
);
|
||||||
if (!$GLOBALS['egw_info']['apps']['stylite']) unset($settingsArray['attachVCardAtCompose']);
|
if (!$GLOBALS['egw_info']['apps']['stylite']) unset($settingsArray['attachVCardAtCompose']);
|
||||||
return $settingsArray;
|
return $settingsArray;
|
||||||
|
Loading…
Reference in New Issue
Block a user