mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
move empty trash/compress folder to actionsmenu on tree
This commit is contained in:
parent
fd7aab0996
commit
36e13b7c8f
@ -677,31 +677,6 @@ class mail_hooks
|
||||
'icon' => false
|
||||
);
|
||||
$showMainScreenStuff = false;
|
||||
/*
|
||||
if (!$showMainScreenStuff)
|
||||
{
|
||||
// action links that are mostly static and dont need any connection and additional classes ...
|
||||
$file += array(
|
||||
'mail' => egw::link('/index.php','menuaction=mail.mail_ui.index&ajax=true'),
|
||||
);
|
||||
|
||||
}
|
||||
*/
|
||||
// empty trash (if available -> move to trash )
|
||||
if($preferences['deleteOptions'] == 'move_to_trash')
|
||||
{
|
||||
$file += array(
|
||||
'_NewLine_' => '', // give a newline
|
||||
'empty trash' => "javascript:mail_callEmptyTrash();",
|
||||
);
|
||||
}
|
||||
if($preferences['deleteOptions'] == 'mark_as_deleted')
|
||||
{
|
||||
$file += array(
|
||||
'_NewLine_' => '', // give a newline
|
||||
'compress folder' => "javascript:mail_callCompressFolder();",
|
||||
);
|
||||
}
|
||||
// import Message link - only when the required library is available
|
||||
if ((@include_once 'Mail/mimeDecode.php') !== false)
|
||||
{
|
||||
|
@ -389,6 +389,25 @@ class mail_ui
|
||||
'onExecute' => 'javaScript:app.mail.edit_acl',
|
||||
),
|
||||
);
|
||||
$deleteOptions = $GLOBALS['egw_info']['user']['preferences']['mail']['deleteOptions'];
|
||||
if($deleteOptions == 'move_to_trash')
|
||||
{
|
||||
$tree_actions['empty_trash'] = array(
|
||||
'caption' => 'empty trash',
|
||||
'icon' => 'dhtmlxtree/MailFolderTrash',
|
||||
'onExecute' => 'javaScript:app.mail.mail_emptyTrash',
|
||||
//'enableId' => '^\\d+$', // only show action on account itself
|
||||
);
|
||||
}
|
||||
if($preferences['deleteOptions'] == 'mark_as_deleted')
|
||||
{
|
||||
$tree_actions['compress_folder'] = array(
|
||||
'caption' => 'compress folder',
|
||||
'icon' => 'dhtmlxtree/MailFolderTrash',
|
||||
'onExecute' => 'javaScript:app.mail.mail_compressFolder',
|
||||
//'enableId' => '^\\d+$', // only show action on account itself
|
||||
);
|
||||
}
|
||||
|
||||
if (!$this->mail_bo->icServer->queryCapability('ACL')) unset($tree_actions['edit_acl']);
|
||||
if (!$this->mail_bo->icServer->acc_sieve_enabled)
|
||||
|
@ -2375,14 +2375,3 @@ app.classes.mail = AppJS.extend(
|
||||
this.egw.open_link('mail.mail_wizard.edit&acc_id='+acc_id, '_blank', '720x500');
|
||||
}
|
||||
});
|
||||
// wrapper functions to call functions within app
|
||||
function mail_callEmptyTrash()
|
||||
{
|
||||
this.mail_emptyTrash();
|
||||
|
||||
}
|
||||
function mail_callCompressFolder()
|
||||
{
|
||||
this.mail_compressFolder();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user