mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
FontAwesome 5 added to admin area and bootstrap3 theme. $tp->toIcon() supports SVG sizing 2x, 3x etc.
This commit is contained in:
@@ -923,11 +923,12 @@ class media_admin_ui extends e_admin_ui
|
||||
protected $cats = array();
|
||||
protected $owner = array();
|
||||
protected $ownercats = array();
|
||||
protected $fontawesome; // frontend loaded version from theme.xml.
|
||||
|
||||
|
||||
function init()
|
||||
{
|
||||
|
||||
$this->fontawesome = (int) e107::getTheme()->getFontAwesome();
|
||||
|
||||
$this->prefs['youtube_apikey']['writeParms']['post'] = " <a target='_blank' href='https://code.google.com/apis/console/'>".LAN_MORE. '</a>';
|
||||
|
||||
@@ -948,6 +949,7 @@ class media_admin_ui extends e_admin_ui
|
||||
// $ownerLabel = (substr($owner,0,1) == '_') ? '' : $owner.": ";
|
||||
$this->cats[$cat] = $row['media_cat_title'];
|
||||
}
|
||||
|
||||
asort($this->cats);
|
||||
|
||||
|
||||
@@ -2067,44 +2069,89 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
// --------------------------
|
||||
|
||||
$items = array();
|
||||
|
||||
$bs2 = e107::getMedia()->getGlyphs('bs3','glyphicon-');
|
||||
|
||||
$md = e107::getMedia();
|
||||
|
||||
foreach($bs2 as $val)
|
||||
|
||||
|
||||
if($this->fontawesome === 5)
|
||||
{
|
||||
$items[] = array(
|
||||
'previewHtml' => $md->previewTag($val, array('type'=>'glyph')),
|
||||
'previewUrl' => 'glyphicon '.$val,
|
||||
'saveValue' => $val.'.glyph',
|
||||
'thumbUrl' => $val,
|
||||
'title' => $val,
|
||||
'slideCaption' => 'Bootstrap',
|
||||
'slideCategory' => 'bootstrap'
|
||||
);
|
||||
|
||||
}
|
||||
// e107::getParser()->setFontAwesome(5);
|
||||
$fab = e107::getMedia()->getGlyphs('fab');
|
||||
|
||||
|
||||
$fa4 = e107::getMedia()->getGlyphs('fa4');
|
||||
foreach($fab as $val)
|
||||
{
|
||||
$items[] = array(
|
||||
'previewHtml' => $md->previewTag('fab-'.$val,array('type'=>'glyph')),
|
||||
'previewUrl' => 'fab fa-'.$val,
|
||||
'saveValue' => 'fab-'.$val.'.glyph',
|
||||
'thumbUrl' => 'fab-'.$val,
|
||||
'title' => 'FA5 fa-'.$val,
|
||||
'slideCaption' => 'Font-Awesome 5 (brand)',
|
||||
'slideCategory' => 'font-awesome'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
foreach($fa4 as $val)
|
||||
{
|
||||
$items[] = array(
|
||||
'previewHtml' => $md->previewTag('fa-'.$val,array('type'=>'glyph')),
|
||||
'previewUrl' => 'fa fa-'.$val,
|
||||
'saveValue' => 'fa-'.$val.'.glyph',
|
||||
'thumbUrl' => 'fa-'.$val,
|
||||
'title' => $val,
|
||||
'slideCaption' => 'Font-Awesome 4',
|
||||
'slideCategory' => 'font-awesome'
|
||||
);
|
||||
$fas = e107::getMedia()->getGlyphs('fas');
|
||||
|
||||
foreach($fas as $val)
|
||||
{
|
||||
$items[] = array(
|
||||
'previewHtml' => $md->previewTag('fas-'.$val, array('type'=>'glyph')),
|
||||
'previewUrl' => 'fas fa-'.$val,
|
||||
'saveValue' => 'fas-'.$val.'.glyph',
|
||||
'thumbUrl' => 'fas-'.$val,
|
||||
'title' => 'FA5 fa-'.$val,
|
||||
'slideCaption' => 'Font-Awesome 5 (free)',
|
||||
'slideCategory' => 'font-awesome'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$fa4 = e107::getMedia()->getGlyphs('fa4');
|
||||
|
||||
foreach($fa4 as $val)
|
||||
{
|
||||
$items[] = array(
|
||||
'previewHtml' => $md->previewTag('fa-'.$val,array('type'=>'glyph')),
|
||||
'previewUrl' => 'fa fa-'.$val,
|
||||
'saveValue' => 'fa-'.$val.'.glyph',
|
||||
'thumbUrl' => 'fa-'.$val,
|
||||
'title' => 'FA4 '.$val,
|
||||
'slideCaption' => 'Font-Awesome 4',
|
||||
'slideCategory' => 'font-awesome'
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if($this->fontawesome === false || ($this->fontawesome < 4))
|
||||
{
|
||||
|
||||
$bs3 = e107::getMedia()->getGlyphs('bs3','glyphicon-');
|
||||
|
||||
foreach($bs3 as $val)
|
||||
{
|
||||
$items[] = array(
|
||||
'previewHtml' => $md->previewTag($val, array('type'=>'glyph')),
|
||||
'previewUrl' => 'glyphicon '.$val,
|
||||
'saveValue' => $val.'.glyph',
|
||||
'thumbUrl' => $val,
|
||||
'title' => 'BS3 '.$val,
|
||||
'slideCaption' => 'Bootstrap',
|
||||
'slideCategory' => 'bootstrap'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$custom = e107::getThemeGlyphs();
|
||||
@@ -2115,7 +2162,7 @@ class media_admin_ui extends e_admin_ui
|
||||
{
|
||||
|
||||
|
||||
$tmp = e107::getMedia()->getGlyphs($glyphConfig,$glyphConfig['prefix']);
|
||||
$tmp = e107::getMedia()->getGlyphs($glyphConfig, $glyphConfig['prefix']);
|
||||
|
||||
if(!empty($tmp))
|
||||
{
|
||||
|
@@ -547,8 +547,8 @@ class adminstyle_infopanel
|
||||
<li id='comment-".$row['comment_id']."' class='media".$hide."'>
|
||||
<span class='media-object pull-left'>{USER_AVATAR=".$row['comment_author_id']."}</span>
|
||||
<div class='btn-group pull-right'>
|
||||
<button data-target='".e_BASE."comment.php' data-comment-id='".$row['comment_id']."' data-comment-action='delete' class='btn btn-sm btn-mini btn-danger'><i class='icon-remove'></i> ".LAN_DELETE."</button>
|
||||
<button data-target='".e_BASE."comment.php' data-comment-id='".$row['comment_id']."' data-comment-action='approve' class='btn btn-sm btn-mini btn-success'><i class='icon-ok'></i> ".LAN_APPROVE."</button>
|
||||
<button data-target='".e_BASE."comment.php' data-comment-id='".$row['comment_id']."' data-comment-action='delete' class='btn btn-sm btn-mini btn-danger'><i class='fa fa-remove'></i> ".LAN_DELETE."</button>
|
||||
<button data-target='".e_BASE."comment.php' data-comment-id='".$row['comment_id']."' data-comment-action='approve' class='btn btn-sm btn-mini btn-success'><i class='fa fa-check'></i> ".LAN_APPROVE."</button>
|
||||
</div>
|
||||
<div class='media-body'>
|
||||
<small class='muted smalltext'>".$tp->lanVars(LAN_POSTED_BY_X, $lanVar)."</small><br />
|
||||
|
@@ -926,7 +926,7 @@ class theme_admin_form_ui extends e_admin_form_ui
|
||||
return '';
|
||||
}
|
||||
|
||||
$text =(!empty($curVal)) ? "<span class='label label-primary'><i class='icon-shopping-cart icon-white'></i> ".$curVal."</span>" : "<span class='label label-success'>".TPVLAN_76."</span>";
|
||||
$text =(!empty($curVal)) ? "<span class='label label-primary'><i class='fa fa-shopping-cart icon-white'></i> ".$curVal."</span>" : "<span class='label label-success'>".TPVLAN_76."</span>";
|
||||
|
||||
return '<span class="price pull-right">'.$text.'</span>';
|
||||
}
|
||||
|
Reference in New Issue
Block a user