Example #1
0
 /**
  * Setting the toolbar
  */
 protected function addToolBar()
 {
     JToolBarHelper::addNew('extrafield.add');
     JToolBarHelper::editList('extrafield.edit');
     JToolBarHelper::divider();
     JToolBarHelper::title(JText::_('COM_BT_PORTFOLIO_EXTRAFIELDS_MANAGER'), 'article.png');
     JToolBarHelper::publish('extrafields.publish', 'JTOOLBAR_PUBLISH', true);
     JToolBarHelper::unpublish('extrafields.unpublish', 'JTOOLBAR_UNPUBLISH', true);
     JToolBarHelper::divider();
     JToolBarHelper::checkin('extrafields.checkin');
     JToolBarHelper::deleteList('', 'extrafields.delete');
     JToolBarHelper::preferences('com_bt_portfolio');
     $this->sidebar = '';
     Bt_portfolioHelper::addSubmenu(JRequest::getCmd('view', 'cpanel'));
     //added since 2.0 for j3.0
     if (!$this->legacy) {
         JHtmlSidebar::setAction('index.php?option=com_bt_portfolio&view=extrafields');
         JHtmlSidebar::addFilter(JText::_('JOPTION_SELECT_PUBLISHED'), 'filter_published', JHtml::_('select.options', Bt_portfolioHelper::getPublishedOptions(), 'value', 'text', $this->state->get('filter.published'), true));
         JHtmlSidebar::addFilter(JText::_('COM_BT_PORTFOLIO_SELECT_TYPE'), 'filter_type', JHtml::_('select.options', Bt_portfolioHelper::getTypeOptions(), 'value', 'text', $this->state->get('filter.type'), true));
         $this->sidebar = JHtmlSidebar::render();
     }
 }
Example #2
0
 /**
  * Method to get a list of options for a list input.
  *
  * @return	array		An array of JHtml options.
  */
 protected function getOptions()
 {
     $options = Bt_portfolioHelper::getTypeOptions();
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
Example #3
0
 * @support		Forum - http://bowthemes.com/forum/
 * @copyright	Copyright (C) 2012 Bowthemes. All rights reserved.
 * @license		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted Access');
// load tooltip behavior
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.multiselect');
$user = JFactory::getUser();
$userId = $user->get('id');
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$saveOrder = $listOrder == 'a.ordering';
$types = Bt_portfolioHelper::getTypeOptions();
?>
<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;
?>
') {
			dirn = 'asc';
		} else {
			dirn = direction.options[direction.selectedIndex].value;
		}
		Joomla.tableOrdering(order, dirn, '');