mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-29 01:09:10 +01:00
Add subscription popup to mail, and fix the context menu. The popup up backend is not completed, though
This commit is contained in:
parent
a45bc7f4a4
commit
a4e1324a04
@ -36,6 +36,7 @@ class mail_ui
|
|||||||
'importMessage' => True,
|
'importMessage' => True,
|
||||||
'importMessageFromVFS2DraftAndDisplay'=>True,
|
'importMessageFromVFS2DraftAndDisplay'=>True,
|
||||||
'TestConnection' => True,
|
'TestConnection' => True,
|
||||||
|
'subscription' => True,
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -176,6 +177,33 @@ class mail_ui
|
|||||||
$GLOBALS['egw']->preferences->save_repository(true);
|
$GLOBALS['egw']->preferences->save_repository(true);
|
||||||
$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'] = self::$icServerID;
|
$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveProfileID'] = self::$icServerID;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Subscription popup window
|
||||||
|
*
|
||||||
|
* @param array $content
|
||||||
|
* @param type $msg
|
||||||
|
*/
|
||||||
|
function subscription(array $content=null ,$msg='')
|
||||||
|
{
|
||||||
|
$stmpl = new etemplate_new('mail.subscribe');
|
||||||
|
$profile = $_GET['acc_id'];
|
||||||
|
|
||||||
|
if (!is_array($content))
|
||||||
|
{
|
||||||
|
if ($profile)
|
||||||
|
{
|
||||||
|
$sel_options['foldertree'] = $this->getFolderTree(false, $profile,true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
$content = array();
|
||||||
|
$readonlys = array();
|
||||||
|
|
||||||
|
$stmpl->exec('mail.mail_ui.subscription', $content,$sel_options,$readonlys,array(),2);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main mail page
|
* Main mail page
|
||||||
@ -309,12 +337,6 @@ class mail_ui
|
|||||||
|
|
||||||
// Set tree actions
|
// Set tree actions
|
||||||
$tree_actions = array(
|
$tree_actions = array(
|
||||||
'all_folders' => array(
|
|
||||||
'caption' => 'Show all folders',
|
|
||||||
'checkbox' => true,
|
|
||||||
'onExecute' => 'javaScript:app.mail.all_folders',
|
|
||||||
'group' => $group++,
|
|
||||||
),
|
|
||||||
'drop_move_mail' => array(
|
'drop_move_mail' => array(
|
||||||
'type' => 'drop',
|
'type' => 'drop',
|
||||||
'acceptedTypes' => 'mail',
|
'acceptedTypes' => 'mail',
|
||||||
@ -358,9 +380,9 @@ class mail_ui
|
|||||||
'onExecute' => 'javaScript:app.mail.mail_DeleteFolder'
|
'onExecute' => 'javaScript:app.mail.mail_DeleteFolder'
|
||||||
),
|
),
|
||||||
'subscribe' => array(
|
'subscribe' => array(
|
||||||
'caption' => 'Subscribe folder',
|
'caption' => 'Subscribe folder ...',
|
||||||
//'icon' => 'configure',
|
//'icon' => 'configure',
|
||||||
'onExecute' => 'javaScript:app.mail.subscribe_folder',
|
'onExecute' => 'javaScript:app.mail.edit_subscribe',
|
||||||
),
|
),
|
||||||
'unsubscribe' => array(
|
'unsubscribe' => array(
|
||||||
'caption' => 'Unsubscribe folder',
|
'caption' => 'Unsubscribe folder',
|
||||||
@ -379,13 +401,13 @@ class mail_ui
|
|||||||
'group' => $group++,
|
'group' => $group++,
|
||||||
),
|
),
|
||||||
'edit_account' => array(
|
'edit_account' => array(
|
||||||
'caption' => 'Edit account',
|
'caption' => 'Edit account ...',
|
||||||
'icon' => 'configure',
|
'icon' => 'configure',
|
||||||
'onExecute' => 'javaScript:app.mail.edit_account',
|
'onExecute' => 'javaScript:app.mail.edit_account',
|
||||||
//'enableId' => '^\\d+$', // only show action on account itself
|
//'enableId' => '^\\d+$', // only show action on account itself
|
||||||
),
|
),
|
||||||
'edit_acl' => array(
|
'edit_acl' => array(
|
||||||
'caption' => 'Edit folder ACL',
|
'caption' => 'Edit folder ACL ...',
|
||||||
'icon' => 'blocks',
|
'icon' => 'blocks',
|
||||||
'onExecute' => 'javaScript:app.mail.edit_acl',
|
'onExecute' => 'javaScript:app.mail.edit_acl',
|
||||||
),
|
),
|
||||||
|
@ -2586,6 +2586,18 @@ app.classes.mail = AppJS.extend(
|
|||||||
.sendRequest();
|
.sendRequest();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Popup the subscription dialog
|
||||||
|
*
|
||||||
|
* @param {action} _action
|
||||||
|
* @param {sender} _senders
|
||||||
|
*/
|
||||||
|
edit_subscribe: function (_action,_senders)
|
||||||
|
{
|
||||||
|
var acc_id = parseInt(_senders[0].id);
|
||||||
|
this.egw.open_link('mail.mail_ui.subscription&acc_id='+acc_id, '_blank', '720x500');
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subscribe selected unsubscribed folder
|
* Subscribe selected unsubscribed folder
|
||||||
*
|
*
|
||||||
|
27
mail/templates/default/subscribe.xet
Executable file
27
mail/templates/default/subscribe.xet
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- $Id$ -->
|
||||||
|
<overlay>
|
||||||
|
<template id="mail.subscribe" template="" lang="" group="0" version="1.9.001">
|
||||||
|
<hbox>
|
||||||
|
<description id="msg" class="message"/>
|
||||||
|
</hbox>
|
||||||
|
<grid>
|
||||||
|
<columns>
|
||||||
|
<column/>
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<groupbox>
|
||||||
|
<caption label="Folders"/>
|
||||||
|
<tree id="foldertree" onclick="" multiple="true"/>
|
||||||
|
</groupbox>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
<hbox>
|
||||||
|
<button statustext="Saves this ACL" label="Save" id="button[save]"/>
|
||||||
|
<button statustext="Applies the changes made" label="Apply" id="button[apply]"/>
|
||||||
|
<button label="Cancel" id="button[cancel]"/>
|
||||||
|
</hbox>
|
||||||
|
</template>
|
||||||
|
</overlay>
|
Loading…
Reference in New Issue
Block a user