fetchIconClass($name); $doTask = $this->_getCommand($text, $task, $list, $hideMenu); $html = "\n"; $html .= "\n"; $html .= "\n"; $html .= "$i18n_text\n"; $html .= "\n"; return $html; } /** * Get the button CSS Id * * @access public * @return string Button CSS Id * @since 1.5 */ function fetchId( $type='Standard', $name = '', $text = '', $task = '', $list = true, $hideMenu = false ) { return $this->_parent->_name.'-'.$name; } /** * Get the JavaScript command for the button * * @access private * @param string $name The task name as seen by the user * @param string $task The task used by the application * @param ??? $list * @param boolean $hide * @return string JavaScript command string * @since 1.5 */ function _getCommand($name, $task, $list, $hide) { $todo = JString::strtolower(JText::_( $name )); $message = JText::sprintf( 'Please make a selection from the list to', $todo ); $message = addslashes($message); $hidecode = $hide ? 'hideMainMenu();' : ''; if ($list) { $cmd = "javascript:if(document.adminForm.boxchecked.value==0){alert('$message');}else{ $hidecode submitbutton('$task')}"; } else { $cmd = "javascript:$hidecode submitbutton('$task')"; } return $cmd; } }