'; } /** * Close the current pane * * @return string HTML to close the pane * * @since 1.6 */ public static function end() { return '
'; } /** * Begins the display of a new panel. * * @param string $text Text to display. * @param string $id Identifier of the panel. * * @return string HTML to start a new panel * * @since 1.6 */ public static function panel($text, $id) { return '

' . $text . '

'; } /** * Load the JavaScript behavior. * * @param string $group The pane identifier. * @param array $params Array of options. * * @return void * * @since 1.6 */ protected static function loadBehavior($group, $params = array()) { static $loaded = array(); if (!array_key_exists((string) $group, $loaded)) { // Include MooTools framework JHtml::_('behavior.framework', true); $opt['onActive'] = (isset($params['onActive'])) ? '\\' . $params['onActive'] : null; $opt['onBackground'] = (isset($params['onBackground'])) ? '\\' . $params['onBackground'] : null; $opt['display'] = (isset($params['startOffset'])) ? (int) $params['startOffset'] : null; $opt['useStorage'] = (isset($params['useCookie']) && $params['useCookie']) ? 'true' : 'false'; $opt['titleSelector'] = "dt.tabs"; $opt['descriptionSelector'] = "dd.tabs"; $options = JHtml::getJSObject($opt); $js = ' window.addEvent(\'domready\', function(){ $$(\'dl#' . $group . '.tabs\').each(function(tabs){ new JTabs(tabs, ' . $options . '); }); });'; $document = JFactory::getDocument(); $document->addScriptDeclaration($js); JHtml::_('script', 'system/tabs.js', false, true); $loaded[(string) $group] = true; } } }