本文整理汇总了PHP中JToolBar::appendButton方法的典型用法代码示例。如果您正苦于以下问题:PHP JToolBar::appendButton方法的具体用法?PHP JToolBar::appendButton怎么用?PHP JToolBar::appendButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JToolBar
的用法示例。
在下文中一共展示了JToolBar::appendButton方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getToolbar
public static function getToolbar()
{
$bar = new JToolBar('toolbar');
$bar->appendButton('Standard', 'AG_apply', 'COM_ADMIRORGALLERY_APPLY_DESC', 'AG_apply', false);
$bar->appendButton('Standard', 'AG_reset', 'COM_ADMIRORGALLERY_RESET_DESC', 'AG_reset', false);
return $bar->render();
}
示例2: getToolbar
function getToolbar()
{
$bar = new JToolBar('toolbar');
// The first parameter is the button type. have a look a the JToolbar or JButton docs for a full list of these.
// The second parameter is the class to apply to the button ( this will help us to apply an image to it as in the backend )
// The third parameter is the text to display on the button.
// The fourth is the task to set. When the button is pressed the javascript submitButton function is called and the hidden field 'task' is set to this value. We will see this later in our template file.
// The fifth states whether a selection must be made from an admin list before continuing.
$bar->appendButton('Standard', 'AG_apply', JText::_('AG_APPLY DESC'), 'AG_apply', false);
$bar->appendButton('Standard', 'AG_reset', JText::_('AG_RESET DESC'), 'AG_reset', false);
return $bar->render();
}
示例3: getToolbar
static function getToolbar($vmView)
{
// add required stylesheets from admin template
$document = JFactory::getDocument();
$document->addStyleSheet('administrator/templates/system/css/system.css');
//now we add the necessary stylesheets from the administrator template
//in this case i make reference to the bluestork default administrator template in joomla 1.6
$document->addCustomTag('<link href="administrator/templates/bluestork/css/template.css" rel="stylesheet" type="text/css" />' . "\n\n" . '<!--[if IE 7]>' . "\n" . '<link href="administrator/templates/bluestork/css/ie7.css" rel="stylesheet" type="text/css" />' . "\n" . '<![endif]-->' . "\n" . '<!--[if gte IE 8]>' . "\n\n" . '<link href="administrator/templates/bluestork/css/ie8.css" rel="stylesheet" type="text/css" />' . "\n" . '<![endif]-->' . "\n");
//load the JToolBar library and create a toolbar
jimport('joomla.html.toolbar');
JToolBarHelper::divider();
$view = JRequest::getCmd('view', JRequest::getCmd('controller', 'virtuemart'));
if ($vmView->canDo->get('core.admin') || $vmView->canDo->get('vm.' . $view . '.edit')) {
JToolBarHelper::save();
JToolBarHelper::apply();
}
JToolBarHelper::cancel();
$bar = new JToolBar('toolbar');
//and make whatever calls you require
$bar->appendButton('Standard', 'save', 'Save', 'save', false);
$bar->appendButton('Separator');
$bar->appendButton('Standard', 'cancel', 'Cancel', 'cancel', false);
//generate the html and return
return $bar->render();
}
示例4: getToolbar
function getToolbar()
{
// add required stylesheets from admin template
$document = JFactory::getDocument();
$document->addStyleSheet('administrator/templates/system/css/system.css');
//now we add the necessary stylesheets from the administrator template
//in this case i make reference to the bluestork default administrator template in joomla 1.6
// $document->addCustomTag(
// '<link href="administrator/templates/bluestork/css/template.css" rel="stylesheet" type="text/css" />'."\n\n".
// '<!--[if IE 7]>'."\n".
// '<link href="administrator/templates/bluestork/css/ie7.css" rel="stylesheet" type="text/css" />'."\n".
// '<![endif]-->'."\n".
// '<!--[if gte IE 8]>'."\n\n".
// '<link href="administrator/templates/bluestork/css/ie8.css" rel="stylesheet" type="text/css" />'."\n".
// '<![endif]-->'."\n".
// '<link rel="stylesheet" href="administrator/templates/bluestork/css/rounded.css" type="text/css" />'."\n"
// );
//load the JToolBar library and create a toolbar
jimport('joomla.html.toolbar');
JToolBarHelper::divider();
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::cancel();
$bar = new JToolBar('toolbar');
//and make whatever calls you require
$bar->appendButton('Standard', 'save', 'Save', 'save', false);
$bar->appendButton('Separator');
$bar->appendButton('Standard', 'cancel', 'Cancel', 'cancel', false);
//generate the html and return
return $bar->render();
}
示例5: setToolbarButtons
function setToolbarButtons()
{
if ($this->_backend) {
$bar = JToolBar::getInstance('toolbar');
switch (true) {
case $this->_task == 'view':
$model = $this->getModel();
if (!$model->hasReply($this->_id)) {
JToolBarHelper::custom('reply', 'reply_ai.gif', 'reply_ai.gif', JText::_('COM_AICONTACTSAFE_REPLY'), false, false);
}
JToolBarHelper::custom('cancel', 'cancel_ai.gif', 'cancel_ai.gif', JText::_('COM_AICONTACTSAFE_CLOSE'), false, false);
break;
case $this->_task == 'reply':
JToolBarHelper::custom('confirmReply', 'apply_ai.png', 'apply_ai.png', JText::_('COM_AICONTACTSAFE_SEND'), false, false);
JToolBarHelper::custom('cancel', 'cancel_ai.gif', 'cancel_ai.gif', JText::_('COM_AICONTACTSAFE_CANCEL'), false, false);
break;
case $this->_task == 'export':
JToolBarHelper::custom('download', 'export_ai.gif', 'export_ai.gif', JText::_('COM_AICONTACTSAFE_DOWNLOAD'), false, false);
JToolBarHelper::custom('cancel', 'cancel_ai.gif', 'cancel_ai.gif', JText::_('COM_AICONTACTSAFE_CLOSE'), false, false);
break;
case $this->_task == 'delete_selected':
JToolBarHelper::custom('confirmDeleteSelected', 'apply_ai.png', 'apply_ai.png', JText::_('COM_AICONTACTSAFE_CONFIRM'), false, false);
JToolBarHelper::custom('cancel', 'cancel_ai.gif', 'cancel_ai.gif', JText::_('COM_AICONTACTSAFE_CANCEL'), false, false);
break;
case $this->_task == 'delete':
JToolBarHelper::custom('confirmDelete', 'apply_ai.png', 'apply_ai.png', JText::_('COM_AICONTACTSAFE_CONFIRM'), true, false);
JToolBarHelper::custom('cancel', 'cancel_ai.gif', 'cancel_ai.gif', JText::_('COM_AICONTACTSAFE_CANCEL'), false, false);
break;
case $this->_task == 'ban_ip':
JToolBarHelper::custom('confirmBanIp', 'apply_ai.png', 'apply_ai.png', JText::_('COM_AICONTACTSAFE_CONFIRM'), true, false);
JToolBarHelper::custom('cancel', 'cancel_ai.gif', 'cancel_ai.gif', JText::_('COM_AICONTACTSAFE_CANCEL'), false, false);
break;
case $this->_task == 'display':
JToolBarHelper::custom('view', 'view_ai.gif', 'view_ai.gif', JText::_('COM_AICONTACTSAFE_VIEW'), true, false);
JToolBarHelper::custom('reply', 'reply_ai.gif', 'reply_ai.gif', JText::_('COM_AICONTACTSAFE_REPLY'), true, false);
JToolBarHelper::custom('export', 'export_ai.gif', 'export_ai.gif', JText::_('COM_AICONTACTSAFE_EXPORT'), false, false);
JToolBarHelper::custom('delete', 'delete_ai.gif', 'delete_ai.gif', JText::_('COM_AICONTACTSAFE_DELETE'), true, false);
JToolBarHelper::custom('delete_selected', 'delete_all_ai.gif', 'delete_all_ai.gif', JText::_('COM_AICONTACTSAFE_DELETE_SELECTED'), true, false);
if ($this->_config_values['activate_ip_ban']) {
JToolBarHelper::custom('ban_ip', 'ban_ip_ai.gif', 'ban_ip_ai.gif', JText::_('COM_AICONTACTSAFE_BAN_IP'), true, false);
}
break;
}
$bar->appendButton('Separator', 'divider');
$bar->appendButton('Popup', 'help', JText::_('COM_AICONTACTSAFE_HELP'), $this->help_url . 'com_aicontactsafe_' . $this->_sTask . '_' . $this->_task, $this->help_width, $this->help_height);
} else {
// load the toolbar class
jimport('joomla.html.toolbar');
$bar = new JToolBar('icon-32');
switch (true) {
case $this->_task == 'view':
$model = $this->getModel();
if (!$model->hasReply($this->_id)) {
$bar->appendButton('Standard', 'reply_ai', JText::_('COM_AICONTACTSAFE_REPLY'), 'reply', false);
}
$bar->appendButton('Standard', 'cancel_ai', JText::_('COM_AICONTACTSAFE_CLOSE'), 'cancel', false);
break;
case $this->_task == 'reply':
$bar->appendButton('Standard', 'apply_ai', JText::_('COM_AICONTACTSAFE_SEND'), 'confirmReply', false);
$bar->appendButton('Standard', 'cancel_ai', JText::_('COM_AICONTACTSAFE_CANCEL'), 'cancel', false);
break;
case $this->_task == 'export':
$bar->appendButton('Standard', 'cancel_ai', JText::_('COM_AICONTACTSAFE_CLOSE'), 'cancel', false);
break;
case $this->_task == 'delete_selected':
$bar->appendButton('Standard', 'apply_ai', JText::_('COM_AICONTACTSAFE_CONFIRM'), 'confirmDeleteSelected', false);
$bar->appendButton('Standard', 'cancel_ai', JText::_('COM_AICONTACTSAFE_CANCEL'), 'cancel', false);
break;
case $this->_task == 'delete':
$bar->appendButton('Standard', 'apply_ai', JText::_('COM_AICONTACTSAFE_CONFIRM'), 'confirmDelete', true);
$bar->appendButton('Standard', 'cancel_ai', JText::_('COM_AICONTACTSAFE_CANCEL'), 'cancel', false);
break;
case $this->_task == 'ban_ip':
$bar->appendButton('Standard', 'apply_ai', JText::_('COM_AICONTACTSAFE_CONFIRM'), 'confirmBanIp', true);
$bar->appendButton('Standard', 'cancel_ai', JText::_('COM_AICONTACTSAFE_CANCEL'), 'cancel', false);
break;
case $this->_task == 'display':
$bar->appendButton('Standard', 'view_ai', JText::_('COM_AICONTACTSAFE_VIEW'), 'view', true);
$bar->appendButton('Standard', 'reply_ai', JText::_('COM_AICONTACTSAFE_REPLY'), 'reply', true);
$bar->appendButton('Standard', 'export_ai', JText::_('COM_AICONTACTSAFE_EXPORT'), 'export', true);
$bar->appendButton('Standard', 'delete_ai', JText::_('COM_AICONTACTSAFE_DELETE'), 'delete', true);
$bar->appendButton('Standard', 'delete_all_ai', JText::_('COM_AICONTACTSAFE_DELETE_SELECTED'), 'delete_selected', true);
if ($this->_config_values['activate_ip_ban']) {
$bar->appendButton('Standard', 'ban_ip_ai', JText::_('COM_AICONTACTSAFE_BAN_IP'), 'ban_ip', true);
}
break;
}
$this->toolbar = $bar->render();
}
}
示例6: viewFile
function viewFile($title, $file)
{
if (!$this->inIFrame) {
return;
}
if (!is_file($file)) {
return;
}
$onclick = 'xajax_jdReadFile($(\'log_id\').value);';
$html = '<a href="javascript:void(0);" onclick="' . $onclick . '" class="toolbar">' . '<span class="icon-32-fix" type="Standard"></span>' . JText::_($title) . '</a>';
parent::appendButton('Custom', $html, 'close');
}