Some fixes for custom app-theme css:

- Make sure including css on ajax response respect app-theme
- Include app-theme for home portlets
This commit is contained in:
Hadi Nategh 2015-10-09 11:56:18 +00:00
parent 06cbe1f0b0
commit 55c6da3fa7
4 changed files with 8 additions and 4 deletions

View File

@ -55,7 +55,8 @@ class calendar_favorite_portlet extends home_favorite_portlet
{
// Always load app's css
egw_framework::includeCSS('calendar','app');
egw_framework::includeCSS('calendar', 'app-'.$GLOBALS['egw_info']['user']['preferences']['common']['theme']) ||
egw_framework::includeCSS('calendar','app');
if($this->favorite['state']['view'] == 'listview' || is_array($this->favorite) && !$this->favorite['state']['view'])
{

View File

@ -121,7 +121,8 @@ class home_favorite_portlet extends home_portlet
// Always load app's css
egw_framework::includeCSS($this->context['appname'],'app');
egw_framework::includeCSS($this->context['appname'], 'app-'.$GLOBALS['egw_info']['user']['preferences']['common']['theme']) ||
egw_framework::includeCSS($this->context['appname'],'app');
// Always load app's javascript, so most actions have a chance of working
egw_framework::validate_file('','app',$this->context['appname']);

View File

@ -117,7 +117,8 @@ class home_link_portlet extends home_portlet
{
// Always load app's css
egw_framework::includeCSS($this->context['entry']['app'],'app');
egw_framework::includeCSS($this->context['entry']['app'], 'app-'.$GLOBALS['egw_info']['user']['preferences']['common']['theme']) ||
egw_framework::includeCSS($this->context['entry']['app'],'app');
try
{

View File

@ -2276,7 +2276,8 @@ abstract class egw_framework
$app = $GLOBALS['egw_info']['flags']['currentapp'];
// try to add app specific css file
self::includeCSS($app,'app');
self::includeCSS($app, 'app-'.$GLOBALS['egw_info']['user']['preferences']['common']['theme']) ||
self::includeCSS($app,'app');
// add all css files from egw_framework::includeCSS()
$query = null;