fixed not working referesh of ACL list

This commit is contained in:
Ralf Becker 2014-03-12 13:14:23 +00:00
parent 8b326fb60f
commit 2a34b88111
3 changed files with 12 additions and 19 deletions

View File

@ -17,11 +17,6 @@
*/
class admin_acl
{
/**
* Appname we are running as
*/
const APPNAME = 'preferences';
/**
* Methods callable via menuaction
* @var array
@ -184,15 +179,15 @@ class admin_acl
}
elseif (!$old_apps)
{
egw_framework::refresh_opener(lang('ACL added.'), static::APPNAME, null, 'add');
egw_framework::refresh_opener(lang('ACL added.'), 'admin', null, 'add');
}
elseif (!$added_apps)
{
egw_framework::refresh_opener(lang('ACL deleted.'), static::APPNAME, $deleted_ids, 'delete');
egw_framework::refresh_opener(lang('ACL deleted.'), 'admin', $deleted_ids, 'delete');
}
else
{
egw_framework::refresh_opener(lang('ACL updated.'), static::APPNAME, null, 'edit');
egw_framework::refresh_opener(lang('ACL updated.'), 'admin', null, 'edit');
}
}
@ -220,18 +215,18 @@ class admin_acl
elseif (!$rights) // all rights removed --> delete it
{
$this->acl->delete_repository($content['acl_appname'], $content['acl_location'], $content['acl_account']);
egw_framework::refresh_opener(lang('ACL deleted.'), static::APPNAME, $id, 'delete');
egw_framework::refresh_opener(lang('ACL deleted.'), 'admin', $id, 'delete');
}
else
{
$this->acl->add_repository($content['acl_appname'], $content['acl_location'], $content['acl_account'], $rights);
if ($content['id'])
{
egw_framework::refresh_opener(lang('ACL updated.'), static::APPNAME, $id, 'edit');
egw_framework::refresh_opener(lang('ACL updated.'), 'admin', $id, 'edit');
}
else
{
egw_framework::refresh_opener(lang('ACL added.'), static::APPNAME, $id, 'add');
egw_framework::refresh_opener(lang('ACL added.'), 'admin', $id, 'add');
}
}
}

View File

@ -257,10 +257,13 @@ function egw_refresh(_msg, _app, _id, _type, _targetapp, _replace, _with, _msg_t
}
// Refresh target or current app too
var et2 = etemplate2.getByApplication(_targetapp || egw_appName);
for(var i = 0; i < et2.length; i++)
if ((_targetapp || egw_appName) != _app)
{
et2[i].refresh(_msg,_app,_id,_type);
var et2t = etemplate2.getByApplication(_targetapp || egw_appName);
for(var i = 0; i < et2t.length; i++)
{
et2t[i].refresh(_msg,_app,_id,_type);
}
}
//In case that we have etemplate2 ready but it's empty
if (et2.length >= 1)

View File

@ -17,11 +17,6 @@
*/
class preferences_acl extends admin_acl
{
/**
* Appname we are running as
*/
const APPNAME = 'preferences';
function __construct()
{
translation::add_app('admin');