diff --git a/mail/inc/class.mail_acl.inc.php b/mail/inc/class.mail_acl.inc.php index 402bd2f613..3f3cd26455 100644 --- a/mail/inc/class.mail_acl.inc.php +++ b/mail/inc/class.mail_acl.inc.php @@ -70,9 +70,12 @@ class mail_acl */ function edit(array $content=null ,$msg='') { - $tmpl = new etemplate_new('mail.acl'); - $mailbox = base64_decode($_GET['mailbox']); + $mailbox = $_GET['mailbox']? base64_decode($_GET['mailbox']): $content['mailbox'][0]; + + // Unset the content if folder is changed, in order to read acl rights for new selected folder + if (!is_array($content['button']) && is_array($content['mailbox']) && !is_array($content['grid']['delete'])) unset($content); + if (!is_array($content)) { if (!empty($mailbox)) diff --git a/mail/js/app.js b/mail/js/app.js index b750f6e064..37f75c1d41 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -3600,7 +3600,23 @@ app.classes.mail = AppJS.extend( var folder = mailbox[1] || 'INBOX', acc_id = mailbox[0]; this.egw.open_link('mail.mail_acl.edit&mailbox='+ jQuery.base64Encode(folder)+'&acc_id='+acc_id, '_blank', '640x480'); }, - + + /** + * + */ + acl_folderChange: function () + { + var mailbox = this.et2.getWidgetById('mailbox'); + + if (mailbox) + { + if (mailbox.taglist.getValue().length > 0) + { + this.et2._inst.submit(); + } + } + }, + /** * Edit a mail account * diff --git a/mail/templates/default/acl.xet b/mail/templates/default/acl.xet index 8c2201f502..d22ef6227d 100755 --- a/mail/templates/default/acl.xet +++ b/mail/templates/default/acl.xet @@ -2,71 +2,83 @@ \ No newline at end of file