Check for pixelegg theme and switch to SVG

This commit is contained in:
Hadi Nategh 2019-03-05 12:05:28 +01:00
parent 9f8600ca34
commit eb2cee5678
2 changed files with 2 additions and 2 deletions

View File

@ -987,7 +987,7 @@ abstract class Framework extends Framework\Extra
self::includeJS('/api/images.php', array(
'template' => $GLOBALS['egw_info']['server']['template_set'],
'etag' => md5(json_encode(Image::map($GLOBALS['egw_info']['server']['template_set']))),
'svg' => Header\UserAgent::mobile() || $GLOBALS['egw_info']['user']['preferences']['common']['theme'] == 'modern',
'svg' => Header\UserAgent::mobile() || $GLOBALS['egw_info']['user']['preferences']['common']['theme'] == 'pixelegg',
));
self::includeJS('/api/user.php', array(
'user' => $GLOBALS['egw_info']['user']['account_lid'],

View File

@ -31,7 +31,7 @@ class Image
*/
static function find($app,$image,$extension='',$_svg=false)
{
$svg = Header\UserAgent::mobile() || $GLOBALS['egw_info']['user']['preferences']['common']['theme'] == 'modern' ? null : $_svg;
$svg = Header\UserAgent::mobile() || $GLOBALS['egw_info']['user']['preferences']['common']['theme'] == 'pixelegg' ? null : $_svg;
static $image_map_no_svg = null, $image_map_svg = null;
if (is_null($svg)) $svg = self::svg_usable ();
if ($svg)