mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
Mobile theme W.I.P.:
- Activate SVGs in framework
This commit is contained in:
parent
5b10bde980
commit
5467b3bdf4
@ -766,6 +766,7 @@ class common
|
|||||||
*/
|
*/
|
||||||
static function image($app,$image,$extension='',$svg=false)
|
static function image($app,$image,$extension='',$svg=false)
|
||||||
{
|
{
|
||||||
|
$svg = html::$ua_mobile?null:$svg; // ATM we use svg icons only for mobile theme
|
||||||
static $image_map_no_svg = null, $image_map_svg = null;
|
static $image_map_no_svg = null, $image_map_svg = null;
|
||||||
if (is_null($svg)) $svg = self::svg_usable ();
|
if (is_null($svg)) $svg = self::svg_usable ();
|
||||||
if ($svg)
|
if ($svg)
|
||||||
|
@ -1531,7 +1531,7 @@ abstract class egw_framework
|
|||||||
self::validate_file('/phpgwapi/images.php', array(
|
self::validate_file('/phpgwapi/images.php', array(
|
||||||
'template' => $GLOBALS['egw_info']['server']['template_set'],
|
'template' => $GLOBALS['egw_info']['server']['template_set'],
|
||||||
'etag' => md5(json_encode(common::image_map($GLOBALS['egw_info']['server']['template_set']))),
|
'etag' => md5(json_encode(common::image_map($GLOBALS['egw_info']['server']['template_set']))),
|
||||||
'svg' => 0, // always load non-svg image map
|
'svg' => html::$ua_mobile, // always load non-svg image map, ATM we use svg icons only for mobile theme
|
||||||
));
|
));
|
||||||
self::validate_file('/phpgwapi/user.php', array(
|
self::validate_file('/phpgwapi/user.php', array(
|
||||||
'user' => $GLOBALS['egw_info']['user']['account_lid'],
|
'user' => $GLOBALS['egw_info']['user']['account_lid'],
|
||||||
|
@ -172,18 +172,9 @@ egw.extend('images', egw.MODULE_GLOBAL, function() {
|
|||||||
image_element: function(_url, _alt)
|
image_element: function(_url, _alt)
|
||||||
{
|
{
|
||||||
var icon;
|
var icon;
|
||||||
if (typeof _url == 'string' && _url.match(/\.svg$/))
|
icon = document.createElement('img');
|
||||||
{
|
if (_url) icon.src = _url;
|
||||||
icon = document.createElement('object');
|
if (_alt) icon.alt = _alt;
|
||||||
icon.type = 'image/svg+xml';
|
|
||||||
icon.data = _url;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
icon = document.createElement('img');
|
|
||||||
if (_url) icon.src = _url;
|
|
||||||
if (_alt) icon.alt = _alt;
|
|
||||||
}
|
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user