getShortVersion(), '3.0', '<')){ $js = "window.addEvent('load', function() { $('" . $this->id . "').addEvent('change', function(){ var sel = this.getSelected().get('value'); $$('.themeset').setStyle('display','none'); $$('#themeset-'+sel).setStyle('display','block'); }).fireEvent('change'); });"; } else { $js = " window.addEvent('load', function() { var chzn = $('" . $this->id . "_chzn'); if(chzn!=null){ $$('.themeset').setStyle('display','none'); $$('#themeset-" . $this->value . "').setStyle('display','block'); $('" . $this->id . "_chzn').addEvent('click', function(){ $$('.themeset').setStyle('display','none'); var text = $('" . $this->id . "_chzn').getElement('span').get('text'); var options = $('" . $this->id . "').getElements('option'); options.each(function(option) { var optText = String(option.get('text')); var optValue = String(option.get('value')); if(text == optText){ var sel = '#themeset-'+optValue; } $$(sel).setStyle('display','block'); }); }).fireEvent('click'); } });"; } $doc->addScriptDeclaration($js); $options = array(); // Load 2x Catalog Themes require_once(JPATH_ROOT . "/modules/mod_roknavmenu/lib/RokNavMenu.php"); RokNavMenu::loadCatalogs(); foreach (RokNavMenu::$themes as $theme_name => $theme_info) { $options[] = JHtml::_('select.option', $theme_name, $theme_info['fullname']); } return $options; } function _getFrontSideTemplate() { if (empty($this->_front_side_template)) { $db = JFactory::getDbo(); $query = $db->getQuery(true); // Get the current default template $query->select('template'); $query->from('#__template_styles'); $query->where('client_id = 0 AND home = 1'); $db->setQuery((string)$query); $defaultemplate = $db->loadResult(); $this->_front_side_template = $defaultemplate; } return $this->_front_side_template; } }