* Mail: Make switching between different folders of an mail account available in ACL dialog

-Style mail ACL dialog
This commit is contained in:
Hadi Nategh 2014-09-24 12:02:35 +00:00
parent a0ba88621c
commit 695e78c455
3 changed files with 100 additions and 69 deletions

View File

@ -70,9 +70,12 @@ class mail_acl
*/ */
function edit(array $content=null ,$msg='') function edit(array $content=null ,$msg='')
{ {
$tmpl = new etemplate_new('mail.acl'); $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 (!is_array($content))
{ {
if (!empty($mailbox)) if (!empty($mailbox))

View File

@ -3601,6 +3601,22 @@ app.classes.mail = AppJS.extend(
this.egw.open_link('mail.mail_acl.edit&mailbox='+ jQuery.base64Encode(folder)+'&acc_id='+acc_id, '_blank', '640x480'); 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 * Edit a mail account
* *

View File

@ -2,14 +2,22 @@
<!-- $Id$ --> <!-- $Id$ -->
<overlay> <overlay>
<template id="mail.acl" template="" lang="" group="0" version="1.9.001"> <template id="mail.acl" template="" lang="" group="0" version="1.9.001">
<vbox> <grid width="100%">
<hbox> <columns>
<description id="msg" class="message"/> <column width="10%"/>
</hbox> <column width="90%"/>
<vbox > </columns>
<description id="mailbox" align="center"/> <rows>
</vbox> <row class="dialogHeader">
<grid id="grid"> <description value="Mail ACL" />
</row>
<row>
<description value="Folder:"/>
<taglist id="mailbox" width="100%" autocomplete_url='mail.mail_compose.ajax_searchFolder' maxSelection="1" autocomplete_params='' allowFreeEntries="false" onchange='app.mail.acl_folderChange'/>
</row>
<row>
<description value="Rights:"/>
<grid id="grid" width="100%">
<columns> <columns>
<column/> <column/>
<column/> <column/>
@ -26,7 +34,7 @@
<column/> <column/>
</columns> </columns>
<rows> <rows>
<row class="th dialogHeader"> <row class="th">
<description value="Name"/> <description value="Name"/>
<description value="Common ACL"/> <description value="Common ACL"/>
<description align="center" value="L"/> <description align="center" value="L"/>
@ -62,11 +70,15 @@
</row> </row>
</rows> </rows>
</grid> </grid>
</row>
<row>
<hbox class="dialogFooterToolbar"> <hbox class="dialogFooterToolbar">
<button statustext="Saves this ACL" label="Save" id="button[save]"/> <button statustext="Saves this ACL" label="Save" id="button[save]"/>
<button statustext="Applies the changes made" label="Apply" id="button[apply]"/> <button statustext="Applies the changes made" label="Apply" id="button[apply]"/>
<button label="Cancel" id="button[cancel]"/> <button label="Cancel" id="button[cancel]"/>
</hbox> </hbox>
</vbox> </row>
</rows>
</grid>
</template> </template>
</overlay> </overlay>