WIP SpamTitan integration:

- Add actions into mail contextmenu
This commit is contained in:
Hadi Nategh 2017-05-30 16:19:37 +02:00
parent c09f7b2354
commit 05bf72997c
2 changed files with 23 additions and 0 deletions

View File

@ -1305,6 +1305,16 @@ class mail_ui
{
unset($actions['save']['children']['save2filemanager']);
}
if ($GLOBALS['egw_info']['apps']['stylite'])
{
$spamtitan_actions = stylite_mail_spamtitan::getActions();
$group++;
foreach ($spamtitan_actions as &$action)
{
$action['group'] = $group;
}
$actions = array_merge($actions, $spamtitan_actions);
}
return $actions;
}

View File

@ -5367,6 +5367,19 @@ app.classes.mail = AppJS.extend(
et2_dialog.BUTTON_YES_NO, et2_dialog.WARNING_MESSAGE, undefined, egw);
},
/**
* Actions handler
*
* @param {object} _action egw action
* @param {object} _sender nm row
*/
spamtitan_actions: function (_action, _sender)
{
var id = _sender[0].id;
var data = egw.dataGetUIDdata(id);
this.egw.json('stylite.stylite_mail_spamtitan.ajax_action', [_action.id, {}]).sendRequest(true);
},
/**
* Implement mobile view
*