Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Override for tooltips not necessary anymore with latest release of Jo…
…omGallery
  • Loading branch information
Chraneco committed Jul 28, 2015
1 parent e4b4e02 commit 8d6c21d
Showing 1 changed file with 1 addition and 51 deletions.
@@ -1,54 +1,4 @@
<?php defined('_JEXEC') or die('Direct Access to this location is not allowed.');

class JHtmlJoomGalleryBootone
{
/**
* Returns the HTML output of a tooltip if showing tooltips is enabled
*
* @param string $text The text of the tooltip
* @param string $title The title of the tooltip
* @param boolean $addclass True, if the class attribute shall be added and false if it's already there
* @param boolean $translate True, if the text and the title shall be translated
* @param string $class The name of the class used by Mootools to detect the tooltips
* @return string The HTML output created
* @since 1.5.5
*/
public static function tip($text = 'Tooltip', $title = null, $addclass = false, $translate = true, $class = 'hasHint')
{
$config = JoomConfig::getInstance();

$html = '';
if($config->get('jg_tooltips'))
{
static $loaded = false;

if(!$loaded)
{
$params = array();
if($config->get('jg_tooltips') == 2)
{
$params['template'] = '<div class="tooltip jg-tooltip-wrap" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>';
}

JHtml::_('bootstrap.tooltip', '.'.$class, $params);
$loaded = true;
}

if($addclass)
{
$html = ' class="'.$class.'" title="'.JHtml::tooltipText($title, $text, $translate, $translate).'"';
}
else
{
$html = ' '.$class.'" title="'.JHtml::tooltipText($title, $text, $translate, $translate);
}
}

return $html;
}
}
JHtml::register('joomgallery.tip', array('JHtmlJoomGalleryBootone', 'tip'));
?>
<?php defined('_JEXEC') or die('Direct Access to this location is not allowed.'); ?>
<div class="jg-bootone gallery">
<?php if($displayData->params->get('show_page_heading')): ?>
<h2>
Expand Down

0 comments on commit 8d6c21d

Please sign in to comment.