52
0

Update on v1.0.2 (beta for next version)

Here's an update on the current version, which includes changes towards the next release still in beta.
This commit is contained in:
Robot 2023-10-18 09:28:04 +02:00
parent 0d8a88e800
commit e9582200ff
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
3 changed files with 23 additions and 5 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="4" group="content" method="upgrade">
<name>PLG_CONTENT_COMPONENTBUILDERFIELDORDERINGTABS</name>
<creationDate>2nd May, 2023</creationDate>
<creationDate>18th October, 2023</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>joomla@vdm.io</authorEmail>
<authorUrl>https://dev.vdm.io</authorUrl>

View File

@ -120,8 +120,17 @@ class JFormFieldAdminlistvieworderfields extends JFormFieldList
foreach($items as $item)
{
// get the field name (TODO this could slow down the system so we will need to improve on this)
$field_name = ComponentbuilderHelper::safeFieldName(ComponentbuilderHelper::getBetween(json_decode($item->xml),'name="','"'));
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]');
if (isset($item->xml) && ComponentbuilderHelper::checkJson($item->xml))
{
$field_xml = json_decode($item->xml);
$field_name = ComponentbuilderHelper::getBetween($field_xml,'name="','"');
$field_name = ComponentbuilderHelper::safeFieldName($field_name);
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]');
}
else
{
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [ empty - ' . $item->type . ' ]');
}
}
}
return $options;

View File

@ -87,8 +87,17 @@ class JFormFieldLinkedviewsorderfields extends JFormFieldList
foreach($items as $item)
{
// get the field name (TODO this could slow down the system so we will need to improve on this)
$field_name = ComponentbuilderHelper::safeFieldName(ComponentbuilderHelper::getBetween(json_decode($item->xml),'name="','"'));
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]');
if (isset($item->xml) && ComponentbuilderHelper::checkJson($item->xml))
{
$field_xml = json_decode($item->xml);
$field_name = ComponentbuilderHelper::getBetween($field_xml,'name="','"');
$field_name = ComponentbuilderHelper::safeFieldName($field_name);
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [ ' . $field_name . ' - ' . $item->type . ' ]');
}
else
{
$options[] = JHtml::_('select.option', $item->id, $item->name . ' [ empty - ' . $item->type . ' ]');
}
}
}
return $options;