Fixed javascript overload in the field conditions area. Fixed a dynamicGet error that linked the wrong tables with eachother. Fixed gh-519 so that the form is loaded around pagination, note that this may break some implementation, but this fix will allow for a more correct html.

This commit is contained in:
2020-02-05 01:18:34 +02:00
parent 6719a7008b
commit 12c456ca6b
31 changed files with 418 additions and 564 deletions

View File

@ -22,23 +22,9 @@ JHtml::_('behavior.formvalidation');
JHtml::_('formbehavior.chosen', 'select');
JHtml::_('behavior.keepalive');
?>
<?php if ($this->canDo->get('compiler.access')): ?>
<script type="text/javascript">
Joomla.submitbutton = function(task) {
if (task === 'compiler.back') {
parent.history.back();
return false;
} else {
var form = document.getElementById('adminForm');
form.task.value = task;
form.submit();
}
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=compiler'); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
<?php if ($this->canDo->get('compiler.access')): ?>
<form action="<?php echo JRoute::_('index.php?option=com_componentbuilder&view=compiler'); ?>" method="post" name="adminForm" id="adminForm" class="form-validate" enctype="multipart/form-data">
<script type="text/javascript">
Joomla.submitbutton = function(task, key)
{
@ -54,11 +40,7 @@ Joomla.submitbutton = function(task, key)
if (isValid){
jQuery('#form').hide();
// get correct form based on task
if (task == 'compiler.compiler' || task == 'compiler.installCompiledModule' || task == 'compiler.installCompiledPlugin') {
var form = document.getElementById('compilerForm');
} else {
var form = document.getElementById('adminForm');
}
var form = document.getElementById('adminForm');
// set the plugin id
if (task == 'compiler.installCompiledModule' || task == 'compiler.installCompiledPlugin') {
form.install_item_id.value = key;
@ -112,7 +94,7 @@ jQuery('<div id="loading"></div>')
<div id="form">
<div class="span4">
<h3><?php echo JText::_('COM_COMPONENTBUILDER_READY_TO_COMPILE_A_COMPONENT'); ?></h3>
<form action="index.php?option=com_componentbuilder&view=compiler" method="post" name="compilerForm" id="compilerForm" class="form-validate" enctype="multipart/form-data">
<div id="compilerForm">
<div>
<span class="notice" style="display:none; color:red;"><?php echo JText::_('COM_COMPONENTBUILDER_YOU_MUST_SELECT_A_COMPONENT'); ?></span><br />
<?php if ($this->form): ?>
@ -131,9 +113,7 @@ jQuery('<div id="loading"></div>')
</button>
<input type="hidden" name="install_item_id" value="0">
<input type="hidden" name="version" value="3" />
<input type="hidden" name="task" value="compiler.compiler" />
<?php echo JHtml::_('form.token'); ?>
</form>
</div>
</div>
<div class="span7">
<div id="component-details"><?php echo $selectNotice; ?></div>
@ -197,7 +177,10 @@ function JRouter(link) {
?>
return url+link;
}
</script>
</script>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
<?php else: ?>
<h1><?php echo JText::_('COM_COMPONENTBUILDER_NO_ACCESS_GRANTED'); ?></h1>
<?php endif; ?>

View File

@ -222,12 +222,6 @@ class ComponentbuilderViewCompiler extends JViewLegacy
$this->document->addScript(JURI::root() . "administrator/components/com_componentbuilder/custom/marked.js");
// add the document default css file
$this->document->addStyleSheet(JURI::root(true) .'/administrator/components/com_componentbuilder/assets/css/compiler.css', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
// Set the Custom CSS script to view
$this->document->addStyleDeclaration("
.j-sidebar-container {
margin: -37px 0 0 -1px !important;
}
");
// Set the Custom JS script to view
$this->document->addScriptDeclaration("
function getComponentDetails_server(id){