Stable release of v3.2.0-beta1

Move beta to main repo. Fix #1053 so that the right and left tabs display correctly in Joomla 4&5.
This commit is contained in:
2024-03-02 22:10:30 +02:00
parent 3c91a5cdbb
commit d1e1a56671
1786 changed files with 73608 additions and 37437 deletions

View File

@ -12,76 +12,75 @@
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.formvalidator');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
Html::addIncludePath(JPATH_COMPONENT.'/helpers/html');
Html::_('behavior.formvalidator');
Html::_('formbehavior.chosen', 'select');
Html::_('behavior.keepalive');
$componentParams = $this->params; // will be removed just use $this->params instead
?>
<script type="text/javascript">
// waiting spinner
var outerDiv = jQuery('body');
jQuery('<div id="loading"></div>')
.css("background", "rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat")
.css("top", outerDiv.position().top - jQuery(window).scrollTop())
.css("left", outerDiv.position().left - jQuery(window).scrollLeft())
.css("width", outerDiv.width())
.css("height", outerDiv.height())
.css("position", "fixed")
.css("opacity", "0.80")
.css("-ms-filter", "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)")
.css("filter", "alpha(opacity = 80)")
.css("display", "none")
.appendTo(outerDiv);
jQuery('#loading').show();
var outerDiv = document.querySelector('body');
var loadingDiv = document.createElement('div');
loadingDiv.id = 'loading';
loadingDiv.style.cssText = "background: rgba(255, 255, 255, .8) url('components/com_componentbuilder/assets/images/import.gif') 50% 15% no-repeat; top: " + (outerDiv.getBoundingClientRect().top + window.pageYOffset) + "px; left: " + (outerDiv.getBoundingClientRect().left + window.pageXOffset) + "px; width: " + outerDiv.offsetWidth + "px; height: " + outerDiv.offsetHeight + "px; position: fixed; opacity: 0.80; -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); filter: alpha(opacity=80); display: none;";
outerDiv.appendChild(loadingDiv);
loadingDiv.style.display = 'block';
// when page is ready remove and show
jQuery(window).load(function() {
jQuery('#componentbuilder_loader').fadeIn('fast');
jQuery('#loading').hide();
window.addEventListener('load', function() {
var componentLoader = document.getElementById('componentbuilder_loader');
if (componentLoader) componentLoader.style.display = 'block';
loadingDiv.style.display = 'none';
});
</script>
<div id="componentbuilder_loader" style="display: none;">
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<form action="<?php echo Route::_('index.php?option=com_componentbuilder&layout=edit&id='. (int) $this->item->id . $this->referral); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<div class="form-horizontal">
<?php echo JHtml::_('bootstrap.startTabSet', 'class_methodTab', array('active' => 'details')); ?>
<?php echo Html::_('bootstrap.startTabSet', 'class_methodTab', ['active' => 'details', 'recall' => true]); ?>
<?php echo JHtml::_('bootstrap.addTab', 'class_methodTab', 'details', JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_DETAILS', true)); ?>
<?php echo Html::_('bootstrap.addTab', 'class_methodTab', 'details', Text::_('COM_COMPONENTBUILDER_CLASS_METHOD_DETAILS', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('class_method.details_left', $this); ?>
<?php echo LayoutHelper::render('class_method.details_left', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('class_method.details_right', $this); ?>
<?php echo LayoutHelper::render('class_method.details_right', $this); ?>
</div>
</div>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<?php echo JLayoutHelper::render('class_method.details_fullwidth', $this); ?>
<?php echo LayoutHelper::render('class_method.details_fullwidth', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo Html::_('bootstrap.endTab'); ?>
<?php $this->ignore_fieldsets = array('details','metadata','vdmmetadata','accesscontrol'); ?>
<?php $this->tab_name = 'class_methodTab'; ?>
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>
<?php echo LayoutHelper::render('joomla.edit.params', $this); ?>
<?php if ($this->canDo->get('class_method.edit.created_by') || $this->canDo->get('class_method.edit.created') || $this->canDo->get('class_method.edit.state') || ($this->canDo->get('class_method.delete') && $this->canDo->get('class_method.edit.state'))) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'class_methodTab', 'publishing', JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_PUBLISHING', true)); ?>
<?php echo Html::_('bootstrap.addTab', 'class_methodTab', 'publishing', Text::_('COM_COMPONENTBUILDER_CLASS_METHOD_PUBLISHING', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('class_method.publishing', $this); ?>
<?php echo LayoutHelper::render('class_method.publishing', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('class_method.publlshing', $this); ?>
<?php echo LayoutHelper::render('class_method.publlshing', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo Html::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php if ($this->canDo->get('core.admin')) : ?>
<?php echo JHtml::_('bootstrap.addTab', 'class_methodTab', 'permissions', JText::_('COM_COMPONENTBUILDER_CLASS_METHOD_PERMISSION', true)); ?>
<?php echo Html::_('bootstrap.addTab', 'class_methodTab', 'permissions', Text::_('COM_COMPONENTBUILDER_CLASS_METHOD_PERMISSION', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span12">
<fieldset class="adminform">
@ -96,14 +95,14 @@ $componentParams = $this->params; // will be removed just use $this->params inst
</fieldset>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo Html::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<?php echo Html::_('bootstrap.endTabSet'); ?>
<div>
<input type="hidden" name="task" value="class_method.edit" />
<?php echo JHtml::_('form.token'); ?>
<?php echo Html::_('form.token'); ?>
</div>
</div>
</form>
@ -130,13 +129,13 @@ jQuery('#adminForm').on('change', '#jform_extension_type',function (e)
<?php
$app = JFactory::getApplication();
$app = Factory::getApplication();
?>
function JRouter(link) {
<?php
if ($app->isClient('site'))
{
echo 'var url = "'.JURI::root().'";';
echo 'var url = "'. \Joomla\CMS\Uri\Uri::root() . '";';
}
else
{