mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 14:17:49 +02:00
Upgraded to FontAwesome 4.7.0. Glyph caching improved.
This commit is contained in:
@@ -1405,7 +1405,9 @@ class media_admin_ui extends e_admin_ui
|
||||
'close' => 'true'
|
||||
|
||||
);
|
||||
|
||||
|
||||
$items = array();
|
||||
|
||||
//TODO FIXME Upgrade to bs3 when Bootstrap3 Admin is ready.
|
||||
|
||||
$bs2 = e107::getMedia()->getGlyphs('bs3','glyphicon-');
|
||||
@@ -1426,6 +1428,7 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
$fa4 = e107::getMedia()->getGlyphs('fa4');
|
||||
|
||||
|
||||
foreach($fa4 as $val)
|
||||
{
|
||||
$items[] = array(
|
||||
@@ -1442,16 +1445,18 @@ class media_admin_ui extends e_admin_ui
|
||||
if(vartrue($parm['search']))
|
||||
{
|
||||
$filtered = array();
|
||||
foreach($items as $v)
|
||||
if(!empty($items))
|
||||
{
|
||||
if(strpos($v['title'], $parm['search'])!==false)
|
||||
foreach($items as $v)
|
||||
{
|
||||
$v['slideCaption'] = '';
|
||||
$filtered[] = $v;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(strpos($v['title'], $parm['search'])!==false)
|
||||
{
|
||||
$v['slideCaption'] = '';
|
||||
$filtered[] = $v;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
$items = $filtered;
|
||||
}
|
||||
|
||||
|
@@ -929,12 +929,10 @@ class e_media
|
||||
}
|
||||
|
||||
$cache = e107::getCache();
|
||||
$cachTag = !empty($prefix) ? "glyphs_".$prefix : "glyphs";
|
||||
$cache->setMD5($cachTag, false);
|
||||
|
||||
if($data = $cache->retrieve($type,360,true))
|
||||
$cachTag = !empty($prefix) ? "Glyphs_".$prefix."_".$type : "Glyphs_".$type;
|
||||
|
||||
if($data = $cache->retrieve($cachTag ,360,true,true))
|
||||
{
|
||||
$cache->setMD5(null);
|
||||
return e107::unserialize($data);
|
||||
}
|
||||
|
||||
@@ -942,7 +940,7 @@ class e_media
|
||||
if($type == 'fa4')
|
||||
{
|
||||
$pattern = '/\.(fa-(?:\w+(?:-)?)+):before/';
|
||||
$subject = e107::getFile()->getRemoteContent('http://netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.css');
|
||||
$subject = e107::getFile()->getRemoteContent('http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css');
|
||||
// print_a($subject);
|
||||
}
|
||||
elseif($type == 'fa3')
|
||||
@@ -967,8 +965,8 @@ class e_media
|
||||
|
||||
$data = e107::serialize($icons);
|
||||
|
||||
$cache->set($type,$data,true);
|
||||
$cache->setMD5(null);
|
||||
$cache->set_sys($cachTag ,$data,true);
|
||||
|
||||
return $icons;
|
||||
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ define('FONTAWESOME', 4);
|
||||
|
||||
e107::js("url", "https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js", 'jquery', 2);
|
||||
// e107::css('url', 'https://cdn.jsdelivr.net/bootstrap/3.3.5/css/bootstrap.min.css');
|
||||
e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.5.0/css/font-awesome.min.css');
|
||||
e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.7.0/css/font-awesome.min.css');
|
||||
|
||||
|
||||
// Too slow.
|
||||
|
Reference in New Issue
Block a user