forked from extern/egroupware
mail_wizard extending emailadmin_wizard, to allow regular users to use it
This commit is contained in:
parent
7e856af544
commit
e125b27e52
@ -808,6 +808,12 @@ class mail_hooks
|
||||
$menu_title = lang('Preferences'); // ToDo: remove Preferences sub-menu from sidebox
|
||||
$file = array();
|
||||
|
||||
// create account wizard
|
||||
$file += array(
|
||||
'create new account' => "javascript:egw_openWindowCentered2('" .
|
||||
egw::link('/index.php', array('menuaction' => 'mail.mail_wizard.add'), '').
|
||||
"','_blank',640,480,'yes')",
|
||||
);
|
||||
if($preferences->userDefinedAccounts || $preferences->userDefinedIdentities) {
|
||||
$linkData = array (
|
||||
'menuaction' => 'mail.mail_uipreferences.index',
|
||||
|
@ -307,7 +307,13 @@ class mail_ui
|
||||
'delete' => array(
|
||||
'caption' => 'Delete Folder',
|
||||
'onExecute' => 'javaScript:app.mail.mail_DeleteFolder'
|
||||
)
|
||||
),
|
||||
'edit_account' => array(
|
||||
'caption' => 'Edit account',
|
||||
'icon' => 'configure',
|
||||
'onExecute' => 'javaScript:app.mail.edit_account',
|
||||
//'enableId' => '^\\d+$', // only show action on account itself
|
||||
),
|
||||
));
|
||||
//error_log(__METHOD__.__LINE__.array2string($content));
|
||||
if (empty($content[self::$nm_index]['filter2']) || empty($content[self::$nm_index]['search'])) $content[self::$nm_index]['filter2']='quick';
|
||||
|
37
mail/inc/class.mail_wizard.inc.php
Normal file
37
mail/inc/class.mail_wizard.inc.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* EGroupware Mail: Wizard to create mail accounts
|
||||
*
|
||||
* @link http://www.stylite.de
|
||||
* @package emailadmin
|
||||
* @author Ralf Becker <rb@stylite.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Wizard to create mail accounts
|
||||
*
|
||||
* Extends emailadmin_wizard to allow non-admins to use it.
|
||||
*/
|
||||
class mail_wizard extends emailadmin_wizard
|
||||
{
|
||||
/**
|
||||
* Prefix for callback names
|
||||
*/
|
||||
const APP_CLASS = 'mail.mail_wizard.';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
// need emailadmin's app.css file
|
||||
egw_framework::includeCSS('emailadmin','app');
|
||||
|
||||
// and translations
|
||||
translation::add_app('emailadmin');
|
||||
}
|
||||
}
|
@ -1168,7 +1168,7 @@ app.mail = AppJS.extend(
|
||||
},
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
displayAttachment: function(tag_info, widget)
|
||||
{
|
||||
@ -1946,4 +1946,15 @@ app.mail = AppJS.extend(
|
||||
request.sendRequest();
|
||||
},
|
||||
|
||||
/**
|
||||
* Edit a mail account
|
||||
*
|
||||
* @param _action
|
||||
* @param _senders - the representation of the tree leaf to be manipulated
|
||||
*/
|
||||
edit_account: function(_action, _senders)
|
||||
{
|
||||
var acc_id = parseInt(_senders[0].id);
|
||||
this.egw.open_link('mail.mail_wizard.edit&acc_id='+acc_id, '_blank', '640x480');
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user