forked from extern/egroupware
group context menu
This commit is contained in:
parent
fbc28c9b62
commit
2d899c0ed1
@ -74,6 +74,27 @@ class admin_ui
|
|||||||
$sel_options['account_primary_group'] = $sel_options['filter'];
|
$sel_options['account_primary_group'] = $sel_options['filter'];
|
||||||
unset($sel_options['account_primary_group']['']);
|
unset($sel_options['account_primary_group']['']);
|
||||||
|
|
||||||
|
$actions = array(
|
||||||
|
'view' => array(
|
||||||
|
'onExecute' => 'javaScript:app.admin.group',
|
||||||
|
'caption' => 'Show members',
|
||||||
|
'enableId' => '^/groups/-\\d+',
|
||||||
|
'default' => true,
|
||||||
|
),
|
||||||
|
'edit' => array(
|
||||||
|
'onExecute' => 'javaScript:app.admin.group',
|
||||||
|
'caption' => 'Edit group',
|
||||||
|
'enableId' => '^/groups/-\\d+',
|
||||||
|
),
|
||||||
|
'delete' => array(
|
||||||
|
'onExecute' => 'javaScript:app.admin.group',
|
||||||
|
'confirm' => 'Delete this group',
|
||||||
|
'caption' => 'Delete group',
|
||||||
|
'enableId' => '^/groups/-\\d+',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
$tpl->setElementAttribute('tree', 'actions', $actions);
|
||||||
|
|
||||||
$tpl->exec('admin.admin_ui.index', $content, $sel_options);
|
$tpl->exec('admin.admin_ui.index', $content, $sel_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +198,7 @@ if ($app == 'felamimail') continue; // disabled fmail for now, as it break whole
|
|||||||
}
|
}
|
||||||
|
|
||||||
$rows = self::$accounts->search($params);
|
$rows = self::$accounts->search($params);
|
||||||
error_log(__METHOD__."() accounts->search(".array2string($params).") total=".self::$accounts->total);
|
//error_log(__METHOD__."() accounts->search(".array2string($params).") total=".self::$accounts->total);
|
||||||
|
|
||||||
foreach($rows as &$row)
|
foreach($rows as &$row)
|
||||||
{
|
{
|
||||||
|
@ -121,5 +121,41 @@ app.admin = AppJS.extend(
|
|||||||
{
|
{
|
||||||
eval(link.substr(11));
|
eval(link.substr(11));
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* View, edit or delete a group callback for tree
|
||||||
|
*
|
||||||
|
* @param Object _action egwAction
|
||||||
|
* @param Object _senders egwActionObject _senders[0].id holds id
|
||||||
|
*/
|
||||||
|
group: function(_action, _senders)
|
||||||
|
{
|
||||||
|
switch(_action.id)
|
||||||
|
{
|
||||||
|
case 'view':
|
||||||
|
this.run(_senders[0].id, this.et2.getWidgetById('tree'));
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'edit':
|
||||||
|
case 'delete':
|
||||||
|
this.splitter.dock();
|
||||||
|
this.iframe.set_src(egw.link('/index.php', {
|
||||||
|
menuaction: _action.id == 'edit' ? 'admin.uiaccounts.edit_group' : 'admin.uiaccounts.delete_group',
|
||||||
|
account_id: _senders[0].id.split('/')[2]
|
||||||
|
}));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete a group callback for tree
|
||||||
|
*
|
||||||
|
* @param Object _action egwAction
|
||||||
|
* @param Object _senders egwActionObject _senders[0].iface.id holds the id
|
||||||
|
*/
|
||||||
|
delete_group: function(_action, _senders)
|
||||||
|
{
|
||||||
|
alert('delete_group '+_senders[0].iface.id);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
<template id="admin.index" template="" lang="" group="0" version="1.9.001">
|
<template id="admin.index" template="" lang="" group="0" version="1.9.001">
|
||||||
<tree autoloading="admin_ui::ajax_tree" id="admin_tree" onclick="app.admin.run(widget.event_args[0],widget);" parent_node="admin_tree_target" std_images="orange-ball"/>
|
<tree autoloading="admin_ui::ajax_tree" id="tree" onclick="app.admin.run(widget.event_args[0],widget);" parent_node="admin_tree_target" std_images="orange-ball"/>
|
||||||
<html id="msg"/>
|
<html id="msg"/>
|
||||||
<split dock_side="topDock" id="admin_splitter" orientation="h">
|
<split dock_side="topDock" id="admin_splitter" orientation="h">
|
||||||
<nextmatch id="admin_nm" template="admin.index.rows"/>
|
<nextmatch id="admin_nm" template="admin.index.rows"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user