From 56bada408f79af851ec3dbab549353bfacc0db24 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 21 Oct 2013 14:41:51 +0000 Subject: [PATCH] rename template regarding list interface for manage identities and accounts --- mail/inc/class.mail_signatures.inc.php | 22 ++++++++++++++- mail/inc/class.mail_uipreferences.inc.php | 28 ++++++++++++++++--- mail/js/app.js | 16 ++++++++++- ...{accounts.index.xet => profiles.index.xet} | 4 +-- 4 files changed, 62 insertions(+), 8 deletions(-) rename mail/templates/default/{accounts.index.xet => profiles.index.xet} (90%) diff --git a/mail/inc/class.mail_signatures.inc.php b/mail/inc/class.mail_signatures.inc.php index ddd8f196c5..932c0fc927 100644 --- a/mail/inc/class.mail_signatures.inc.php +++ b/mail/inc/class.mail_signatures.inc.php @@ -137,10 +137,30 @@ class mail_signatures $row['fm_defaultsignature'] = ($row['fm_defaultsignature']?'Default':''); } array_unshift($rows,array(''=> '')); -//_debug_array($rows); return $rows; } + /** + * edit signature + * + * @param array $content=null + * @param string $msg=null + */ + function edit(array $content=null,$msg=null) + { + + } + + /** + * delete signature + * + * @param array _identityID + * @return xajax response + */ + function ajax_deleteSignature($_identityID) + { + } + function getDefaultSignature() { $db = clone($GLOBALS['egw']->db); $db->set_app('felamimail'); diff --git a/mail/inc/class.mail_uipreferences.inc.php b/mail/inc/class.mail_uipreferences.inc.php index 91871572f7..0f5883a625 100644 --- a/mail/inc/class.mail_uipreferences.inc.php +++ b/mail/inc/class.mail_uipreferences.inc.php @@ -56,7 +56,7 @@ class mail_uipreferences function index(array $content=null,$msg=null) { //Instantiate an etemplate_new object - $tmpl = new etemplate_new('mail.accounts.index'); + $tmpl = new etemplate_new('mail.profiles.index'); if (!is_array($content)) { $content['acc']= $this->get_rows($rows,$readonlys); @@ -99,7 +99,7 @@ class mail_uipreferences 'caption' => lang('Open'), 'icon' => 'view', 'group' => ++$group, - 'onExecute' => 'javaScript:app.mail.account_open', + 'onExecute' => 'javaScript:app.mail.profile_open', 'allowOnMultiple' => false, 'default' => true, ), @@ -107,7 +107,7 @@ class mail_uipreferences 'caption' => lang('delete'), 'icon' => 'delete', 'group' => ++$group, - 'onExecute' => 'javaScript:app.mail.account_delete', + 'onExecute' => 'javaScript:app.mail.profile_delete', 'allowOnMultiple' => false, ), ); @@ -154,8 +154,28 @@ class mail_uipreferences $row['default'] = ($row['default']?'Default':''); } array_unshift($rows,array(''=> '')); -//_debug_array($rows); return $rows; } + + /** + * edit account/identity + * + * @param array $content=null + * @param string $msg=null + */ + function edit(array $content=null,$msg=null) + { + + } + + /** + * delete personalMailProfile + * + * @param array account/identity list of UID's + * @return xajax response + */ + function ajax_deleteMailProfile($_profile) + { + } } ?> diff --git a/mail/js/app.js b/mail/js/app.js index 7df547fa37..92e195dca0 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -1813,7 +1813,21 @@ app.mail = AppJS.extend( { var id = _widget[0].id.replace(/row_/,''); var siggrid = this.et2.getArrayMgr("content").getEntry('sig')[id]; - console.log(_egw, _widget); + console.log(_egw, _widget,siggrid,id); + }, + + profile_open: function(_egw, _widget) + { + var id = _widget[0].id.replace(/row_/,''); + var accgrid = this.et2.getArrayMgr("content").getEntry('acc')[id]; + console.log(_egw, _widget,accgrid,id); + }, + + profile_delete: function(_egw, _widget) + { + var id = _widget[0].id.replace(/row_/,''); + var accgrid = this.et2.getArrayMgr("content").getEntry('acc')[id]; + console.log(_egw, _widget,accgrid,id); }, /** diff --git a/mail/templates/default/accounts.index.xet b/mail/templates/default/profiles.index.xet similarity index 90% rename from mail/templates/default/accounts.index.xet rename to mail/templates/default/profiles.index.xet index 5597033b44..139bb7231f 100644 --- a/mail/templates/default/accounts.index.xet +++ b/mail/templates/default/profiles.index.xet @@ -1,7 +1,7 @@ -