Release of v5.0.2-beta3

Add more pure JS to the dynamic get area.
This commit is contained in:
Robot 2024-08-01 23:01:42 +02:00
parent 04ebefe98d
commit 6d24fcfd2b
Signed by: Robot
GPG Key ID: 14DECD44E7E1BB95
43 changed files with 238 additions and 210 deletions

View File

@ -1,10 +1,11 @@
# v5.0.2-beta2
# v5.0.2-beta3
- Fix dynamicGet so that the table values will load again. #1155
- Add more pure JS to the dynamic get area.
# v5.0.2-beta
- Fix abstract schema class function check default index warring
- Fix abstract schema class function check default index warring
- Fix dynamicGet so that the table values will load again. #1155
# v5.0.2-alpha

View File

@ -3270,7 +3270,7 @@ class Com_ComponentbuilderInstallerScript implements InstallerScriptInterface
echo '<div style="background-color: #fff;" class="alert alert-info"><a target="_blank" href="https://dev.vdm.io" title="Component Builder">
<img src="components/com_componentbuilder/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 5.0.2-beta2 Was Successful! Let us know if anything is not working as expected.</h3></div>';
<h3>Upgrade to Version 5.0.2-beta3 Was Successful! Let us know if anything is not working as expected.</h3></div>';
// Add/Update component in the action logs extensions table.
$this->setActionLogsExtensions();

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.2-beta2) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.2-beta3) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -145,10 +145,10 @@ TODO
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 1st August, 2024
+ *Version*: 5.0.2-beta2
+ *Version*: 5.0.2-beta3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **792054**
+ *Line count*: **792082**
+ *Field count*: **2099**
+ *File count*: **5526**
+ *Folder count*: **556**

View File

@ -9,7 +9,7 @@ The Component Builder for [Joomla](https://extensions.joomla.org/extension/compo
Whether you're a seasoned [Joomla](https://extensions.joomla.org/extension/component-builder/) developer, or have just started, Component Builder will save you lots of time and money. A real must have!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.2-beta2) with **ALL** its features and **ALL** concepts totally open-source and free!
You can install it quite easily and with no limitations. On [gitea](https://git.vdm.dev/joomla/Component-Builder/tags) is the latest release (5.0.2-beta3) with **ALL** its features and **ALL** concepts totally open-source and free!
> Watch Quick Build of a Hello World component in [JCB on Youtube](https://www.youtube.com/watch?v=IQfsLYIeblk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=45)
@ -145,10 +145,10 @@ TODO
+ *Name*: [Component Builder](https://git.vdm.dev/joomla/Component-Builder)
+ *First Build*: 30th April, 2015
+ *Last Build*: 1st August, 2024
+ *Version*: 5.0.2-beta2
+ *Version*: 5.0.2-beta3
+ *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved.
+ *License*: GNU General Public License version 2 or later; see LICENSE.txt
+ *Line count*: **792054**
+ *Line count*: **792082**
+ *Field count*: **2099**
+ *File count*: **5526**
+ *Folder count*: **556**

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -134,7 +135,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -112,7 +113,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -759,7 +760,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -117,7 +118,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -132,7 +133,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -127,7 +128,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -16,6 +16,7 @@ use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use VDM\Joomla\Utilities\StringHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -247,7 +248,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -120,7 +121,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
// No direct access to this file
defined('_JEXEC') or die;
@ -59,7 +60,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -405,7 +406,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -272,7 +273,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -651,10 +652,10 @@ document.addEventListener('DOMContentLoaded', function() {
// for the values the will still be set
document.addEventListener('DOMContentLoaded', function() {
document.addEventListener('subform-row-add', function(event) {
var row = event.detail.row;
var groupName = row.getAttribute('data-group');
var fieldName = groupName.replace('join_', '').replace('_table', '').replace(/([0-9])/g, '');
var fieldNr = groupName.replace(/([A-z_])/g, '');
let row = event.detail.row;
let groupName = row.getAttribute('data-group');
let fieldName = groupName.replace('join_', '').replace('_table', '').replace(/([0-9])/g, '');
let fieldNr = groupName.replace(/([A-z_])/g, '');
updateSubItems(fieldName, fieldNr, '_', '_');
});
});
@ -669,14 +670,14 @@ document.getElementById('adminForm').addEventListener('change', function(e) {
<?php endforeach; ?>
document.getElementById('jform_add_php_router_parse').addEventListener('change', function() {
var valueSwitch = document.querySelector("#jform_add_php_router_parse input[type='radio']:checked").value;
let valueSwitch = document.querySelector("#jform_add_php_router_parse input[type='radio']:checked").value;
getDynamicScripts(valueSwitch);
});
document.getElementById('adminForm').addEventListener('change', function(e) {
if (e.target && e.target.matches('#jform_select_all input[type="radio"]')) {
e.preventDefault();
var selectAll = e.target.value;
let selectAll = e.target.value;
setSelectAll(selectAll);
}
});
@ -688,7 +689,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -49,32 +49,3 @@ if ($this->saveOrder)
<input type="hidden" name="task" value="" />
<?php echo Html::_('form.token'); ?>
</form>
<script type="text/javascript">
// dynamic_gets footer script
// get page body
var outerBodyDiv = document.querySelector('body');
// start loading spinner
var loadingDiv = document.createElement('div');
loadingDiv.id = 'loading';
// Set CSS properties individually
loadingDiv.style.background = "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat";
loadingDiv.style.top = (outerBodyDiv.getBoundingClientRect().top + window.pageYOffset) + "px";
loadingDiv.style.left = (outerBodyDiv.getBoundingClientRect().left + window.pageXOffset) + "px";
loadingDiv.style.width = outerBodyDiv.offsetWidth + "px";
loadingDiv.style.height = outerBodyDiv.offsetHeight + "px";
loadingDiv.style.position = 'fixed';
loadingDiv.style.opacity = '0.80';
loadingDiv.style.msFilter = "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
loadingDiv.style.filter = "alpha(opacity=80)";
loadingDiv.style.display = 'none';
// add to page body
outerBodyDiv.appendChild(loadingDiv);
// when the expand button is clicked
jQuery('#toolbar').on('click',"button.button-expand-2", function(e){
loadingDiv.style.display = 'block';
});
</script>

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -327,7 +328,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -531,7 +532,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -246,7 +247,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -14,6 +14,7 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\HTML\HTMLHelper as Html;
use VDM\Joomla\Utilities\ArrayHelper;
use Joomla\CMS\Uri\Uri;
// No direct access to this file
defined('_JEXEC') or die;
@ -553,7 +554,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -456,7 +457,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -439,7 +440,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -399,7 +400,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -111,7 +112,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -215,7 +216,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -577,7 +578,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -140,7 +141,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -168,7 +169,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -423,7 +424,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -220,7 +221,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -15,6 +15,7 @@ use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->getDocument()->getWebAssetManager();
@ -145,7 +146,7 @@ function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
echo 'var url = "'. Uri::root() . '";';
}
else
{

View File

@ -7,9 +7,9 @@
<authorUrl>https://dev.vdm.io</authorUrl>
<copyright>Copyright (C) 2015 Vast Development Method. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<version>5.0.2-beta2</version>
<version>5.0.2-beta3</version>
<description><![CDATA[
<h1>Component Builder (v.5.0.2-beta2)</h1>
<h1>Component Builder (v.5.0.2-beta3)</h1>
<div style="clear: both;"></div>
<p>The Component Builder for [Joomla](https://extensions.joomla.org/extension/component-builder/) is highly advanced tool that is truly able to build extremely complex components in a fraction of the time.

View File

@ -98,7 +98,7 @@
<version>5.0.2-beta</version>
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
<downloads>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.2-beta2.zip</downloadurl>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.2-beta3.zip</downloadurl>
</downloads>
<tags>
<tag>beta</tag>
@ -113,10 +113,10 @@
<element>pkg_component_builder</element>
<type>package</type>
<client>site</client>
<version>5.0.2-beta2</version>
<version>5.0.2-beta3</version>
<infourl title="Component Builder!">https://dev.vdm.io</infourl>
<downloads>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.2-beta2.zip</downloadurl>
<downloadurl type="full" format="zip">https://git.vdm.dev/api/v1/repos/joomla/pkg-component-builder/archive/v5.0.2-beta3.zip</downloadurl>
</downloads>
<tags>
<tag>beta</tag>

View File

@ -1068,10 +1068,12 @@ function addButton(type, where, size){
})
}
function getLinked(){
function getLinked() {
getCodeFrom_server(1, 'type', 'type', 'getLinked').then(function(result) {
if(result){
jQuery('#display_linked_to').html(result);
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML = result;
}
});
}

View File

@ -230,10 +230,12 @@ function getCodeFrom_server(id, type, type_name, callingName) {
});
}
function getLinked(){
function getLinked() {
getCodeFrom_server(1, 'type', 'type', 'getLinked').then(function(result) {
if(result){
jQuery('#display_linked_to').html(result);
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML = result;
}
});
}

View File

@ -1401,37 +1401,37 @@ function isSet(val)
}
jQuery(document).ready(function()
{
document.addEventListener('DOMContentLoaded', function() {
// get the linked details
getLinked();
var valueSwitch = jQuery("#jform_add_php_router_parse input[type='radio']:checked").val();
let valueSwitch = document.querySelector("#jform_add_php_router_parse input[type='radio']:checked").value;
getDynamicScripts(valueSwitch);
// check and load all the custom code edit buttons
getEditCustomCodeButtons();
});
function setSelectAll(select_all){
function setSelectAll(select_all) {
// get source type
var main_source = jQuery("#jform_main_source").val();
if (1 == main_source) {
var key = 'view';
} else if (2 == main_source) {
var key = 'db';
let main_source = document.getElementById("jform_main_source").value;
let key;
if (main_source == 1) {
key = 'view';
} else if (main_source == 2) {
key = 'db';
} else {
return true;
}
// only continue if set
if (select_all == 1) {
// set default notice
jQuery("#jform_"+key+"_selection").val('a.*');
document.getElementById("jform_" + key + "_selection").value = 'a.*';
// set the selection text area to read only
jQuery("#jform_"+key+"_selection").prop("readonly", true);
document.getElementById("jform_" + key + "_selection").readOnly = true;
} else {
// remove the read only from selection text area
jQuery("#jform_"+key+"_selection").prop("readonly", false);
document.getElementById("jform_" + key + "_selection").readOnly = false;
// get selected options
var value_main = jQuery("#jform_"+key+"_table_main option:selected").val();
let value_main = document.getElementById("jform_" + key + "_table_main").selectedOptions[0].value;
// make sure that all fields are set as selected
if (key === 'view') {
getViewTableColumns(value_main, 'a', key, 3, true, '', '');
@ -1441,144 +1441,155 @@ function setSelectAll(select_all){
}
}
function getViewTableColumns_server(viewId,asKey,rowType){
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.viewTableColumns&format=json&raw=true");
if (token.length > 0 && viewId > 0 && asKey.length > 0)
{
var request = token+'=1&as='+asKey+'&type='+rowType+'&id='+viewId;
function getViewTableColumns_server(viewId, asKey, rowType) {
let getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.viewTableColumns&format=json&raw=true");
let request = '';
if (token.length > 0 && viewId > 0 && asKey.length > 0) {
request = token + '=1&as=' + asKey + '&type=' + rowType + '&id=' + viewId;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
return fetch(getUrl + '&' + request, { method: 'GET' }).then(function(response) {
return response.json();
});
}
function getViewTableColumns(id, asKey, key, rowType, main, table_, nr_){
function getViewTableColumns(id, asKey, key, rowType, main, table_, nr_) {
// check if this is the main view
if (main){
var select_all = jQuery("#jform_select_all input[type='radio']:checked").val();
if (main) {
let select_all = document.querySelector("#jform_select_all input[type='radio']:checked").value;
// do not continue if set
if (select_all == 1){
if (select_all == 1) {
setSelectAll(select_all);
return true;
}
}
getViewTableColumns_server(id, asKey, rowType).done(function(result) {
if (result) {
getViewTableColumns_server(id, asKey, rowType).then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
loadSelectionData(result, 'view', key, main, table_, nr_);
} else {
loadSelectionData(false, 'view', key, main, table_, nr_);
}
})
}
function getDbTableColumns_server(name,asKey,rowType)
{
var getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.dbTableColumns&format=json&raw=true");
if (token.length > 0 && name.length > 0 && asKey.length > 0) {
var request = token+'=1&as='+asKey+'&type='+rowType+'&name='+name;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'json',
data: request,
jsonp: false
});
}
function getDbTableColumns(name, asKey, key, rowType, main, table_, nr_){
function getDbTableColumns_server(name, asKey, rowType) {
let getUrl = JRouter("index.php?option=com_componentbuilder&task=ajax.dbTableColumns&format=json&raw=true");
let request = '';
if (token.length > 0 && name.length > 0 && asKey.length > 0) {
request = token + '=1&as=' + asKey + '&type=' + rowType + '&name=' + name;
}
return fetch(getUrl + '&' + request, { method: 'GET' }).then(function(response) {
return response.json();
});
}
function getDbTableColumns(name, asKey, key, rowType, main, table_, nr_) {
// check if this is the main view
if (main){
var select_all = jQuery("#jform_select_all input[type='radio']:checked").val();
if (main) {
let select_all = document.querySelector("#jform_select_all input[type='radio']:checked").value;
// do not continue if set
if (select_all == 1){
if (select_all === 1) {
setSelectAll(select_all);
return true;
}
}
getDbTableColumns_server(name,asKey,rowType).done(function(result) {
if (result) {
getDbTableColumns_server(name, asKey, rowType).then(function(result) {
if (result.error) {
console.error(result.error);
} else if (result) {
loadSelectionData(result, 'db', key, main, table_, nr_);
} else {
loadSelectionData(false, 'db', key, main, table_, nr_);
}
})
});
}
function loadSelectionData(result, type, key, main, table_, nr_)
{
if (main)
{
var textArea = 'textarea#jform_'+key+'_selection';
function loadSelectionData(result, type, key, main, table_, nr_) {
var textArea;
if (main) {
textArea = document.querySelector('textarea#jform_' + key + '_selection');
} else {
textArea = document.querySelector('textarea#jform_join_' + type + '_table' + table_ + '_join_' + type + '_table' + key + nr_ + '_selection');
}
else
{
var textArea = 'textarea#jform_join_'+type+'_table'+table_+'_join_'+type+'_table'+key+nr_+'_selection';
}
// no update the text area
if (result)
{
jQuery(textArea).val(result);
}
else
{
jQuery(textArea).val('');
// update the text area
if (result) {
textArea.value = result;
} else {
textArea.value = '';
}
}
function updateSubItems(fieldName, fieldNr, table_, nr_) {
if(jQuery('#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_'+fieldName+'_table').length) {
jQuery('#adminForm').on('change', '#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_'+fieldName+'_table',function (e) {
e.preventDefault();
// get options
var value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table option:selected").val();
var as_value2 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as option:selected").val();
var row_value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type option:selected").val();
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
let selector = '#jform_join_' + fieldName + '_table' + table_ + '_join_' + fieldName + '_table' + fieldNr + nr_ + '_' + fieldName + '_table';
if (document.querySelector(selector)) {
document.getElementById('adminForm').addEventListener('change', function(e) {
if (e.target.matches(selector)) {
e.preventDefault();
// get options
let selectElement = document.querySelector(selector);
let value1 = selectElement.options[selectElement.selectedIndex].value;
let asSelectElement = document.querySelector('#jform_join_' + fieldName + '_table' + table_ + '_join_' + fieldName + '_table' + fieldNr + nr_ + '_as');
let as_value2 = asSelectElement.options[asSelectElement.selectedIndex].value;
let rowTypeElement = document.querySelector('#jform_join_' + fieldName + '_table' + table_ + '_join_' + fieldName + '_table' + fieldNr + nr_ + '_row_type');
let row_value1 = rowTypeElement.options[rowTypeElement.selectedIndex].value;
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
}
}
});
jQuery('#adminForm').on('change', '#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_as',function (e) {
e.preventDefault();
// get options
var value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table option:selected").val();
var as_value2 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as option:selected").val();
var row_value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type option:selected").val();
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
document.getElementById('adminForm').addEventListener('change', function(e) {
if (e.target.matches('#jform_join_' + fieldName + '_table' + table_ + '_join_' + fieldName + '_table' + fieldNr + nr_ + '_as')) {
e.preventDefault();
// get options
let selectElement = document.querySelector(selector);
let value1 = selectElement.options[selectElement.selectedIndex].value;
let asSelectElement = document.querySelector('#jform_join_' + fieldName + '_table' + table_ + '_join_' + fieldName + '_table' + fieldNr + nr_ + '_as');
let as_value2 = asSelectElement.options[asSelectElement.selectedIndex].value;
let rowTypeElement = document.querySelector('#jform_join_' + fieldName + '_table' + table_ + '_join_' + fieldName + '_table' + fieldNr + nr_ + '_row_type');
let row_value1 = rowTypeElement.options[rowTypeElement.selectedIndex].value;
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
}
}
});
jQuery('#adminForm').on('change', '#jform_join_'+fieldName+'_table'+table_+'_join_'+fieldName+'_table'+fieldNr+nr_+'_row_type',function (e) {
e.preventDefault();
// get options
var value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_"+fieldName+"_table option:selected").val();
var as_value2 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_as option:selected").val();
var row_value1 = jQuery("#jform_join_"+fieldName+"_table"+table_+"_join_"+fieldName+"_table"+fieldNr+nr_+"_row_type option:selected").val();
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
document.getElementById('adminForm').addEventListener('change', function(e) {
if (e.target.matches('#jform_join_' + fieldName + '_table' + table_ + '_join_' + fieldName + '_table' + fieldNr + nr_ + '_row_type')) {
e.preventDefault();
// get options
let selectElement = document.querySelector(selector);
let value1 = selectElement.options[selectElement.selectedIndex].value;
let asSelectElement = document.querySelector('#jform_join_' + fieldName + '_table' + table_ + '_join_' + fieldName + '_table' + fieldNr + nr_ + '_as');
let as_value2 = asSelectElement.options[asSelectElement.selectedIndex].value;
let rowTypeElement = document.querySelector('#jform_join_' + fieldName + '_table' + table_ + '_join_' + fieldName + '_table' + fieldNr + nr_ + '_row_type');
let row_value1 = rowTypeElement.options[rowTypeElement.selectedIndex].value;
if (fieldName === 'view') {
getViewTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
} else {
getDbTableColumns(value1, as_value2, fieldNr, row_value1, false, table_, nr_);
}
}
});
}
}
function getDynamicScripts(id){
if (1 == id) {
function getDynamicScripts(id) {
if (id == 1) {
// get the current values
var current_router_parse = jQuery('textarea#jform_php_router_parse').val();
let current_router_parse = document.querySelector('textarea#jform_php_router_parse').value;
// set the router parse method script
if(current_router_parse.length == 0){
if (current_router_parse.length == 0) {
getCodeFrom_server(1, 'routerparse', 'type', 'getDynamicScripts').then(function(result) {
if(result){
jQuery('textarea#jform_php_router_parse').val(result);
if (result.error) {
console.error(result.error);
} else if (result) {
document.querySelector('textarea#jform_php_router_parse').value = result;
}
});
}
@ -1659,10 +1670,12 @@ function getEditCustomCodeButtons() {
});
}
function getLinked(){
function getLinked() {
getCodeFrom_server(1, 'type', 'type', 'getLinked').then(function(result) {
if(result){
jQuery('#display_linked_to').html(result);
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML = result;
}
});
}

View File

@ -782,10 +782,12 @@ function getCodeFrom_server(id, type, type_name, callingName) {
});
}
function getLinked(){
function getLinked() {
getCodeFrom_server(1, 'type', 'type', 'getLinked').then(function(result) {
if(result){
jQuery('#display_linked_to').html(result);
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML = result;
}
});
}

View File

@ -238,10 +238,12 @@ function setModuleCode() {
});
}
function getLinked(){
function getLinked() {
getCodeFrom_server(1, 'type', 'type', 'getLinked').then(function(result) {
if(result){
jQuery('#display_linked_to').html(result);
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML = result;
}
});
}

View File

@ -700,10 +700,12 @@ function removeCodeFromEditor(code_string, editor_id){
}
function getLinked(){
function getLinked() {
getCodeFrom_server(1, 'type', 'type', 'getLinked').then(function(result) {
if(result){
jQuery('#display_linked_to').html(result);
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML = result;
}
});
}

View File

@ -1013,10 +1013,12 @@ function addButton(type, where, size){
})
}
function getLinked(){
function getLinked() {
getCodeFrom_server(1, 'type', 'type', 'getLinked').then(function(result) {
if(result){
jQuery('#display_linked_to').html(result);
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML = result;
}
});
}

View File

@ -464,10 +464,12 @@ function removeCodeFromEditor(code_string, editor_id){
}
function getLinked(){
function getLinked() {
getCodeFrom_server(1, 'type', 'type', 'getLinked').then(function(result) {
if(result){
jQuery('#display_linked_to').html(result);
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML = result;
}
});
}

View File

@ -271,10 +271,12 @@ function getCodeFrom_server(id, type, type_name, callingName) {
});
}
function getLinked(){
function getLinked() {
getCodeFrom_server(1, 'type', 'type', 'getLinked').then(function(result) {
if(result){
jQuery('#display_linked_to').html(result);
if (result.error) {
console.error(result.error);
} else if (result) {
document.getElementById('display_linked_to').innerHTML = result;
}
});
}