Stable release of v3.2.0-beta5

Add custom file file mapping for Joomla 4 and 5.
This commit is contained in:
2024-03-09 21:41:29 +02:00
parent 5675f186cd
commit 91e922b993
28 changed files with 207 additions and 93 deletions

View File

@@ -657,7 +657,7 @@ class ComponentbuilderViewCompiler extends HtmlView
// add the document default css file
Html::_('stylesheet', 'administrator/components/com_componentbuilder/assets/css/compiler.css', ['version' => 'auto']);
// Set the Custom JS script to view
$this->document->addScriptDeclaration("
$this->getDocument()->addScriptDeclaration("
function getComponentDetails_server(id) {
let getUrl = JRouter(\"index.php?option=com_componentbuilder&task=ajax.getComponentDetails&format=json&raw=true\");
let request = new URLSearchParams();

View File

@@ -215,9 +215,9 @@ class ComponentbuilderViewJoomla_component extends HtmlView
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', ['version' => 'auto']);
Html::_('script', 'media/com_componentbuilder/uikit-v2/js/components/notify.min.js', ['version' => 'auto']);
// add var key
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
$this->getDocument()->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
// add return_here
$this->document->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
$this->getDocument()->addScriptDeclaration("var return_here = '" . urlencode(base64_encode((string) \JUri::getInstance())) . "';");
Text::script('view not acceptable. Error');
}

View File

@@ -17,11 +17,12 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Joomla\Utilities\ArrayHelper;
Html::addIncludePath(JPATH_COMPONENT.'/helpers/html');
Html::_('behavior.formvalidator');
Html::_('formbehavior.chosen', 'select');
Html::_('behavior.keepalive');
use Joomla\CMS\Session\Session;
use VDM\Joomla\Utilities\ArrayHelper;
// allow main menu selection
$this->app->input->set('hidemainmenu', false);
@@ -159,7 +160,7 @@ $search_value = $this->form->getField('search_value');
const searchTables = <?php echo json_encode($this->item['tables']); ?>;
// the search Ajax URLs
const UrlAjax = '<?php echo $url_base; ?>&format=json&raw=true&<?php echo \JSession::getFormToken(); ?>=1&task=ajax.';
const UrlAjax = '<?php echo $url_base; ?>&format=json&raw=true&<?php echo Session::getFormToken(); ?>=1&task=ajax.';
// the search URL
const UrlSearch = '<?php echo $url_search; ?>';

View File

@@ -24,6 +24,7 @@ use Joomla\CMS\Filesystem\File;
use VDM\Joomla\Componentbuilder\Search\Factory as SearchFactory;
use Joomla\CMS\Form\Form;
use VDM\Joomla\Utilities\ArrayHelper;
use VDM\Joomla\Utilities\FormHelper;
use VDM\Joomla\Utilities\StringHelper;
/**
@@ -149,7 +150,7 @@ class ComponentbuilderViewSearch extends HtmlView
2 => 'COM_COMPONENTBUILDER_REPLACE',
0 => 'COM_COMPONENTBUILDER_CLEAR'];
// add to form
$xml = ComponentbuilderHelper::getFieldXML($attributes, $options);
$xml = FormHelper::xml($attributes, $options);
if ($xml instanceof SimpleXMLElement)
{
$form->setField($xml, null, true, 'search');
@@ -170,7 +171,7 @@ class ComponentbuilderViewSearch extends HtmlView
'autocomplete' => true,
'default' => $this->urlvalues['search_value']];
// add to form
$xml = ComponentbuilderHelper::getFieldXML($attributes);
$xml = FormHelper::xml($attributes);
if ($xml instanceof SimpleXMLElement)
{
$form->setField($xml, null, true, 'search');
@@ -192,7 +193,7 @@ class ComponentbuilderViewSearch extends HtmlView
'showon' => 'type_search:2',
'default' => $this->urlvalues['replace_value']];
// add to form
$xml = ComponentbuilderHelper::getFieldXML($attributes);
$xml = FormHelper::xml($attributes);
if ($xml instanceof SimpleXMLElement)
{
$form->setField($xml, null, true, 'search');
@@ -227,7 +228,7 @@ class ComponentbuilderViewSearch extends HtmlView
'whole_word' => 'COM_COMPONENTBUILDER_WHOLE_WORD',
'regex_search' => 'COM_COMPONENTBUILDER_REGEX_SEARCH'];
// add to form
$xml = ComponentbuilderHelper::getFieldXML($attributes, $options);
$xml = FormHelper::xml($attributes, $options);
if ($xml instanceof SimpleXMLElement)
{
$form->setField($xml, null, true, 'settings');
@@ -253,7 +254,7 @@ class ComponentbuilderViewSearch extends HtmlView
$options[(int) $component->id] = $this->escape($component->name);
}
// add to form
$xml = ComponentbuilderHelper::getFieldXML($attributes, $options);
$xml = FormHelper::xml($attributes, $options);
if ($xml instanceof SimpleXMLElement)
{
$form->setField($xml, null, true, 'settings');
@@ -277,7 +278,7 @@ class ComponentbuilderViewSearch extends HtmlView
$options[$table] = $this->escape($table);
}
// add to form
$xml = ComponentbuilderHelper::getFieldXML($attributes, $options);
$xml = FormHelper::xml($attributes, $options);
if ($xml instanceof SimpleXMLElement)
{
$form->setField($xml, null, true, 'settings');
@@ -296,7 +297,7 @@ class ComponentbuilderViewSearch extends HtmlView
'filter' => 'raw',
'editor' => 'codemirror|none'];
// add to form
$xml = ComponentbuilderHelper::getFieldXML($attributes, $options);
$xml = FormHelper::xml($attributes, $options);
if ($xml instanceof SimpleXMLElement)
{
$form->setField($xml, null, true, 'view');