<?php /** * @package Redcore * @subpackage Layout * * @copyright Copyright (C) 2012 - 2013 redCOMPONENT.com. All rights reserved. * @license GNU General Public License version 2 or later, see LICENSE. */ defined('JPATH_BASE') or die; $data = $displayData; $metatitle = RHtml::tooltipText(JText::_($data->tip ? $data->tip : $data->title), JText::_('JGLOBAL_CLICK_TO_SORT_THIS_COLUMN'), 0); JHtml::_('rbootstrap.tooltip'); ?> <a href="#" onclick="return false;" class="js-order-col hasTooltip" data-order="<?php echo $data->order; ?> " data-direction="<?php echo strtoupper($data->direction); ?> " data-name="<?php echo JText::_($data->title); ?> " title="<?php echo $metatitle;
/** * Method to sort a column in a grid * * @param string $title The link title * @param string $order The order field for the column * @param string $direction The current direction * @param mixed $selected The selected ordering * @param string $task An optional task override * @param string $new_direction An optional direction for the new column * @param string $tip An optional text shown as tooltip title instead of $title * @param string $icon Icon to show * * @return string * * @deprecated 1.1 Use the function self::sort() that already supports icons and uses layouts */ public static function sorto($title, $order, $direction = 'asc', $selected = 0, $task = null, $new_direction = 'asc', $tip = '', $icon = null) { JHtml::_('rbootstrap.tooltip'); static::main(); $direction = strtolower($direction); $icon = array('chevron-up', 'chevron-down'); $index = (int) ($direction == 'desc'); if ($order != $selected) { $direction = $new_direction; } else { $direction = $direction == 'desc' ? 'asc' : 'desc'; } $html = '<a href="#" onclick="Joomla.tableOrdering(\'' . $order . '\',\'' . $direction . '\',\'' . $task . '\');return false;"' . ' class="hasTooltip" title="' . RHtml::tooltipText(JText::_($tip ? $tip : $title), JText::_('JGLOBAL_CLICK_TO_SORT_THIS_COLUMN'), 0) . '">'; $html .= '<i class="icon-sort"></i>'; if ($order == $selected) { $html .= ' <i class="icon-' . $icon[$index] . '"></i>'; } $html .= '</a>'; return $html; }
</div> <?php if ($showFilterButton) { ?> <div class="btn-wrapper"> <button type="button" class="btn hasTooltip js-stools-btn-filter" title="<?php echo RHtml::tooltipText('LIB_REDCORE_SEARCHTOOLS_DESC'); ?> "> <?php echo JText::_('LIB_REDCORE_SEARCHTOOLS'); ?> <i class="caret"></i> </button> </div> <?php } ?> <div class="btn-wrapper"> <button type="button" class="btn hasTooltip js-stools-btn-clear" title="<?php echo RHtml::tooltipText('LIB_REDCORE_SEARCHTOOLS_CLEAR_DESC'); ?> "> <?php echo JText::_('LIB_REDCORE_SEARCHTOOLS_CLEAR'); ?> </button> </div> </div> <?php }
</div> <?php if ($filterButton) { ?> <div class="btn-wrapper hidden-phone"> <button type="button" class="btn hasTooltip js-stools-btn-filter" title="<?php echo RHtml::tooltipText('JSEARCH_TOOLS_DESC'); ?> "> <?php echo JText::_('JSEARCH_TOOLS'); ?> <i class="caret"></i> </button> </div> <?php } ?> <div class="btn-wrapper"> <button type="button" class="btn hasTooltip js-stools-btn-clear" title="<?php echo RHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?> "> <?php echo JText::_('JSEARCH_FILTER_CLEAR'); ?> </button> </div> <?php } }
/** * Method to get the field label markup. * * @return string The field label markup. * * @since 11.1 */ protected function getLabel() { $label = ''; if ($this->hidden) { return $label; } // Get the label text from the XML element, defaulting to the element name. $text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name']; $text = $this->translateLabel ? JText::_($text) : $text; // Build the class for the label. $class = !empty($this->description) ? 'hasTooltip' : ''; $class = $this->required == true ? $class . ' required' : $class; $class = !empty($this->labelClass) ? $class . ' ' . $this->labelClass : $class; // Add the opening label tag and main attributes attributes. $label .= '<label id="' . $this->id . '-lbl" for="' . $this->id . '" class="' . $class . '"'; // If a description is specified, use it to build a tooltip. if (!empty($this->description)) { RHtml::_('rbootstrap.tooltip'); $label .= ' title="' . RHtml::tooltipText(trim($text, ':'), JText::_($this->description), 0) . '"'; } // Add the label text and closing tag. if ($this->required) { $label .= '>' . $text . '<span class="star"> *</span></label>'; } else { $label .= '>' . $text . '</label>'; } return $label; }
$classes = array_filter((array) $displayData['classes']); $position = $displayData['position']; $id = $for . '-lbl'; $title = ''; // If a description is specified, use it to build a tooltip. if (!empty($desc)) { $classes[] = 'hasTooltip'; if (defined('REDCORE_BOOTSTRAPPED') && version_compare(JVERSION, '3.0', '<')) { JHtml::_('rbootstrap.tooltip', '.hasTooltip'); $title = ' title="' . RHtml::tooltipText(trim($text, ':'), $desc, 0) . '"'; } elseif (version_compare(JVERSION, '3.0', '<')) { JHTML::_('behavior.tooltip', '.hasTooltip', array('placement' => 'right')); $title = ' title="' . trim($text . '::' . $desc) . '"'; } else { JHtml::_('rbootstrap.tooltip', '.hasTooltip'); $title = ' title="' . RHtml::tooltipText(trim($text, ':'), $desc, 0) . '"'; } } // If required, there's a class for that. if ($req) { $classes[] = 'required'; } ?> <label id="<?php echo $id; ?> " for="<?php echo $for; ?> " class="<?php echo implode(' ', $classes);