mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Fix for font-awesome overlay issue. Renamed glyph() as toGlyph() for consistency.
This commit is contained in:
parent
917bbef849
commit
ddbbfef54f
@ -83,7 +83,7 @@ function loadJSAddons()
|
||||
|
||||
// e107::js("core", "tags/jquery.tagit.js","jquery",3);
|
||||
// e107::css('core', 'tags/jquery.tagit.css', 'jquery');
|
||||
|
||||
|
||||
e107::css('core', 'core/admin.jquery.css', 'jquery');
|
||||
e107::js("core", "core/admin.jquery.js","jquery",4); // Load all default functions.
|
||||
e107::css('core', 'core/all.jquery.css', 'jquery');
|
||||
|
@ -196,7 +196,7 @@ class cpage_shortcodes extends e_shortcode
|
||||
function sc_cmenutitle($parm='')
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$title = $tp->glyph($this->page['menu_title']); // (preg_replace('/i_([\w]*)/',"<i class='i_$1'></i>",$this->page['menu_title']);
|
||||
$title = $tp->toGlyph($this->page['menu_title']); // (preg_replace('/i_([\w]*)/',"<i class='i_$1'></i>",$this->page['menu_title']);
|
||||
|
||||
return $tp->toHTML($title, true, 'TITLE');
|
||||
}
|
||||
|
@ -2407,6 +2407,10 @@ class e_parse extends e_parser
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Convert Text to a suitable format for use in emails. eg. relative links will be replaced with full links etc.
|
||||
* @param string $text
|
||||
@ -2613,14 +2617,11 @@ class e_parser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Parse xxxxx.glyph file to bootstrap glyph format.
|
||||
* @return FALSE if not a glyph file or if bootstrap is not found.
|
||||
*/
|
||||
public function glyph($text)
|
||||
public function toGlyph($text)
|
||||
{
|
||||
if(!deftrue('BOOTSTRAP'))
|
||||
{
|
||||
@ -2639,6 +2640,24 @@ class e_parser
|
||||
// return $text;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display an icon.
|
||||
* @param string $icon
|
||||
* @example $tp->toIcon("{e_IMAGES}icons/something.png");
|
||||
*/
|
||||
public function toIcon($icon='')
|
||||
{
|
||||
if(!vartrue($icon))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$path = $this->replaceConstants($icon,'full');
|
||||
return "<img class='icon' src='".$path."' alt='".basename($path)."' />";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parse new <bbcode> tags into bbcode output.
|
||||
* @param $retainTags : when you want to replace html and retain the <bbcode> tags wrapping it.
|
||||
|
@ -522,13 +522,13 @@ class e_form
|
||||
$thpath = isset($sc_parameters['nothumb']) || vartrue($hide) ? $default : $default_thumb;
|
||||
$label = "<div id='{$name_id}_prev' class='text-center well well-small image-selector' >";
|
||||
|
||||
if($glyph = $tp->glyph($default_url))
|
||||
if($glyph = $tp->toGlyph($default_url))
|
||||
{
|
||||
$label .= $glyph;
|
||||
}
|
||||
else
|
||||
{
|
||||
$label .= "<img src='{$default_url}' alt='{$default_url}' />";
|
||||
$label .= $tp->toIcon($default_url);
|
||||
}
|
||||
|
||||
$label .= "
|
||||
@ -2611,7 +2611,7 @@ class e_form
|
||||
|
||||
case 'icon':
|
||||
|
||||
if($glyph = $tp->glyph($value))
|
||||
if($glyph = $tp->toGlyph($value))
|
||||
{
|
||||
$value = $glyph;
|
||||
}
|
||||
|
@ -1218,7 +1218,7 @@ class e_navigation
|
||||
|
||||
if(vartrue($e107_vars[$act]['image_src']) && strstr($e107_vars[$act]['image_src'],'.glyph'))
|
||||
{
|
||||
$replace[9] = $tp->glyph($e107_vars[$act]['image_src']);
|
||||
$replace[9] = $tp->toGlyph($e107_vars[$act]['image_src']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1629,14 +1629,15 @@ class navigation_shortcodes extends e_shortcode
|
||||
|
||||
if (!vartrue($this->var['link_button'])) return '';
|
||||
|
||||
if($icon = $tp->glyph($this->var['link_button']))
|
||||
if($icon = $tp->toGlyph($this->var['link_button']))
|
||||
{
|
||||
return $icon;
|
||||
}
|
||||
else
|
||||
{
|
||||
$path = e107::getParser()->replaceConstants($this->var['link_button'], 'full', TRUE);
|
||||
return "<img class='icon' src='".$path."' alt='' />";
|
||||
return $tp->toIcon($path);
|
||||
// return "<img class='icon' src='".$path."' alt='' />";
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -48,7 +48,10 @@ tr.highlight-even { background-color: #212121; }
|
||||
color: #363636;
|
||||
}
|
||||
|
||||
|
||||
/* Fix for font-awesome / darkstrap overlay issue. */
|
||||
.icon-white, .nav-pills > .active > a > [class^="icon-"], .nav-pills > .active > a > [class*=" icon-"], .nav-list > .active > a > [class^="icon-"], .nav-list > .active > a > [class*=" icon-"], .navbar-inverse .nav > .active > a > [class^="icon-"], .navbar-inverse .nav > .active > a > [class*=" icon-"], .dropdown-menu > li > a:hover > [class^="icon-"], .dropdown-menu > li > a:hover > [class*=" icon-"], .dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class*=" icon-"], .dropdown-submenu:hover > a > [class^="icon-"], .dropdown-submenu:hover > a > [class*=" icon-"], h1 > [class^="icon-"], h2 > [class^="icon-"], h3 > [class^="icon-"], h4 > [class^="icon-"], h5 > [class^="icon-"], .btn-primary > [class^="icon-"], .nav-tabs > li > a > [class^="icon-"] {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
/*
|
||||
.bootstrap-select, bootstrap-select button
|
||||
|
Loading…
x
Reference in New Issue
Block a user