Release of v3.2.4-alpha4

Fix database default fields to allow NULL. #1169. Fix the power list field to allow search. #1167. Remove Demo component from JCB v3 and added Hello Word component as demo in JCB v3.
This commit is contained in:
2024-09-18 04:38:53 +02:00
parent 6c2f52f59f
commit 5a1ad16c9e
64 changed files with 3954 additions and 1375 deletions

View File

@ -40,9 +40,9 @@ class JFormFieldNamespaces extends JFormFieldList
protected function getOptions()
{
// Get the user object.
$user = JFactory::getUser();
$user = Factory::getUser();
// Get the databse object.
$db = JFactory::getDBO();
$db = Factory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.guid','a.name','a.namespace','a.type','a.power_version'),array('guid','use_name','namespace','type','version')));
$query->from($db->quoteName('#__componentbuilder_power', 'a'));
@ -60,7 +60,7 @@ class JFormFieldNamespaces extends JFormFieldList
}
}
// get the input
$jinput = JFactory::getApplication()->input;
$jinput = Factory::getApplication()->input;
// get the id
$power_id = $jinput->getInt('id', 0);
// if we have an id we remove all classes of the same namespace and name
@ -74,17 +74,17 @@ class JFormFieldNamespaces extends JFormFieldList
// if none was found, we add this to set an alternative to set custom
if (!$items)
{
$options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_NONE_FOUND'));
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_NONE_FOUND'));
}
if ($items)
{
if ($this->multiple === false)
{
$options[] = JHtml::_('select.option', '', JText::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
$options[] = Html::_('select.option', '', Text::_('COM_COMPONENTBUILDER_SELECT_AN_OPTION'));
}
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->guid, str_replace('.','\\', $item->namespace) . ' [' . $item->use_name . '] (v' . $item->version . ' - ' . $item->type . ')');
$options[] = Html::_('select.option', $item->guid, str_replace('.','\\', $item->namespace) . ' [' . $item->use_name . '] (v' . $item->version . ' - ' . $item->type . ')');
}
}
return $options;

View File

@ -141,6 +141,7 @@
label="COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_LABEL"
description="COM_COMPONENTBUILDER_CUSTOM_CODE_TYPE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">

View File

@ -284,7 +284,7 @@
label="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_LABEL"
description="COM_COMPONENTBUILDER_JOOMLA_COMPONENT_REMOVE_LINE_BREAKS_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
default="1"
required="true">
<!-- Option Set. -->
<option value="1">

View File

@ -235,10 +235,10 @@
label="COM_COMPONENTBUILDER_POWER_NAMESPACE_LABEL"
layout="joomla.form.field.subform.repeatable-table"
multiple="true"
buttons="add,remove,move"
buttons="add,remove"
icon="list"
max="30"
min="1"
min="0"
nested_depth="1">
<form hidden="true" name="list_namespace_modal" repeat="true">
<!-- Use Field. Type: Text. (joomla) -->
@ -493,7 +493,8 @@
type="namespaces"
name="use"
label="COM_COMPONENTBUILDER_POWER_USE_LABEL"
class="list_class span12"
class="span12"
layout="joomla.form.field.list-fancy-select"
multiple="false"
default="0"
button="false"

View File

@ -156,7 +156,7 @@
<option value="2">
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER</option>
<option value="3">
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_FIELD_TYPE</option>
COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_FIELD_TYPES</option>
</field>
<!-- Type Field. Type: List. (joomla) -->
<field
@ -261,9 +261,9 @@
label="COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_LABEL"
description="COM_COMPONENTBUILDER_REPOSITORY_ACCESS_REPO_DESCRIPTION"
class="btn-group btn-group-yesno"
default="">
default="0">
<!-- Option Set. -->
<option value="">
<option value="0">
COM_COMPONENTBUILDER_REPOSITORY_GLOBAL</option>
<option value="1">
COM_COMPONENTBUILDER_REPOSITORY_OVERRIDE</option>

View File

@ -200,7 +200,7 @@ class ComponentbuilderModelRepositories extends ListModel
0 => 'COM_COMPONENTBUILDER_REPOSITORY_SELECT_AN_OPTION',
1 => 'COM_COMPONENTBUILDER_REPOSITORY_SUPER_POWER',
2 => 'COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_POWER',
3 => 'COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_FIELD_TYPE'
3 => 'COM_COMPONENTBUILDER_REPOSITORY_JOOMLA_FIELD_TYPES'
);
// Now check if value is found in this array
if (isset($targetArray[$value]) && StringHelper::check($targetArray[$value]))