/**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     require_once JPATH_COMPONENT . '/helpers/j2xml.php';
     $canDo = J2XMLHelper::getActions();
     $doc = JFactory::getDocument();
     $icon_48_websites = " .icon-48-websites {background:url(../media/com_j2xml/images/icon-48-websites.png) no-repeat; }";
     $doc->addStyleDeclaration($icon_48_websites);
     JToolBarHelper::title(JText::_('COM_J2XML_MANAGER_WEBSITES'), 'websites.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('website.add');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('website.edit');
     }
     if ($canDo->get('core.edit.state')) {
         JToolBarHelper::divider();
         JToolBarHelper::publish('websites.publish', 'JTOOLBAR_PUBLISH', true);
         JToolBarHelper::unpublish('websites.unpublish', 'JTOOLBAR_UNPUBLISH', true);
         JToolBarHelper::divider();
         JToolBarHelper::checkin('websites.checkin');
     }
     if ($this->state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'websites.delete', 'JTOOLBAR_EMPTY_TRASH');
     } elseif ($canDo->get('core.edit.state')) {
         JToolBarHelper::trash('websites.trash');
     }
 }
Example #2
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = J2XMLHelper::getActions();
     $doc = JFactory::getDocument();
     $icon_48_websites = " .icon-48-websites {background:url(../media/com_j2xml/images/icon-48-websites.png) no-repeat; }";
     $doc->addStyleDeclaration($icon_48_websites);
     JToolBarHelper::title($isNew ? JText::_('COM_J2XML_MANAGER_WEBSITE_NEW') : JText::_('COM_J2XML_MANAGER_WEBSITE_EDIT'), 'websites.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('website.apply');
         JToolBarHelper::save('website.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('website.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('website.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('website.cancel');
     } else {
         JToolBarHelper::cancel('website.cancel', 'JTOOLBAR_CLOSE');
     }
 }
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = J2XMLHelper::getActions();
     $doc = JFactory::getDocument();
     $icon_48_websites = " .icon-48-websites {background:url(../media/com_j2xml/images/icon-48-websites.png) no-repeat; }";
     $doc->addStyleDeclaration($icon_48_websites);
     JToolBarHelper::title($isNew ? JText::_('COM_J2XML_MANAGER_WEBSITE_NEW') : JText::_('COM_J2XML_MANAGER_WEBSITE_EDIT'), 'websites.png');
     // If not checked out, can save the item.
     if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) {
         JToolBarHelper::apply('website.apply');
         JToolBarHelper::save('website.save');
     }
     if (!$checkedOut && $canDo->get('core.create')) {
         JToolBarHelper::save2new('website.save2new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::save2copy('website.save2copy');
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('website.cancel');
     } else {
         JToolBarHelper::cancel('website.cancel', 'JTOOLBAR_CLOSE');
     }
     jimport('eshiol.core.send');
     $option = JRequest::getVar('option');
     $toolbar = JToolBar::getInstance('toolbar');
     $control = substr($option, 4);
     $url = new stdClass();
     $url->title = 'pippo';
     $url->url = 'http://localhost/j341';
     $toolbar->appendButton('Send', 'j2xml_send', 'PLG_SYSTEM_J2XML_BUTTON_SEND', "j2xml.{$control}.send", $url);
 }
Example #4
0
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$params = isset($this->state->params) ? $this->state->params : new JObject();
?>
<form action="<?php 
echo JRoute::_('index.php?option=com_j2xml&view=websites');
?>
" method="post" name="adminForm" id="adminForm">

<?php 
if (version_compare(JPlatform::RELEASE, '12', 'ge')) {
    JHtml::_('bootstrap.tooltip');
    JHtml::_('formbehavior.chosen', 'select');
    $doc = JFactory::getDocument();
    $doc->addStyleSheet('../media/com_j2xml/css/j2xml.css', 'text/css');
    $canDo = J2XMLHelper::getActions();
    $canCreate = $canDo->get('core.create');
    $canEdit = $canDo->get('core.edit');
    $sortFields = $this->getSortFields();
    $lang = JFactory::getLanguage();
    ?>
<script type="text/javascript">
	Joomla.orderTable = function()
	{
		table = document.getElementById("sortTable");
		direction = document.getElementById("directionTable");
		order = table.options[table.selectedIndex].value;
		if (order != '<?php 
    echo $listOrder;
    ?>
')