Пытаюсь сделать тулбар для компонента. Как бы я не добавлял кнопки у них работает атрибут href, а не onclick. Остальные тулбары работают. Подскажите как сделать правильно
require_once( JPATH_COMPONENT.DS.'controller.php' );
require_once( JPATH_COMPONENT.DS.'helper.php' );
require_once (JApplicationHelper::getPath('admin_html'));
// Set the helper directory
JHTML::addIncludePath( JPATH_COMPONENT.DS.'helper' );
$mainframe->set('JComponentTitle', '<div class="header">'.JText::_('STAT').'</div>');
JToolBarHelper::custom('clean', 'delete', '', 'CLEANHISTORY', false);
//JToolBarHelper::makeDefault();
$controller = new StatController();
$task=JRequest::getCmd('task');
if($task=='clean'){
$controller->cleanHistory();
}
$c = JRequest::getCmd('c', 'nounique');
if($c == 'unique') {
JSubMenuHelper::addEntry(JText::_('Visits'), 'index.php?option=com_stat');
JSubMenuHelper::addEntry(JText::_('Uniquevisits'), 'index.php?option=com_stat&c=unique', true );
} else {
JSubMenuHelper::addEntry(JText::_('Visits'), 'index.php?option=com_stat', true );
JSubMenuHelper::addEntry(JText::_('Uniquevisits'), 'index.php?option=com_stat&c=unique');
}
switch ($c){
case 'nounique':
StatController::viewNoUnique();
break;
case 'unique':
StatController::viewUnique();
break;
}
$controller->redirect();