mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 19:33:54 +01:00
Admin - get category colors properly updating by doing a full reload
Also maybe squashing a bug where admin would switch to iframe
This commit is contained in:
parent
e1b1339f80
commit
8c20a46652
@ -185,31 +185,27 @@ class admin_categories
|
||||
{
|
||||
if(Api\Json\Response::isJSONResponse())
|
||||
{
|
||||
// Update category styles
|
||||
Api\Json\Response::get()->apply('opener.egw.includeCSS',array(Categories::css($refresh_app == 'admin' ? Categories::GLOBAL_APPNAME : $refresh_app)));
|
||||
if($refresh_app != $content['appname'])
|
||||
{
|
||||
Api\Json\Response::get()->apply('opener.egw.includeCSS',array(Categories::css($content['appname'])));
|
||||
}
|
||||
if($this->appname != 'admin')
|
||||
{
|
||||
Api\Json\Response::get()->apply('opener.egw.show_preferences',array(
|
||||
'cats',
|
||||
$this->appname == 'admin' ? Categories::GLOBAL_APPNAME : array($refresh_app)
|
||||
));
|
||||
$change_color = false;
|
||||
// Need to forcably re-load everything to force the CSS to be loaded
|
||||
Api\Json\Response::get()->redirect(Framework::link('/index.php', array(
|
||||
'menuaction' => 'preferences.preferences_categories_ui.index',
|
||||
'ajax' => 'true',
|
||||
'cats_app' => $appname
|
||||
)), TRUE, $this->appname);
|
||||
}
|
||||
else
|
||||
{
|
||||
Categories::css($refresh_app == 'admin' ? Categories::GLOBAL_APPNAME : $refresh_app);
|
||||
// Need to forcably re-load the iframe to avoid smart etemplate refresh
|
||||
Api\Json\Response::get()->apply('opener.app.admin.load',array(
|
||||
Framework::link('/index.php', array(
|
||||
'menuaction' => $this->list_link,
|
||||
// Need to forcably re-load everything to force the CSS to be loaded
|
||||
Api\Json\Response::get()->redirect(Framework::link('/index.php', array(
|
||||
'menuaction' => 'admin.admin_ui.index',
|
||||
'load' => $this->list_link,
|
||||
'ajax' => 'true',
|
||||
'appname' => $appname
|
||||
)
|
||||
)));
|
||||
)), TRUE, $this->appname);
|
||||
}
|
||||
Framework::window_close();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -96,16 +96,13 @@ class admin_ui
|
||||
// important for first time load eg. from an other application calling it's site configuration
|
||||
$tpl->setElementAttribute('nm', 'disabled', !empty($_GET['load']));
|
||||
$tpl->setElementAttribute('iframe', 'disabled', empty($_GET['load']));
|
||||
$content['iframe'] = 'about:blank'; // we show accounts-list be default now
|
||||
if (!empty($_GET['load']))
|
||||
{
|
||||
$vars = $_GET;
|
||||
$vars['menuaction'] = $vars['load'];
|
||||
unset($vars['load']);
|
||||
$content['iframe'] = Egw::link('/index.php', $vars);
|
||||
}
|
||||
else
|
||||
{
|
||||
$content['iframe'] = 'about:blank'; // we show accounts-list be default now
|
||||
$content[$vars['ajax'] ? 'ajax_target':'iframe'] = Egw::link('/index.php', $vars);
|
||||
}
|
||||
|
||||
$tpl->exec('admin.admin_ui.index', $content, $sel_options);
|
||||
|
@ -106,6 +106,10 @@ app.classes.admin = AppJS.extend(
|
||||
}
|
||||
);
|
||||
}
|
||||
if( this.ajax_target && this.et2.getArrayMgr('content').getEntry('ajax_target'))
|
||||
{
|
||||
this.load(this.et2.getArrayMgr('content').getEntry('ajax_target'));
|
||||
}
|
||||
break;
|
||||
|
||||
case 'admin.customfield_edit':
|
||||
|
Loading…
Reference in New Issue
Block a user