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