mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
open preferences and ACL in a popup (ACL still needs a little more work: use et2_dialog to add/edit instead of an other popup)
This commit is contained in:
parent
4c52fe5e65
commit
6fdf8c98d1
@ -185,12 +185,21 @@ class admin_hooks
|
||||
{
|
||||
$actions = array();
|
||||
|
||||
$actions[] = array(
|
||||
'id' => 'acl',
|
||||
'caption' => 'Access control',
|
||||
'url' => 'menuaction=admin.admin_acl.index&account_id=$id',
|
||||
'popup' => '900x450',
|
||||
'icon' => 'lock',
|
||||
);
|
||||
|
||||
if (!$GLOBALS['egw']->acl->check('current_sessions_access',1,'admin')) // no rights to view
|
||||
{
|
||||
$actions[] = array(
|
||||
'description' => 'Login History',
|
||||
'url' => '/index.php',
|
||||
'extradata' => 'menuaction=admin.admin_accesslog.index'
|
||||
'extradata' => 'menuaction=admin.admin_accesslog.index',
|
||||
'icon' => 'timesheet',
|
||||
);
|
||||
}
|
||||
|
||||
@ -199,7 +208,8 @@ class admin_hooks
|
||||
$actions[] = array(
|
||||
'description' => 'Deny access',
|
||||
'url' => '/index.php',
|
||||
'extradata' => 'menuaction=admin.uiaclmanager.list_apps'
|
||||
'extradata' => 'menuaction=admin.uiaclmanager.list_apps',
|
||||
'icon' => 'cancel',
|
||||
);
|
||||
}
|
||||
return $actions;
|
||||
|
@ -115,6 +115,8 @@ class admin_ui
|
||||
'onExecute' => 'javaScript:app.admin.group',
|
||||
'caption' => 'Access control',
|
||||
'enableId' => '^/groups/-\\d+',
|
||||
'url' => 'menuaction=admin.admin_acl.index&account_id=$id',
|
||||
'popup' => '900x450',
|
||||
'icon' => 'lock',
|
||||
'group' => 2,
|
||||
),
|
||||
@ -186,14 +188,6 @@ class admin_ui
|
||||
'onExecute' => 'javaScript:app.admin.account',
|
||||
'group' => $group,
|
||||
),
|
||||
'acl' => array(
|
||||
'caption' => 'Access control',
|
||||
'allowOnMultiple' => false,
|
||||
'url' => 'menuaction=admin.admin_acl.index&account_id=$id',
|
||||
'group' => $group,
|
||||
'onExecute' => 'javaScript:app.admin.iframe_location',
|
||||
'icon' => 'lock',
|
||||
),
|
||||
);
|
||||
// generate urls for add/edit accounts via addressbook
|
||||
$edit = egw_link::get_registry('addressbook', 'edit');
|
||||
@ -234,14 +228,14 @@ if ($app == 'felamimail') continue; // disabled fmail for now, as it break whole
|
||||
if ($item['options'] && preg_match('/(egw_openWindowCentered2?|window.open)\([^)]+,(\d+),(\d+).*(title="([^"]+)")?/', $item['options'], $matches))
|
||||
{
|
||||
$item['popup'] = $matches[2].'x'.$matches[3];
|
||||
$item['onExecute'] = 'javaScript:nm_action';
|
||||
if (isset($matches[5])) $item['tooltip'] = $matches[5];
|
||||
unset($item['options']);
|
||||
}
|
||||
}
|
||||
if (empty($item['icon'])) $item['icon'] = $app.'/navbar';
|
||||
if (empty($item['group'])) $item['group'] = $group;
|
||||
if (empty($item['onExecute'])) $item['onExecute'] = 'javaScript:app.admin.iframe_location';
|
||||
if (empty($item['onExecute'])) $item['onExecute'] = $item['popup'] ?
|
||||
'javaScript:nm_action' : 'javaScript:app.admin.iframe_location';
|
||||
if (!isset($item['allowOnMultiple'])) $item['allowOnMultiple'] = false;
|
||||
|
||||
$actions[$item['id']] = $item;
|
||||
|
@ -272,14 +272,6 @@ app.classes.admin = AppJS.extend(
|
||||
this.egw.json('admin_account::ajax_delete_group', [account_id]).sendRequest();
|
||||
break;
|
||||
|
||||
case 'acl':
|
||||
this.splitter.dock();
|
||||
this.iframe.set_src(egw.link('/index.php', {
|
||||
menuaction: 'admin.admin_acl.index',
|
||||
account_id: _senders[0].id.split('/')[2]
|
||||
}));
|
||||
break;
|
||||
|
||||
default:
|
||||
if (!_action.data.url)
|
||||
{
|
||||
|
@ -199,6 +199,7 @@ delete this user admin de Benutzer löschen
|
||||
deleted admin de gelöscht
|
||||
deletes this field admin de löscht dieses Feld
|
||||
deliver extern admin de Extern ausliefern
|
||||
deny access admin de Zugriff verweigern
|
||||
deny access to access log admin de Zugriff auf Zugangsprotokoll verbieten
|
||||
deny access to application registery admin de Zugriff auf Anwendungsdatenbank verbieten
|
||||
deny access to applications admin de Zugriff auf Anwendungen verbieten
|
||||
|
@ -199,6 +199,7 @@ delete this user admin en Delete this user
|
||||
deleted admin en deleted
|
||||
deletes this field admin en Deletes this field
|
||||
deliver extern admin en Deliver extern
|
||||
deny access admin en Deny access
|
||||
deny access to access log admin en Deny access to access log
|
||||
deny access to application registery admin en Deny access to application registery
|
||||
deny access to applications admin en Deny access to applications
|
||||
|
@ -97,7 +97,7 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function() {
|
||||
show_preferences: function (name, apps)
|
||||
{
|
||||
var current_app = this.app_name();
|
||||
var query = {};
|
||||
var query = {current_app: current_app};
|
||||
// give warning, if app does not support given type, but all apps link to common prefs, if they dont support prefs themselfs
|
||||
if ($j.isArray(apps) && $j.inArray(current_app, apps) == -1 && name != 'prefs' ||
|
||||
!$j.isArray(apps) && (typeof apps[current_app] == 'undefined' || !apps[current_app]))
|
||||
@ -112,11 +112,13 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function() {
|
||||
case 'prefs':
|
||||
query.menuaction ='preferences.preferences_settings.index';
|
||||
if ($j.inArray(current_app, apps) != -1) query.appname=current_app;
|
||||
egw.open_link(egw.link(url, query), '_blank', '900x450');
|
||||
break;
|
||||
|
||||
case 'acl':
|
||||
query.menuaction='preferences.preferences_acl.index';
|
||||
query.acl_app=current_app;
|
||||
egw.open_link(egw.link(url, query), '_blank', '900x450');
|
||||
break;
|
||||
|
||||
case 'cats':
|
||||
@ -132,10 +134,9 @@ egw.extend('preferences', egw.MODULE_GLOBAL, function() {
|
||||
query.menuaction='preferences.preferences_categories_ui.index';
|
||||
query.cats_app=current_app;
|
||||
}
|
||||
egw.link_handler(egw.link(url, query), current_app);
|
||||
break;
|
||||
}
|
||||
query.current_app = current_app;
|
||||
egw.link_handler(egw.link(url, query), current_app);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -433,9 +433,10 @@ class preferences_hooks
|
||||
global $menuData;
|
||||
|
||||
$menuData[] = array(
|
||||
'description' => 'Preferences',
|
||||
'url' => '/index.php',
|
||||
'extradata' => 'menuaction=preferences.preferences_settings.index'
|
||||
'description' => 'Preferences',
|
||||
'url' => '/index.php',
|
||||
'extradata' => 'menuaction=preferences.preferences_settings.index',
|
||||
'popup' => '900x450',
|
||||
);
|
||||
}
|
||||
|
||||
@ -446,6 +447,7 @@ class preferences_hooks
|
||||
*/
|
||||
static function admin($args)
|
||||
{
|
||||
unset($args); // unused, but required by function signature
|
||||
$appname = 'preferences';
|
||||
$file = Array(
|
||||
'Site configuration' => egw::link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname),
|
||||
|
@ -96,21 +96,8 @@ class preferences_settings
|
||||
}
|
||||
if (in_array($button, array('save','cancel')))
|
||||
{
|
||||
if ($content['current_app'] && ($app_data = $GLOBALS['egw_info']['user']['apps'][$content['current_app']]))
|
||||
{
|
||||
if ($app_data['index'])
|
||||
{
|
||||
egw::redirect_link('/index.php', 'menuaction='.$app_data['index'], $content['current_app']);
|
||||
}
|
||||
else
|
||||
{
|
||||
egw::redirect_link('/'.$content['current_app'].'/index.php', null, $content['current_app']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
egw::redirect_link('/index.php');
|
||||
}
|
||||
egw_json_response::get()->call('egw.message', $msg, $msg_type);
|
||||
egw_framework::window_close();
|
||||
}
|
||||
}
|
||||
$appname = $content['appname'] ? $content['appname'] : 'common';
|
||||
@ -130,7 +117,9 @@ class preferences_settings
|
||||
$old_tab = $content['tabs'];
|
||||
}
|
||||
// we need to run under calling app, to be able to restore it to it's index page after
|
||||
$GLOBALS['egw_info']['flags']['currentapp'] = $preserve['current_app'] = $content['current_app'];
|
||||
$preserve['current_app'] = $content['current_app'];
|
||||
$GLOBALS['egw_info']['flags']['currentapp'] = $content['current_app'] == 'common' ?
|
||||
'preferences' : $content['current_app'];
|
||||
egw_framework::includeCSS('preferences','app');
|
||||
|
||||
$sel_options = $readonlys = null;
|
||||
@ -148,7 +137,7 @@ class preferences_settings
|
||||
}
|
||||
if ($msg) egw_framework::message($msg, $msg_type ? $msg_type : 'error');
|
||||
|
||||
$tpl->exec('preferences.preferences_settings.index', $content, $sel_options, $readonlys, $preserve);
|
||||
$tpl->exec('preferences.preferences_settings.index', $content, $sel_options, $readonlys, $preserve, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -36,8 +36,8 @@
|
||||
<template id="preferences.settings.tab1" content="tab1"/>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
<button label="Save" id="button[save]" image="save" background_image="1"/>
|
||||
<button label="Apply" id="button[apply]" image="apply" background_image="1"/>
|
||||
<button label="Cancel" id="button[cancel]" image="cancel" background_image="1"/>
|
||||
<button label="Save" id="button[save]"/>
|
||||
<button label="Apply" id="button[apply]"/>
|
||||
<button label="Cancel" id="button[cancel]" onclick="window.close();"/>
|
||||
</template>
|
||||
</overlay>
|
Loading…
Reference in New Issue
Block a user