Removes the custom component field from JCB. Made some filters to be multiple selection in site & component list view. Adds the combo field more correctly to JCB.
This commit is contained in:
@ -1,57 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Joomla.Component.Builder
|
||||
*
|
||||
* @created 30th April, 2015
|
||||
* @author Llewellyn van der Merwe <http://www.joomlacomponentbuilder.com>
|
||||
* @github Joomla Component Builder <https://github.com/vdm-io/Joomla-Component-Builder>
|
||||
* @copyright Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import the list field type
|
||||
jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Components Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldComponents extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The components field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'components';
|
||||
|
||||
/**
|
||||
* Method to get a list of options for a list input.
|
||||
*
|
||||
* @return array An array of JHtml options.
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','components_system_name')));
|
||||
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->order('a.system_name ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->components_system_name);
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
@ -17,16 +17,16 @@ jimport('joomla.form.helper');
|
||||
JFormHelper::loadFieldClass('list');
|
||||
|
||||
/**
|
||||
* Component Form Field class for the Componentbuilder component
|
||||
* Joomlacomponent Form Field class for the Componentbuilder component
|
||||
*/
|
||||
class JFormFieldComponent extends JFormFieldList
|
||||
class JFormFieldJoomlacomponent extends JFormFieldList
|
||||
{
|
||||
/**
|
||||
* The component field type.
|
||||
* The joomlacomponent field type.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $type = 'component';
|
||||
public $type = 'joomlacomponent';
|
||||
|
||||
/**
|
||||
* Override to add new button
|
@ -35,23 +35,23 @@ class JFormFieldJoomlacomponents extends JFormFieldList
|
||||
*/
|
||||
protected function getOptions()
|
||||
{
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','joomla_component_system_name')));
|
||||
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
|
||||
$query->order('a.system_name ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->joomla_component_system_name);
|
||||
}
|
||||
}
|
||||
$db = JFactory::getDBO();
|
||||
$query = $db->getQuery(true);
|
||||
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','components_system_name')));
|
||||
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
|
||||
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||
$query->order('a.system_name ASC');
|
||||
$db->setQuery((string)$query);
|
||||
$items = $db->loadObjectList();
|
||||
$options = array();
|
||||
if ($items)
|
||||
{
|
||||
foreach($items as $item)
|
||||
{
|
||||
$options[] = JHtml::_('select.option', $item->id, $item->components_system_name);
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ class JFormFieldJoomlacomponentsfilterauthor extends JFormFieldList
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
|
@ -51,7 +51,6 @@ class JFormFieldJoomlacomponentsfiltercompanyname extends JFormFieldList
|
||||
|
||||
$results = $db->loadColumn();
|
||||
$_filter = array();
|
||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME') . ' -');
|
||||
|
||||
if ($results)
|
||||
{
|
||||
|
Reference in New Issue
Block a user