From ca12321613592fee19a765d93fd9f24f53adc9a8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 16 Feb 2014 09:12:08 +0000 Subject: [PATCH] fixed sitemgr-links show no navbar icon in Stylite/Pixelegg template --- phpgwapi/inc/class.common.inc.php | 6 ++++-- phpgwapi/inc/class.egw_framework.inc.php | 12 +++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index f2dd960cf0..781aafb8b8 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -751,11 +751,13 @@ class common * @param string $appname * @param string|array $image one or more image-name in order of precedence * @param string $extension='' extension to $image, makes sense only with an array + * @param boolean $svg=false should svg images be returned or not: + * true: always return svg, false: never return svg (current default), null: browser dependent, see svg_usable() * @return string url of image or null if not found */ - static function image_on($app,$image,$extension='_on') + static function image_on($app,$image,$extension='_on',$svg=false) { - return ($img = self::image($app,$image,$extension)) ? $img : self::image($app,$image); + return ($img = self::image($app,$image,$extension,$svg)) ? $img : self::image($app,$image,'',$svg); } /** diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index 2f9854a4d2..fdab09165b 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -869,9 +869,11 @@ abstract class egw_framework * * This is similar to the former common::navbar() method - though it returns the vars and does not place them in global scope. * + * @param boolean $svg=false should svg images be returned or not: + * true: always return svg, false: never return svg (current default), null: browser dependent, see svg_usable() * @return array */ - protected static function _get_navbar_apps() + protected static function _get_navbar_apps($svg=false) { list($first) = each($GLOBALS['egw_info']['user']['apps']); if(is_array($GLOBALS['egw_info']['user']['apps']['admin']) && $first != 'admin') @@ -927,13 +929,13 @@ if ($app == 'home') continue; $icon_app = isset($data['icon_app']) ? $data['icon_app'] : $app; if ($app != $GLOBALS['egw_info']['flags']['currentapp']) { - $apps[$app]['icon'] = common::image($icon_app,Array($icon,'nonav')); - $apps[$app]['icon_hover'] = common::image_on($icon_app,Array($icon,'nonav'),'-over'); + $apps[$app]['icon'] = common::image($icon_app,Array($icon,'nonav'),'',$svg); + $apps[$app]['icon_hover'] = common::image_on($icon_app,Array($icon,'nonav'),'-over',$svg); } else { - $apps[$app]['icon'] = common::image_on($icon_app,Array($icon,'nonav'),'-over'); - $apps[$app]['icon_hover'] = common::image($icon_app,Array($icon,'nonav')); + $apps[$app]['icon'] = common::image_on($icon_app,Array($icon,'nonav'),'-over',$svg); + $apps[$app]['icon_hover'] = common::image($icon_app,Array($icon,'nonav'),'',$svg); } } }