forked from extern/egroupware
* Admin/all apps: fix refresh of admin after calling site configuration, categories, etc from apps
This commit is contained in:
parent
26a58a10a5
commit
f864753113
@ -40,10 +40,6 @@ class uiconfig
|
||||
{
|
||||
egw::redirect_link('/index.php');
|
||||
}
|
||||
$referer = $_POST['submit'] || $_POST['save'] || $_POST['apply'] || $_POST['cancel'] ? $_POST['referer'] :
|
||||
common::get_referer('/admin/index.php',$_POST['referer']);
|
||||
list(,$show_app) = explode('/',$referer);
|
||||
if (!$show_app) $show_app = 'admin';
|
||||
|
||||
// load the translations of the app we show too, so they dont need to be in admin!
|
||||
if ($_appname != 'admin')
|
||||
@ -111,7 +107,7 @@ class uiconfig
|
||||
$c->read_repository();
|
||||
if ($_POST['cancel'] || ($_POST['submit'] || $_POST['save'] || $_POST['apply']) && $GLOBALS['egw']->acl->check('site_config_access',2,'admin'))
|
||||
{
|
||||
egw::redirect_link($referer);
|
||||
egw::redirect_link('/admin/index.php?ajax=true');
|
||||
}
|
||||
|
||||
if ($_POST['submit'] || $_POST['save'] || $_POST['apply'])
|
||||
@ -157,7 +153,7 @@ class uiconfig
|
||||
if(!$errors && !$_POST['apply'])
|
||||
{
|
||||
egw_framework::message(lang('Configuration saved.'), 'success');
|
||||
egw::redirect_link($referer);
|
||||
egw::redirect_link('/admin/index.php', null, 'admin');
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,8 +174,7 @@ class uiconfig
|
||||
$t->set_var('th_text', $GLOBALS['egw_info']['theme']['th_text']);
|
||||
$t->set_var('row_on', $GLOBALS['egw_info']['theme']['row_on']);
|
||||
$t->set_var('row_off', $GLOBALS['egw_info']['theme']['row_off']);
|
||||
$t->set_var('hidden_vars', html::input_hidden('referer', $referer).
|
||||
html::input_hidden('csrf_token', egw_csrf::token(__CLASS__)));
|
||||
$t->set_var('hidden_vars', html::input_hidden('csrf_token', egw_csrf::token(__CLASS__)));
|
||||
|
||||
$vars = $t->get_undefined('body');
|
||||
|
||||
|
@ -3,12 +3,14 @@
|
||||
* EGgroupware administration
|
||||
*
|
||||
* @link http://www.egroupware.org
|
||||
* @author Joseph Engo <jengo@phpgroupware.org>
|
||||
* @author Stephen Brown <steve@dataclarity.net> distribute admin across the application directories
|
||||
* @package admin
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
header('Location: ../index.php?menuaction=admin.admin_ui.index&ajax=true'.
|
||||
(isset($_GET['sessionid']) ? '&sessionid='.$_GET['sessionid'].'&kp3='.$_GET['kp3'] : ''));
|
||||
// redirect to admin with a meta-refresh, so admin/js/app.js can intercept, if loaded
|
||||
echo '<html><head>
|
||||
<meta http-equiv="refresh" content="1;URL=../index.php?menuaction=admin.admin_ui.index&ajax=true"/>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>';
|
||||
|
@ -87,6 +87,11 @@ app.classes.admin = AppJS.extend(
|
||||
var self = this;
|
||||
jQuery(iframe.getDOMNode()).off('load.admin')
|
||||
.bind('load.admin', function(){
|
||||
if (this.contentDocument.location.href.match(/(\/admin\/|\/admin\/index.php|menuaction=admin.admin_ui.index)/))
|
||||
{
|
||||
this.contentDocument.location.href = 'about:blank'; // stops redirect from admin/index.php
|
||||
self.load(); // load own top-level index aka user-list
|
||||
}
|
||||
self._hide_navbar.call(self);
|
||||
}
|
||||
);
|
||||
@ -115,6 +120,8 @@ app.classes.admin = AppJS.extend(
|
||||
else
|
||||
{
|
||||
this.egw.app_header('');
|
||||
// blank iframe, to not keep something running there
|
||||
this.iframe.getDOMNode().contentDocument.location.href = 'about:blank';
|
||||
}
|
||||
this.iframe.set_disabled(!_url);
|
||||
this.nm.set_disabled(!!_url);
|
||||
@ -160,6 +167,12 @@ app.classes.admin = AppJS.extend(
|
||||
return false; // --> no regular refresh
|
||||
}
|
||||
}
|
||||
// not a user or group, eg. categories
|
||||
else if (!_id)
|
||||
{
|
||||
this.load();
|
||||
return false; // --> no regular refresh needed
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* @link http://www.egroupware.org
|
||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @package infolog
|
||||
* @copyright (c) 2003-6 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @copyright (c) 2003-14 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||
* @version $Id$
|
||||
*/
|
||||
@ -87,12 +87,9 @@ class infolog_customfields
|
||||
{
|
||||
break;
|
||||
}
|
||||
// fall through
|
||||
case 'cancel':
|
||||
$GLOBALS['egw']->redirect_link('/index.php',array(
|
||||
'menuaction' => 'infolog.infolog_ui.index',
|
||||
'ajax' => 'true',
|
||||
));
|
||||
exit;
|
||||
egw::redirect_link('/admin/index.php', null, 'admin');
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2386,10 +2386,7 @@ class infolog_ui
|
||||
|
||||
if($button == 'save' || $button == 'cancel')
|
||||
{
|
||||
egw::redirect_link('/index.php',array(
|
||||
'menuaction' => 'infolog.infolog_ui.index',
|
||||
'ajax' => 'true',
|
||||
));
|
||||
egw::redirect_link('/admin/index.php', null, 'admin');
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user