Resolved gh-441 to allow fieldtype name prefixing. Resolved gh-443 to allow Alphanumeric+dot in fieldtype name. Fixed gh-446 to insure that JFormRuleInt validates correctly in the admin field realtions. Improved the new plugin area to also have system name and option to add custom header code. gh-436
This commit is contained in:
@ -44,23 +44,23 @@ $componentParams = $this->params; // will be removed just use $this->params inst
|
||||
<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">
|
||||
|
||||
<?php echo JLayoutHelper::render('joomla_plugin.details_above', $this); ?>
|
||||
<?php echo JLayoutHelper::render('joomla_plugin.code_above', $this); ?>
|
||||
<div class="form-horizontal">
|
||||
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'joomla_pluginTab', array('active' => 'details')); ?>
|
||||
<?php echo JHtml::_('bootstrap.startTabSet', 'joomla_pluginTab', array('active' => 'code')); ?>
|
||||
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'joomla_pluginTab', 'details', JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_DETAILS', true)); ?>
|
||||
<?php echo JHtml::_('bootstrap.addTab', 'joomla_pluginTab', 'code', JText::_('COM_COMPONENTBUILDER_JOOMLA_PLUGIN_CODE', true)); ?>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('joomla_plugin.details_left', $this); ?>
|
||||
<?php echo JLayoutHelper::render('joomla_plugin.code_left', $this); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<?php echo JLayoutHelper::render('joomla_plugin.details_right', $this); ?>
|
||||
<?php echo JLayoutHelper::render('joomla_plugin.code_right', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid form-horizontal-desktop">
|
||||
<div class="span12">
|
||||
<?php echo JLayoutHelper::render('joomla_plugin.details_fullwidth', $this); ?>
|
||||
<?php echo JLayoutHelper::render('joomla_plugin.code_fullwidth', $this); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo JHtml::_('bootstrap.endTab'); ?>
|
||||
@ -191,6 +191,55 @@ jQuery('#adminForm').on('change', '#jform_class_extends',function (e)
|
||||
|
||||
});
|
||||
|
||||
// #jform_class_extends listeners for class_extends_vvvvvxd function
|
||||
jQuery('#jform_class_extends').on('keyup',function()
|
||||
{
|
||||
var class_extends_vvvvvxd = jQuery("#jform_class_extends").val();
|
||||
vvvvvxd(class_extends_vvvvvxd);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_class_extends',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var class_extends_vvvvvxd = jQuery("#jform_class_extends").val();
|
||||
vvvvvxd(class_extends_vvvvvxd);
|
||||
|
||||
});
|
||||
|
||||
// #jform_add_head listeners for add_head_vvvvvxe function
|
||||
jQuery('#jform_add_head').on('keyup',function()
|
||||
{
|
||||
var add_head_vvvvvxe = jQuery("#jform_add_head input[type='radio']:checked").val();
|
||||
var class_extends_vvvvvxe = jQuery("#jform_class_extends").val();
|
||||
vvvvvxe(add_head_vvvvvxe,class_extends_vvvvvxe);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_head',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_head_vvvvvxe = jQuery("#jform_add_head input[type='radio']:checked").val();
|
||||
var class_extends_vvvvvxe = jQuery("#jform_class_extends").val();
|
||||
vvvvvxe(add_head_vvvvvxe,class_extends_vvvvvxe);
|
||||
|
||||
});
|
||||
|
||||
// #jform_class_extends listeners for class_extends_vvvvvxe function
|
||||
jQuery('#jform_class_extends').on('keyup',function()
|
||||
{
|
||||
var add_head_vvvvvxe = jQuery("#jform_add_head input[type='radio']:checked").val();
|
||||
var class_extends_vvvvvxe = jQuery("#jform_class_extends").val();
|
||||
vvvvvxe(add_head_vvvvvxe,class_extends_vvvvvxe);
|
||||
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_class_extends',function (e)
|
||||
{
|
||||
e.preventDefault();
|
||||
var add_head_vvvvvxe = jQuery("#jform_add_head input[type='radio']:checked").val();
|
||||
var class_extends_vvvvvxe = jQuery("#jform_class_extends").val();
|
||||
vvvvvxe(add_head_vvvvvxe,class_extends_vvvvvxe);
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
jQuery('#adminForm').on('change', '#jform_joomla_plugin_group',function (e)
|
||||
@ -203,6 +252,11 @@ jQuery('#adminForm').on('change', '#jform_class_extends',function (e)
|
||||
{
|
||||
// load the active array values
|
||||
getClassCodeIds('joomla_plugin_group', 'jform_class_extends', true);
|
||||
getClassHeaderCode();
|
||||
});
|
||||
jQuery('#adminForm').on('change', '#jform_add_head',function (e)
|
||||
{
|
||||
getClassHeaderCode();
|
||||
});
|
||||
|
||||
<?php
|
||||
|
@ -201,6 +201,10 @@ class ComponentbuilderViewJoomla_plugin extends JViewLegacy
|
||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/uikit.min.js' , (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
|
||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/lightbox.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
|
||||
$this->document->addScript( JURI::root(true) .'/media/com_componentbuilder/uikit-v2/js/components/notify.min.js', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript', (ComponentbuilderHelper::jVersion()->isCompatible('3.8.0')) ? array('type' => 'text/javascript', 'async' => 'async') : true);
|
||||
// Add the JavaScript for JStore
|
||||
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jquery.json.min.js');
|
||||
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/jstorage.min.js');
|
||||
$this->document->addScript(JURI::root() .'media/com_componentbuilder/js/strtotime.js');
|
||||
// add var key
|
||||
$this->document->addScriptDeclaration("var vastDevMod = '" . $this->get('VDM') . "';");
|
||||
// add return_here
|
||||
@ -211,6 +215,73 @@ class ComponentbuilderViewJoomla_plugin extends JViewLegacy
|
||||
JText::script('COM_COMPONENTBUILDER_NO_RESULTS_MATCH');
|
||||
JText::script('COM_COMPONENTBUILDER_SELECT_A_PROPERTY');
|
||||
JText::script('COM_COMPONENTBUILDER_NO_DESCRIPTION_FOUND');
|
||||
// check if we should use browser storage
|
||||
$setBrowserStorage = $this->params->get('set_browser_storage', null);
|
||||
if ($setBrowserStorage)
|
||||
{
|
||||
// check what (Time To Live) show we use
|
||||
$storageTimeToLive = $this->params->get('storage_time_to_live', 'global');
|
||||
if ('global' == $storageTimeToLive)
|
||||
{
|
||||
// use the global session time
|
||||
$session = JFactory::getSession();
|
||||
// must have itin milliseconds
|
||||
$expire = ($session->getExpire()*60)* 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
// use the Componentbuilder Global setting
|
||||
if (0 != $storageTimeToLive)
|
||||
{
|
||||
// this will convert the time into milliseconds
|
||||
$storageTimeToLive = $storageTimeToLive * 1000;
|
||||
}
|
||||
$expire = $storageTimeToLive;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// set to use no storage
|
||||
$expire = 30000; // only 30 seconds
|
||||
}
|
||||
// Set the Time To Live To JavaScript
|
||||
$this->document->addScriptDeclaration("var expire = ". (int) $expire.";");
|
||||
$this->document->addScriptDeclaration("selectionArray = {'property':{},'method':{}};");
|
||||
// add a few field options via PHP
|
||||
JFormHelper::addFieldPath(JPATH_COMPONENT . '/models/fields');
|
||||
$tmp_ = JFormHelper::loadFieldType('joomlaplugingroups')->options;
|
||||
if (ComponentbuilderHelper::checkArray($tmp_))
|
||||
{
|
||||
$_tmp = array();
|
||||
foreach ($tmp_ as $item)
|
||||
{
|
||||
$_tmp[$item->value] = $item->text;
|
||||
}
|
||||
// Set the values to JavaScript
|
||||
$this->document->addScriptDeclaration("selectionArray['joomla_plugin_group'] = ". json_encode($_tmp) . ";");
|
||||
}
|
||||
$tmp_ = JFormHelper::loadFieldType('pluginsclassproperties')->options;
|
||||
if (ComponentbuilderHelper::checkArray($tmp_))
|
||||
{
|
||||
$_tmp = array();
|
||||
foreach ($tmp_ as $item)
|
||||
{
|
||||
$_tmp[$item->value] = $item->text;
|
||||
}
|
||||
// Set the values to JavaScript
|
||||
$this->document->addScriptDeclaration("selectionArray['property'] = ". json_encode($_tmp) . ";");
|
||||
}
|
||||
$tmp_ = JFormHelper::loadFieldType('pluginsclassmethods')->options;
|
||||
if (ComponentbuilderHelper::checkArray($tmp_))
|
||||
{
|
||||
$_tmp = array();
|
||||
foreach ($tmp_ as $item)
|
||||
{
|
||||
$_tmp[$item->value] = $item->text;
|
||||
}
|
||||
// Set the values to JavaScript
|
||||
$this->document->addScriptDeclaration("selectionArray['method'] = ". json_encode($_tmp) . ";");
|
||||
}
|
||||
JText::script('view not acceptable. Error');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user