Add folder name indicator to mail_acl, also fix confirm dialog for delete button

This commit is contained in:
Hadi Nategh 2013-12-05 13:49:02 +00:00
parent fd8b4a72f6
commit aad8e35bee
3 changed files with 12 additions and 10 deletions

View File

@ -56,7 +56,7 @@ class mail_acl
*/
function __construct()
{
$this->mail_bo = mail_bo::getInstance(false, (int)$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID']);
$this->mail_bo = mail_bo::getInstance(false, $GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID']);
}
@ -66,17 +66,17 @@ class mail_acl
* @param string $msg
* @param array $content
*
* @todo delete action / recursive action/
*/
function edit(array $content=null ,$msg='')
{
$tmpl = new etemplate_new('mail.acl');
$preserv['mailbox'] = $mailbox = base64_decode($_GET['mailbox']);
$mailbox = base64_decode($_GET['mailbox']);
if (!is_array($content))
{
if (!empty($mailbox))
{
$content['mailbox'] = $mailbox;
$acl = (array)$this->retrive_acl($mailbox, $msg);
$n = 1;
foreach ($acl as $keys => $value)
@ -133,8 +133,6 @@ class mail_acl
if ($content['grid'][count($content['grid'])]['acc_id'])
array_push($content['grid'], array('acc_id'=>''));
$preserv ['mailbox'] = $content['mailbox'];
}
else
{
@ -163,7 +161,8 @@ class mail_acl
}
}
$sel_options['acl'] = $this->aclRightsAbbrvs;
$content['mailbox'] = $preserv['mailbox'];
$preserv ['mailbox'] = $content['mailbox'];
$content['msg'] = $msg;
$tmpl->exec('mail.mail_acl.edit', $content, $sel_options, $readonlys, $preserv,2);
}

View File

@ -2028,7 +2028,7 @@ app.classes.mail = AppJS.extend(
that.et2._inst.submit(buttonId);
}
}
et2_dialog.show_dialog(callbackAclDeleteDialog, this.egw.lang("Do you really want to remove all rights from this account"),this.egw.lang("Delete"), {},et2_dialog.BUTTONS_YES_NO_CANCEL, et2_dialog.WARNING_MESSAGE);
di =et2_dialog.show_dialog(callbackAclDeleteDialog, this.egw.lang("Do you really want to remove all rights from this account"),this.egw.lang("Delete"), {},et2_dialog.BUTTONS_YES_NO_CANCEL, et2_dialog.WARNING_MESSAGE);
},
/**
@ -2039,8 +2039,8 @@ app.classes.mail = AppJS.extend(
*/
edit_acl: function(_action, _senders)
{
var folder_id = _senders[0].id.split('::INBOX/');
this.egw.open_link('mail.mail_acl.edit&mailbox='+folder_id[1], '_blank', '640x480');
var folder_id = _senders[0].id.split('::');
this.egw.open_link('mail.mail_acl.edit&mailbox='+ jQuery.base64Encode(folder_id[1]), '_blank', '640x480');
},
/**

View File

@ -6,6 +6,9 @@
<hbox>
<description id="msg" class="message"/>
</hbox>
<vbox>
<description id="mailbox" align="center"/>
</vbox>
<grid id="grid">
<columns>
<column/>
@ -54,7 +57,7 @@
<checkbox align="center" id="${row}[acl_a]" />
<checkbox align="center" id="${row}[acl_recursive]"/>
<hbox orient=",0,0">
<button align="right" statustext="Delete this ACL" label="Delete" id="delete[${row}]" value="${row}" image="delete" onclick="app.mail.acl_delete_btn"/>
<button align="right" statustext="Delete this ACL" label="Delete" id="delete[${row}]" value="${row}" image="delete" onclick="et2_dialog.confirm(widget,'Do you really want to remove all rights from this account','Remove')"/>
</hbox>
</row>
</rows>