forked from joomla/Component-Builder
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:
parent
12600431ca
commit
bb414c980c
@ -143,13 +143,13 @@ TODO
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 6th January, 2021
|
+ *Last Build*: 15th January, 2021
|
||||||
+ *Version*: 2.12.5
|
+ *Version*: 2.12.5
|
||||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
+ *Line count*: **291576**
|
+ *Line count*: **291684**
|
||||||
+ *Field count*: **1611**
|
+ *Field count*: **1611**
|
||||||
+ *File count*: **1935**
|
+ *File count*: **1934**
|
||||||
+ *Folder count*: **322**
|
+ *Folder count*: **322**
|
||||||
|
|
||||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||||
|
@ -143,13 +143,13 @@ TODO
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
|
||||||
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
+ *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder)
|
||||||
+ *First Build*: 30th April, 2015
|
+ *First Build*: 30th April, 2015
|
||||||
+ *Last Build*: 6th January, 2021
|
+ *Last Build*: 15th January, 2021
|
||||||
+ *Version*: 2.12.5
|
+ *Version*: 2.12.5
|
||||||
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
|
||||||
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
|
||||||
+ *Line count*: **291576**
|
+ *Line count*: **291684**
|
||||||
+ *Field count*: **1611**
|
+ *Field count*: **1611**
|
||||||
+ *File count*: **1935**
|
+ *File count*: **1934**
|
||||||
+ *Folder count*: **322**
|
+ *Folder count*: **322**
|
||||||
|
|
||||||
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
> This **component** was build with a [Joomla](https://extensions.joomla.org/extension/component-builder/) [Automated Component Builder](http://joomlacomponentbuilder.com).
|
||||||
|
@ -857,9 +857,9 @@
|
|||||||
min="1"
|
min="1"
|
||||||
showon="development_method:2">
|
showon="development_method:2">
|
||||||
<form hidden="true" name="list_expansion_modal" repeat="true">
|
<form hidden="true" name="list_expansion_modal" repeat="true">
|
||||||
<!-- Component Field. Type: Component. (custom) -->
|
<!-- Component Field. Type: Joomlacomponent. (custom) -->
|
||||||
<field
|
<field
|
||||||
type="component"
|
type="joomlacomponent"
|
||||||
name="component"
|
name="component"
|
||||||
label="COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL"
|
label="COM_COMPONENTBUILDER_CONFIG_COMPONENT_LABEL"
|
||||||
class="list_class"
|
class="list_class"
|
||||||
|
@ -3669,7 +3669,7 @@ abstract class ComponentbuilderHelper
|
|||||||
protected static $fieldGroups = array(
|
protected static $fieldGroups = array(
|
||||||
'default' => array(
|
'default' => array(
|
||||||
'accesslevel', 'cachehandler', 'calendar', 'captcha', 'category', 'checkbox', 'checkboxes', 'chromestyle',
|
'accesslevel', 'cachehandler', 'calendar', 'captcha', 'category', 'checkbox', 'checkboxes', 'chromestyle',
|
||||||
'color', 'combo', 'componentlayout', 'contentlanguage', 'contenttype', 'databaseconnection', // 'components', (TODO) must be added but still in use as a custom field in JCB
|
'color', 'combo', 'componentlayout', 'contentlanguage', 'contenttype', 'databaseconnection', 'components',
|
||||||
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
|
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
|
||||||
'integer', 'language', 'list', 'media', 'menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
|
'integer', 'language', 'list', 'media', 'menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
|
||||||
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules',
|
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules',
|
||||||
@ -3681,14 +3681,14 @@ abstract class ComponentbuilderHelper
|
|||||||
'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
||||||
),
|
),
|
||||||
'option' => array(
|
'option' => array(
|
||||||
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', // 'components', (TODO) must be added but still in use as a custom field in JCB
|
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', 'components',
|
||||||
'filelist', 'folderlist', 'imagelist', 'list', 'plugins', 'predefinedlist', 'radio', 'sessionhandler', 'sql', 'groupedlist'
|
'filelist', 'folderlist', 'imagelist', 'list', 'plugins', 'predefinedlist', 'radio', 'sessionhandler', 'sql', 'groupedlist'
|
||||||
),
|
),
|
||||||
'text' => array(
|
'text' => array(
|
||||||
'calendar', 'color', 'editor', 'email', 'number', 'password', 'range', 'tel', 'text', 'textarea', 'url'
|
'calendar', 'color', 'editor', 'email', 'number', 'password', 'range', 'tel', 'text', 'textarea', 'url'
|
||||||
),
|
),
|
||||||
'list' => array(
|
'list' => array(
|
||||||
'checkbox', 'checkboxes', 'list', 'radio', 'groupedlist'
|
'checkbox', 'checkboxes', 'list', 'radio', 'groupedlist', 'combo'
|
||||||
),
|
),
|
||||||
'dynamic' => array(
|
'dynamic' => array(
|
||||||
'category', 'file', 'filelist', 'folderlist', 'headertag', 'imagelist', 'integer', 'media', 'meter', 'rules', 'tag', 'timezone', 'user'
|
'category', 'file', 'filelist', 'folderlist', 'headertag', 'imagelist', 'integer', 'media', 'meter', 'rules', 'tag', 'timezone', 'user'
|
||||||
|
@ -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');
|
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
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $type = 'component';
|
public $type = 'joomlacomponent';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override to add new button
|
* Override to add new button
|
@ -37,18 +37,18 @@ class JFormFieldJoomlacomponents extends JFormFieldList
|
|||||||
{
|
{
|
||||||
$db = JFactory::getDBO();
|
$db = JFactory::getDBO();
|
||||||
$query = $db->getQuery(true);
|
$query = $db->getQuery(true);
|
||||||
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','joomla_component_system_name')));
|
$query->select($db->quoteName(array('a.id','a.system_name'),array('id','components_system_name')));
|
||||||
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
|
$query->from($db->quoteName('#__componentbuilder_joomla_component', 'a'));
|
||||||
|
$query->where($db->quoteName('a.published') . ' >= 1');
|
||||||
$query->order('a.system_name ASC');
|
$query->order('a.system_name ASC');
|
||||||
$db->setQuery((string)$query);
|
$db->setQuery((string)$query);
|
||||||
$items = $db->loadObjectList();
|
$items = $db->loadObjectList();
|
||||||
$options = array();
|
$options = array();
|
||||||
if ($items)
|
if ($items)
|
||||||
{
|
{
|
||||||
$options[] = JHtml::_('select.option', '', 'Select an option');
|
|
||||||
foreach($items as $item)
|
foreach($items as $item)
|
||||||
{
|
{
|
||||||
$options[] = JHtml::_('select.option', $item->id, $item->joomla_component_system_name);
|
$options[] = JHtml::_('select.option', $item->id, $item->components_system_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ class JFormFieldJoomlacomponentsfilterauthor extends JFormFieldList
|
|||||||
|
|
||||||
$results = $db->loadColumn();
|
$results = $db->loadColumn();
|
||||||
$_filter = array();
|
$_filter = array();
|
||||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR') . ' -');
|
|
||||||
|
|
||||||
if ($results)
|
if ($results)
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,6 @@ class JFormFieldJoomlacomponentsfiltercompanyname extends JFormFieldList
|
|||||||
|
|
||||||
$results = $db->loadColumn();
|
$results = $db->loadColumn();
|
||||||
$_filter = array();
|
$_filter = array();
|
||||||
$_filter[] = JHtml::_('select.option', '', '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME') . ' -');
|
|
||||||
|
|
||||||
if ($results)
|
if ($results)
|
||||||
{
|
{
|
||||||
|
@ -93,9 +93,9 @@
|
|||||||
default="componentbuilder custom_code"
|
default="componentbuilder custom_code"
|
||||||
/>
|
/>
|
||||||
<!-- Dynamic Fields. -->
|
<!-- Dynamic Fields. -->
|
||||||
<!-- Component Field. Type: Component. (custom) -->
|
<!-- Component Field. Type: Joomlacomponent. (custom) -->
|
||||||
<field
|
<field
|
||||||
type="component"
|
type="joomlacomponent"
|
||||||
name="component"
|
name="component"
|
||||||
label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL"
|
label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL"
|
||||||
class="list_class"
|
class="list_class"
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
onchange="this.form.submit();"
|
onchange="this.form.submit();"
|
||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
type="component"
|
type="joomlacomponent"
|
||||||
name="component"
|
name="component"
|
||||||
label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL"
|
label="COM_COMPONENTBUILDER_CUSTOM_CODE_COMPONENT_LABEL"
|
||||||
multiple="false"
|
multiple="false"
|
||||||
|
@ -34,14 +34,16 @@
|
|||||||
type="joomlacomponentsfiltercompanyname"
|
type="joomlacomponentsfiltercompanyname"
|
||||||
name="companyname"
|
name="companyname"
|
||||||
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_LABEL"
|
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_COMPANYNAME_LABEL"
|
||||||
multiple="false"
|
class="multipleJoomlacomponentsfiltercompanyname"
|
||||||
|
multiple="true"
|
||||||
onchange="this.form.submit();"
|
onchange="this.form.submit();"
|
||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
type="joomlacomponentsfilterauthor"
|
type="joomlacomponentsfilterauthor"
|
||||||
name="author"
|
name="author"
|
||||||
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL"
|
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_AUTHOR_LABEL"
|
||||||
multiple="false"
|
class="multipleJoomlacomponentsfilterauthor"
|
||||||
|
multiple="true"
|
||||||
onchange="this.form.submit();"
|
onchange="this.form.submit();"
|
||||||
/>
|
/>
|
||||||
<input type="hidden" name="form_submited" value="1"/>
|
<input type="hidden" name="form_submited" value="1"/>
|
||||||
|
@ -34,7 +34,8 @@
|
|||||||
type="maingets"
|
type="maingets"
|
||||||
name="main_get"
|
name="main_get"
|
||||||
label="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL"
|
label="COM_COMPONENTBUILDER_SITE_VIEW_MAIN_GET_LABEL"
|
||||||
multiple="false"
|
class="multipleMaingets"
|
||||||
|
multiple="true"
|
||||||
onchange="this.form.submit();"
|
onchange="this.form.submit();"
|
||||||
/>
|
/>
|
||||||
<field
|
<field
|
||||||
|
@ -127,9 +127,9 @@
|
|||||||
default="0"
|
default="0"
|
||||||
button="true"
|
button="true"
|
||||||
/>
|
/>
|
||||||
<!-- Components Field. Type: Components. (custom) -->
|
<!-- Components Field. Type: Joomlacomponents. (custom) -->
|
||||||
<field
|
<field
|
||||||
type="components"
|
type="joomlacomponents"
|
||||||
name="components"
|
name="components"
|
||||||
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_COMPONENTS_LABEL"
|
label="COM_COMPONENTBUILDER_LANGUAGE_TRANSLATION_COMPONENTS_LABEL"
|
||||||
class="list_class span12"
|
class="list_class span12"
|
||||||
|
@ -2284,6 +2284,29 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
|||||||
{
|
{
|
||||||
$query->where('a.companyname = ' . $db->quote($db->escape($_companyname)));
|
$query->where('a.companyname = ' . $db->quote($db->escape($_companyname)));
|
||||||
}
|
}
|
||||||
|
elseif (ComponentbuilderHelper::checkArray($_companyname))
|
||||||
|
{
|
||||||
|
// Secure the array for the query
|
||||||
|
$_companyname = array_map( function ($val) use(&$db) {
|
||||||
|
if (is_numeric($val))
|
||||||
|
{
|
||||||
|
if (is_float($val))
|
||||||
|
{
|
||||||
|
return (float) $val;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return (int) $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (ComponentbuilderHelper::checkString($val))
|
||||||
|
{
|
||||||
|
return $db->quote($db->escape($val));
|
||||||
|
}
|
||||||
|
}, $_companyname);
|
||||||
|
// Filter by the Companyname Array.
|
||||||
|
$query->where('a.companyname IN (' . implode(',', $_companyname) . ')');
|
||||||
|
}
|
||||||
// Filter by Author.
|
// Filter by Author.
|
||||||
$_author = $this->getState('filter.author');
|
$_author = $this->getState('filter.author');
|
||||||
if (is_numeric($_author))
|
if (is_numeric($_author))
|
||||||
@ -2301,6 +2324,29 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
|||||||
{
|
{
|
||||||
$query->where('a.author = ' . $db->quote($db->escape($_author)));
|
$query->where('a.author = ' . $db->quote($db->escape($_author)));
|
||||||
}
|
}
|
||||||
|
elseif (ComponentbuilderHelper::checkArray($_author))
|
||||||
|
{
|
||||||
|
// Secure the array for the query
|
||||||
|
$_author = array_map( function ($val) use(&$db) {
|
||||||
|
if (is_numeric($val))
|
||||||
|
{
|
||||||
|
if (is_float($val))
|
||||||
|
{
|
||||||
|
return (float) $val;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return (int) $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (ComponentbuilderHelper::checkString($val))
|
||||||
|
{
|
||||||
|
return $db->quote($db->escape($val));
|
||||||
|
}
|
||||||
|
}, $_author);
|
||||||
|
// Filter by the Author Array.
|
||||||
|
$query->where('a.author IN (' . implode(',', $_author) . ')');
|
||||||
|
}
|
||||||
|
|
||||||
// Add the list ordering clause.
|
// Add the list ordering clause.
|
||||||
$orderCol = $this->state->get('list.ordering', 'a.id');
|
$orderCol = $this->state->get('list.ordering', 'a.id');
|
||||||
@ -2526,8 +2572,30 @@ class ComponentbuilderModelJoomla_components extends JModelList
|
|||||||
$id .= ':' . $this->getState('filter.ordering');
|
$id .= ':' . $this->getState('filter.ordering');
|
||||||
$id .= ':' . $this->getState('filter.created_by');
|
$id .= ':' . $this->getState('filter.created_by');
|
||||||
$id .= ':' . $this->getState('filter.modified_by');
|
$id .= ':' . $this->getState('filter.modified_by');
|
||||||
$id .= ':' . $this->getState('filter.companyname');
|
// Check if the value is an array
|
||||||
$id .= ':' . $this->getState('filter.author');
|
$_companyname = $this->getState('filter.companyname');
|
||||||
|
if (ComponentbuilderHelper::checkArray($_companyname))
|
||||||
|
{
|
||||||
|
$id .= ':' . implode(':', $_companyname);
|
||||||
|
}
|
||||||
|
// Check if this is only an number or string
|
||||||
|
elseif (is_numeric($_companyname)
|
||||||
|
|| ComponentbuilderHelper::checkString($_companyname))
|
||||||
|
{
|
||||||
|
$id .= ':' . $_companyname;
|
||||||
|
}
|
||||||
|
// Check if the value is an array
|
||||||
|
$_author = $this->getState('filter.author');
|
||||||
|
if (ComponentbuilderHelper::checkArray($_author))
|
||||||
|
{
|
||||||
|
$id .= ':' . implode(':', $_author);
|
||||||
|
}
|
||||||
|
// Check if this is only an number or string
|
||||||
|
elseif (is_numeric($_author)
|
||||||
|
|| ComponentbuilderHelper::checkString($_author))
|
||||||
|
{
|
||||||
|
$id .= ':' . $_author;
|
||||||
|
}
|
||||||
$id .= ':' . $this->getState('filter.system_name');
|
$id .= ':' . $this->getState('filter.system_name');
|
||||||
$id .= ':' . $this->getState('filter.name_code');
|
$id .= ':' . $this->getState('filter.name_code');
|
||||||
$id .= ':' . $this->getState('filter.short_description');
|
$id .= ':' . $this->getState('filter.short_description');
|
||||||
|
@ -317,6 +317,29 @@ class ComponentbuilderModelSite_views extends JModelList
|
|||||||
{
|
{
|
||||||
$query->where('a.main_get = ' . $db->quote($db->escape($_main_get)));
|
$query->where('a.main_get = ' . $db->quote($db->escape($_main_get)));
|
||||||
}
|
}
|
||||||
|
elseif (ComponentbuilderHelper::checkArray($_main_get))
|
||||||
|
{
|
||||||
|
// Secure the array for the query
|
||||||
|
$_main_get = array_map( function ($val) use(&$db) {
|
||||||
|
if (is_numeric($val))
|
||||||
|
{
|
||||||
|
if (is_float($val))
|
||||||
|
{
|
||||||
|
return (float) $val;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return (int) $val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
elseif (ComponentbuilderHelper::checkString($val))
|
||||||
|
{
|
||||||
|
return $db->quote($db->escape($val));
|
||||||
|
}
|
||||||
|
}, $_main_get);
|
||||||
|
// Filter by the Main_get Array.
|
||||||
|
$query->where('a.main_get IN (' . implode(',', $_main_get) . ')');
|
||||||
|
}
|
||||||
// Filter by Add_php_ajax.
|
// Filter by Add_php_ajax.
|
||||||
$_add_php_ajax = $this->getState('filter.add_php_ajax');
|
$_add_php_ajax = $this->getState('filter.add_php_ajax');
|
||||||
if (is_numeric($_add_php_ajax))
|
if (is_numeric($_add_php_ajax))
|
||||||
@ -536,7 +559,18 @@ class ComponentbuilderModelSite_views extends JModelList
|
|||||||
$id .= ':' . $this->getState('filter.ordering');
|
$id .= ':' . $this->getState('filter.ordering');
|
||||||
$id .= ':' . $this->getState('filter.created_by');
|
$id .= ':' . $this->getState('filter.created_by');
|
||||||
$id .= ':' . $this->getState('filter.modified_by');
|
$id .= ':' . $this->getState('filter.modified_by');
|
||||||
$id .= ':' . $this->getState('filter.main_get');
|
// Check if the value is an array
|
||||||
|
$_main_get = $this->getState('filter.main_get');
|
||||||
|
if (ComponentbuilderHelper::checkArray($_main_get))
|
||||||
|
{
|
||||||
|
$id .= ':' . implode(':', $_main_get);
|
||||||
|
}
|
||||||
|
// Check if this is only an number or string
|
||||||
|
elseif (is_numeric($_main_get)
|
||||||
|
|| ComponentbuilderHelper::checkString($_main_get))
|
||||||
|
{
|
||||||
|
$id .= ':' . $_main_get;
|
||||||
|
}
|
||||||
$id .= ':' . $this->getState('filter.add_php_ajax');
|
$id .= ':' . $this->getState('filter.add_php_ajax');
|
||||||
$id .= ':' . $this->getState('filter.add_custom_button');
|
$id .= ':' . $this->getState('filter.add_custom_button');
|
||||||
$id .= ':' . $this->getState('filter.system_name');
|
$id .= ':' . $this->getState('filter.system_name');
|
||||||
|
File diff suppressed because one or more lines are too long
@ -187,7 +187,7 @@ class ComponentbuilderViewCustom_codes extends JViewLegacy
|
|||||||
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
if ($this->canBatch && $this->canCreate && $this->canEdit)
|
||||||
{
|
{
|
||||||
// Set Component System Name Selection
|
// Set Component System Name Selection
|
||||||
$this->componentSystem_nameOptions = JFormHelper::loadFieldType('Component')->options;
|
$this->componentSystem_nameOptions = JFormHelper::loadFieldType('Joomlacomponent')->options;
|
||||||
// We do some sanitation for Component System Name filter
|
// We do some sanitation for Component System Name filter
|
||||||
if (ComponentbuilderHelper::checkArray($this->componentSystem_nameOptions) &&
|
if (ComponentbuilderHelper::checkArray($this->componentSystem_nameOptions) &&
|
||||||
isset($this->componentSystem_nameOptions[0]->value) &&
|
isset($this->componentSystem_nameOptions[0]->value) &&
|
||||||
|
@ -15,6 +15,8 @@ defined('_JEXEC') or die('Restricted access');
|
|||||||
JHtml::_('behavior.tooltip');
|
JHtml::_('behavior.tooltip');
|
||||||
JHtml::_('behavior.multiselect');
|
JHtml::_('behavior.multiselect');
|
||||||
JHtml::_('dropdown.init');
|
JHtml::_('dropdown.init');
|
||||||
|
JHtml::_('formbehavior.chosen', '.multipleJoomlacomponentsfiltercompanyname', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_COMPANYNAME') . ' -'));
|
||||||
|
JHtml::_('formbehavior.chosen', '.multipleJoomlacomponentsfilterauthor', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_AUTHOR') . ' -'));
|
||||||
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -'));
|
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -'));
|
||||||
JHtml::_('formbehavior.chosen', 'select');
|
JHtml::_('formbehavior.chosen', 'select');
|
||||||
if ($this->saveOrder)
|
if ($this->saveOrder)
|
||||||
|
@ -15,6 +15,7 @@ defined('_JEXEC') or die('Restricted access');
|
|||||||
JHtml::_('behavior.tooltip');
|
JHtml::_('behavior.tooltip');
|
||||||
JHtml::_('behavior.multiselect');
|
JHtml::_('behavior.multiselect');
|
||||||
JHtml::_('dropdown.init');
|
JHtml::_('dropdown.init');
|
||||||
|
JHtml::_('formbehavior.chosen', '.multipleMaingets', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_MAIN_GET') . ' -'));
|
||||||
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -'));
|
JHtml::_('formbehavior.chosen', '.multipleAccessLevels', null, array('placeholder_text_multiple' => '- ' . JText::_('COM_COMPONENTBUILDER_FILTER_SELECT_ACCESS') . ' -'));
|
||||||
JHtml::_('formbehavior.chosen', 'select');
|
JHtml::_('formbehavior.chosen', 'select');
|
||||||
if ($this->saveOrder)
|
if ($this->saveOrder)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="component" version="3.2" method="upgrade">
|
<extension type="component" version="3.2" method="upgrade">
|
||||||
<name>COM_COMPONENTBUILDER</name>
|
<name>COM_COMPONENTBUILDER</name>
|
||||||
<creationDate>6th January, 2021</creationDate>
|
<creationDate>15th January, 2021</creationDate>
|
||||||
<author>Llewellyn van der Merwe</author>
|
<author>Llewellyn van der Merwe</author>
|
||||||
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
|
||||||
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
<authorUrl>http://www.joomlacomponentbuilder.com</authorUrl>
|
||||||
|
@ -3666,7 +3666,7 @@ abstract class ComponentbuilderHelper
|
|||||||
protected static $fieldGroups = array(
|
protected static $fieldGroups = array(
|
||||||
'default' => array(
|
'default' => array(
|
||||||
'accesslevel', 'cachehandler', 'calendar', 'captcha', 'category', 'checkbox', 'checkboxes', 'chromestyle',
|
'accesslevel', 'cachehandler', 'calendar', 'captcha', 'category', 'checkbox', 'checkboxes', 'chromestyle',
|
||||||
'color', 'combo', 'componentlayout', 'contentlanguage', 'contenttype', 'databaseconnection', // 'components', (TODO) must be added but still in use as a custom field in JCB
|
'color', 'combo', 'componentlayout', 'contentlanguage', 'contenttype', 'databaseconnection', 'components',
|
||||||
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
|
'editor', 'editors', 'email', 'file', 'file', 'filelist', 'folderlist', 'groupedlist', 'headertag', 'helpsite', 'hidden', 'imagelist',
|
||||||
'integer', 'language', 'list', 'media', 'menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
|
'integer', 'language', 'list', 'media', 'menu', 'menuitem', 'meter', 'modulelayout', 'moduleorder', 'moduleposition',
|
||||||
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules',
|
'moduletag', 'note', 'number', 'password', 'plugins', 'predefinedlist', 'radio', 'range', 'repeatable', 'rules',
|
||||||
@ -3678,14 +3678,14 @@ abstract class ComponentbuilderHelper
|
|||||||
'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
'moduleorder', 'moduletag', 'number', 'password', 'range', 'rules', 'tag', 'tel', 'text', 'textarea', 'timezone', 'url', 'user', 'usergroup'
|
||||||
),
|
),
|
||||||
'option' => array(
|
'option' => array(
|
||||||
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', // 'components', (TODO) must be added but still in use as a custom field in JCB
|
'accesslevel', 'category', 'checkboxes', 'combo', 'contentlanguage', 'databaseconnection', 'components',
|
||||||
'filelist', 'folderlist', 'imagelist', 'list', 'plugins', 'predefinedlist', 'radio', 'sessionhandler', 'sql', 'groupedlist'
|
'filelist', 'folderlist', 'imagelist', 'list', 'plugins', 'predefinedlist', 'radio', 'sessionhandler', 'sql', 'groupedlist'
|
||||||
),
|
),
|
||||||
'text' => array(
|
'text' => array(
|
||||||
'calendar', 'color', 'editor', 'email', 'number', 'password', 'range', 'tel', 'text', 'textarea', 'url'
|
'calendar', 'color', 'editor', 'email', 'number', 'password', 'range', 'tel', 'text', 'textarea', 'url'
|
||||||
),
|
),
|
||||||
'list' => array(
|
'list' => array(
|
||||||
'checkbox', 'checkboxes', 'list', 'radio', 'groupedlist'
|
'checkbox', 'checkboxes', 'list', 'radio', 'groupedlist', 'combo'
|
||||||
),
|
),
|
||||||
'dynamic' => array(
|
'dynamic' => array(
|
||||||
'category', 'file', 'filelist', 'folderlist', 'headertag', 'imagelist', 'integer', 'media', 'meter', 'rules', 'tag', 'timezone', 'user'
|
'category', 'file', 'filelist', 'folderlist', 'headertag', 'imagelist', 'integer', 'media', 'meter', 'rules', 'tag', 'timezone', 'user'
|
||||||
|
Loading…
Reference in New Issue
Block a user